- Refacor code to remove duplicate code - Enable async simulation for all vector envs - Remove `collector.close` and rename `VectorEnv` to `DummyVectorEnv` The abstraction of vector env changed. Prior to this pr, each vector env is almost independent. After this pr, each env is wrapped into a worker, and vector envs differ with their worker type. In fact, users can just use `BaseVectorEnv` with different workers, I keep `SubprocVectorEnv`, `ShmemVectorEnv` for backward compatibility. Co-authored-by: n+e <463003665@qq.com> Co-authored-by: magicly <magicly007@gmail.com>
14 lines
366 B
Python
14 lines
366 B
Python
from tianshou.env.venvs import BaseVectorEnv, DummyVectorEnv, VectorEnv, \
|
|
SubprocVectorEnv, ShmemVectorEnv, RayVectorEnv
|
|
from tianshou.env.maenv import MultiAgentEnv
|
|
|
|
__all__ = [
|
|
'BaseVectorEnv',
|
|
'DummyVectorEnv',
|
|
'VectorEnv', # TODO: remove in later version
|
|
'SubprocVectorEnv',
|
|
'ShmemVectorEnv',
|
|
'RayVectorEnv',
|
|
'MultiAgentEnv',
|
|
]
|