GeminiLight / virne

Virne is a simulator for resource allocation problems in network virtualization, mainly for virtual network embedding (VNE). It also is adaptable to VNE's variants, such as service function chain deployment (SFC Deployment), network slicing, etc.
https://virne.readthedocs.io
Apache License 2.0
99 stars 19 forks source link

'pg_seq2seq' #4

Closed Rorsachach closed 1 year ago

Rorsachach commented 1 year ago

您好,我尝试了一下 pg_seq2seq,然后我这边报了两个错误。

  1. 在 super(PGSeq2SeqSolver, self).init('pg_cnn', controller, recorder, counter, **kwargs) 这里多接收了 'pg_cnn'
  2. 在 seq2seq 中的 SubEnv 少了在调用 super 时少了三个变量 controller, recorder, counter

您这边有什么建议吗?或者怎样修改。

swqsbssddqs commented 1 year ago

Hello, I'm facing the same problem with @Rorsachach ,and pg_seq2seq`s net has not act method? Could you please give me some suggestions?

GeminiLight commented 1 year ago

Thanks for your feedback. I think the unavailability of pg_seq2seq results from the last refactorization, and I will attempt to address this problem in my power as soon as possible.

Rorsachach commented 1 year ago

@xuxi2569471573 I did make some simple modifications, but I don't know whether it is what the author intended.

  1. change super(PGSeq2SeqSolver, self).init('pg_cnn', controller, recorder, counter, **kwargs) to super(PGSeq2SeqSolver, self).__init__(controller, recorder, counter, **kwargs)
  2. change sub_env = SubEnv(p_net, v_net) to sub_env = self.SubEnv(p_net, v_net, self. Controller, self. Recorder, self. Counter). And modify the constructor of SubEnv:
    def __init__(self, p_net, v_net, **kwargs):
        super(SubEnv, self).__init__(p_net, v_net, **kwargs)

    ===>

    def __init__(self, p_net, v_net, controller, recorder, counter, **kwargs):
        super(SubEnv, self).__init__(p_net, v_net, controller, recorder, counter, **kwargs)
swqsbssddqs commented 1 year ago

Thanks so much! I have made some similar changes, but the important thing is that there is no act method in pg_seq2seq`s net , I stop here. Can you run with these modifications?

Rorsachach commented 1 year ago

@xuxi2569471573 Sorry, I don't know how to write this act either.

GeminiLight commented 1 year ago

Thanks for your feedback and discussion. This bug has been fixed in the latest version (v0.4.0).

swqsbssddqs commented 1 year ago

Thinks so much!