Hi, thank you for maintaining this repo, it's great! I'm experiencing a small problem with the visual render. When I use env.close() on a DummyVecEnv object to free up the environment resources, the render window is not closed.
If I do the same with the Gym env object the render window closes.
env.envs[0].close() does work.
stable-baselines==2.4.0
tensorboard==1.12.2
tensorflow==1.12.0
No GPU, Ubuntu 18.04 lts.
Hello,
Looks like a bug, thanks for reporting it.
Looking at the code, it seems that close() method does not do anything...
https://github.com/hill-a/stable-baselines/blob/master/stable_baselines/common/vec_env/dummy_vec_env.py#L61
Hello, its easy to fix this bug
You can modify the close() which in dummy_vec_env.py
def close(self):
self.envs[0].close()
I believe it works. @araffin @ClonedOne
Sorry got distracted doing other stuff. Yes as @sxwgit said it is really easy to fix, either
for env in self.envs: env.close()
or
self.envs[0].close() will work.
Btw I've run the test with for env in self.envs: env.close() and it doesn't seem to break anything
I reopen it until #206 is merged ;) (so it is clear when the issue is really fixed)
Most helpful comment
I reopen it until #206 is merged ;) (so it is clear when the issue is really fixed)