Closed VisaCai closed 2 years ago
Hi, Sorry for the delay, but we have never seen the error you mention. I suspect there is some version incompatibility with the packages that you are using (in particular "gym"). Note that we did the development on Ubuntu 18.04 LTS, so if you are using a newer version problems like this can occur. Do let us know if you manage to find the cause of the problem. Best wishes, Razvan
Hi, Sorry for the delay, but we have never seen the error you mention. I suspect there is some version incompatibility with the packages that you are using (in particular "gym"). Note that we did the development on Ubuntu 18.04 LTS, so if you are using a newer version problems like this can occur. Do let us know if you manage to find the cause of the problem. Best wishes, Razvan
Yes, thank you for your support, the problem has been solved! I was using gym == 0.25.1 on Ubuntu 18.04 LTS before, now I turn the gym to version 0.23.1 and it worked.
AutoPentest-DRL: Compute attack path for logical network...
Generate attack graph using MulVAL...
Process attack graph into attack matrix...
Traceback (most recent call last):
File "./confirm_path.py", line 9, in np.float
was a deprecated alias for the builtin float
. To avoid this error in existing code, use float
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
/usr/local/lib/python3.8/dist-packages/torch/init__.py:690: UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, please use torch.set_default_dtype() and torch.set_default_device() as alternatives. (Triggered internally at ../torch/csrc/tensor/python_tensor.cpp:451.)
_C._set_default_tensor_type(t)
Conduct DQN training for up to 500 episodes...
AutoPentest-DRL: Optimal attack path was computed successfully (labels match 'mulval_result/AttackGraph.pdf') 26->24->17->16->15->13->10->9->8->6->5->4->3->2->1
Traceback (most recent call last):
File "./dqn_learn.py", line 262, in
Do you met the same question? How did you solve it?
sorry to bother you, I've solved the question above. Thanks.
@monabasa How did you solved? I also met same bugs.
hi everyone, Please help. Thank you!
The output is:
Process attack graph into attack matrix... Traceback (most recent call last): File "./dqn_learn.py", line 32, in
env = gym.make('dqnenv-v0')
File "/usr/local/lib/python3.7/dist-packages/gym/envs/registration.py", line 685, in make
env = PassiveEnvChecker(env)
File "/usr/local/lib/python3.7/dist-packages/gym/wrappers/env_checker.py", line 26, in init
), "The environment must specify an observation space. https://www.gymlibrary.ml/content/environment_creation/"
AssertionError: The environment must specify an observation space. https://www.gymlibrary.ml/content/environment_creation/