trying to visualize the example model
abrsvn opened this issue · 3 comments
abrsvn commented
Hi Lucas,
I just installed gym-minigrid and torch-ac, cloned this repo and tried to run through the basic example in the README, but I get an error when I try visualizing. The training works fine:
python3 -m scripts.train --algo ppo --env MiniGrid-DoorKey-5x5-v0 --model DoorKey --save-interval 10 --frames 80000
[...]
U 40 | F 081920 | FPS 2519 | D 29 | rR:μσmM 0.93 0.02 0.87 0.97 | F:μσmM 19.3 6.4 8.0 35.0 | H 1.344 | V 0.840 | pL -0.001 | vL 0.001 | ∇ 0.028
Status saved
However, when I try to visualize it, I get the following error:
python3 -m scripts.visualize --env MiniGrid-DoorKey-5x5-v0 --model DoorKey
Device: cuda
Environment loaded
Agent loaded
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "[...]/rl-starter-files/scripts/visualize.py", line 71, in <module>
if renderer.window is None:
AttributeError: 'numpy.ndarray' object has no attribute 'window'
Do you have any suggestions? Thanks a lot!
-Adrian
maximecb commented
I just created a pull request fixing this issue. @lcswillems can you merge it when you have a chance?
Happy Holidays 🎅
lcswillems commented
@maximecb It seems you have not created the PR yet. Am I wrong?
Thank you! Happy Holidays too!