GeminiLight / hrl-acra

[TSC'23 - HRL-ACRA] Implementation of our paper "Joint Admission Control and Resource Allocation of Virtual Network Embedding via Hierarchical Deep Reinforcement Learning", accepted by IEEE Transactions on Services Computing (TSC).
10 stars 0 forks source link

AttributeError: 'PhysicalNetwork' object has no attribute 'degree_benchmark'. Did you mean: 'get_degree_benchmark'? #3

Closed lpj12121 closed 4 months ago

lpj12121 commented 4 months ago

I want to use a real network to verify the baseline algorithm. I set file_path: './dataset/topology/Brain.gml' in p_net_setting.yaml. After running the command to test the baseline algorithm, the following error occurred.

* Generate virtual networks with seed 0 Running with a3c_gcn in epoch 0: 0%| | 0/1000 [00:00<?, ?it/s]Traceback (most recent call last): File "D:\hrl-acra-main\main.py", line 29, in run(config) File "D:\hrl-acra-main\main.py", line 16, in run scenario.run() File "D:\hrl-acra-main\base\scenario.py", line 94, in run solution = self.solver.solve(instance) File "D:\hrl-acra-main\solver\learning\rl_solver.py", line 101, in solve sub_env = self.SubEnv(p_net, v_net, self.controller, self.recorder, self.counter, self.basic_config) File "D:\hrl-acra-main\solver\learning\a3c_gcn\sub_env.py", line 10, in init super(SubEnv, self).init(p_net, v_net, controller, recorder, counter, kwargs) File "D:\hrl-acra-main\solver\learning\sub_rl_environment.py", line 127, in init super(JointPRStepSubRLEnv, self).init(p_net, v_net, controller, recorder, counter, kwargs) File "D:\hrl-acra-main\solver\learning\sub_rl_environment.py", line 19, in init super(SubRLEnv, self).init(**kwargs) File "D:\hrl-acra-main\solver\learning\rl_environment.py", line 23, in init self.degree_benchmark = self.p_net.degree_benchmark AttributeError: 'PhysicalNetwork' object has no attribute 'degree_benchmark'. Did you mean: 'get_degree_benchmark'?

Running is a3c_gcn.

What causes this?

GeminiLight commented 4 months ago

Please fix this issue by replacing degree_benchmark with get_degree_benchmark.

This may be attributed to the loading of an uninitialized Physical Network.

lpj12121 commented 4 months ago

Please fix this issue by replacing degree_benchmark with get_degree_benchmark.

This may be attributed to the loading of an uninitialized Physical Network.

Thank you very much, but I encountered a new problem, in issue 4