Closed ychga closed 1 year ago
Thanks for your feedback. The OnlineLevelEnvironment should be used to register the solvers rather than the InstanceLevelEnv. I will fix this bug.
The bug has been fixed. Thanks.
The bug has been fixed. Thanks.
Thank you
您好,我尝试在main.py中运行一些learning类型的solver,发现pg_cnn,pg_cnn2,pg_mlp会因为使用了它们对应的SubEnv而导致如下报错:
似乎是因为使用它们时,程序都会在virne\base\scenario.py", line 52处:
env = Env(p_net, v_net_simulator, controller, recorder, counter, **vars(config))
将一个VirtualNetworkRequestSimulator类实例v_net_simulator传递给各自对应的SubEnv.init(),但它应该是接收VirtualNetwork类实例。而使用a3c_gcn_seq2seq和pg_seq2seq两个solver时不会出现上述BUG,因为solver_info中指出了这两个solver直接使用了base.environment.SolutionStepEnvironment,而不是它们目录下的SubEnv。这是我打印的一些solver_info信息:
{'solver': <class 'solver.learning.pg_cnn.pg_cnn_solver.PgCnnSolver'>, 'env': <class 'solver.learning.pg_cnn.sub_env.SubEnv'>, 'type': 'r_learning'}
{'solver': <class 'solver.learning.pg_cnn2.solver.PgCnn2Solver'>, 'env': <class 'solver.learning.pg_cnn2.sub_env.SubEnv'>, 'type': 'r_learning'}
{'solver': <class 'solver.learning.a3c_gcn_seq2seq.solver.A3CGcnSeq2SeqSolver'>, 'env': <class 'base.environment.SolutionStepEnvironment'>, 'type': 'r_learning'}
请问这个bug如何解决?是否是因为solver.REGISTRY注册了旧的环境设置?谢谢!