thu-ml / tianshou

An elegant PyTorch deep reinforcement learning library.
https://tianshou.org
MIT License
7.95k stars 1.13k forks source link

BaseVectorEnv is not working when "lambda: gym.make(task) for _ in range(train_num)])" #285

Closed StevenJokess closed 3 years ago

StevenJokess commented 3 years ago

image

https://github.com/thu-ml/tianshou/blob/master/tianshou/env/venvs.py https://github.com/StevenJokess/d2l-en-read/blob/moreme/RL/tianshou-DQN.ipynb

image image image

Trinkle23897 commented 3 years ago

Sorry about that, I haven't updated this section. It is because we changed VectorEnv to DummyVectorEnv, and created an abstract class BaseVectorEnv to describe APIs. As you can see, BaseVectorEnv cannot work because all its methods are not implemented. I'll update it now. Thanks!

StevenJokess commented 3 years ago

If you use docs like http://preview.d2l.ai/d2l-en/master/chapter_linear-networks/softmax-regression-scratch.html, it will alarm you if you don't update.