From f1f8470ed498039edc1ff156acb754b350bcd245 Mon Sep 17 00:00:00 2001 From: Antonin RAFFIN Date: Thu, 19 Dec 2019 00:59:24 +0100 Subject: [PATCH] Fix `VecEnv` docstrings (closes #577) --- docs/misc/changelog.rst | 1 + stable_baselines/common/vec_env/dummy_vec_env.py | 3 ++- stable_baselines/common/vec_env/subproc_vec_env.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index a5eb151818..251093cca3 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -63,6 +63,7 @@ Others: - Minor PEP8 fixes in dqn.py (@justinkterry) - Add a message to the assert in `PPO2` - Update replay buffer doctring +- Fix `VecEnv` docstrings Documentation: ^^^^^^^^^^^^^^ diff --git a/stable_baselines/common/vec_env/dummy_vec_env.py b/stable_baselines/common/vec_env/dummy_vec_env.py index c5ee1d7def..6611dd44f0 100644 --- a/stable_baselines/common/vec_env/dummy_vec_env.py +++ b/stable_baselines/common/vec_env/dummy_vec_env.py @@ -12,7 +12,8 @@ class DummyVecEnv(VecEnv): multiprocess or multithread outweighs the environment computation time. This can also be used for RL methods that require a vectorized environment, but that you want a single environments to train with. - :param env_fns: ([Gym Environment]) the list of environments to vectorize + :param env_fns: ([callable]) A list of functions that will create the environments + (each callable return a `Gym.Env` instance when called). """ def __init__(self, env_fns): diff --git a/stable_baselines/common/vec_env/subproc_vec_env.py b/stable_baselines/common/vec_env/subproc_vec_env.py index 0fc3aae84b..23df17c80e 100644 --- a/stable_baselines/common/vec_env/subproc_vec_env.py +++ b/stable_baselines/common/vec_env/subproc_vec_env.py @@ -62,7 +62,8 @@ class SubprocVecEnv(VecEnv): ``if __name__ == "__main__":`` block. For more information, see the multiprocessing documentation. - :param env_fns: ([Gym Environment]) Environments to run in subprocesses + :param env_fns: ([callable]) A list of functions that will create the environments + (each callable return a `Gym.Env` instance when called). :param start_method: (str) method used to start the subprocesses. Must be one of the methods returned by multiprocessing.get_all_start_methods(). Defaults to 'forkserver' on available platforms, and 'spawn' otherwise.