Command Utils¶
Helpers for scripts like run_atari.py.
-
stable_baselines.common.cmd_util.
arg_parser
()[source]¶ Create an empty argparse.ArgumentParser.
Returns: (ArgumentParser)
-
stable_baselines.common.cmd_util.
atari_arg_parser
()[source]¶ Create an argparse.ArgumentParser for run_atari.py.
Returns: (ArgumentParser) parser {‘–env’: ‘BreakoutNoFrameskip-v4’, ‘–seed’: 0, ‘–num-timesteps’: int(1e7)}
-
stable_baselines.common.cmd_util.
make_atari_env
(env_id, num_env, seed, wrapper_kwargs=None, start_index=0, allow_early_resets=True, start_method=None)[source]¶ Create a wrapped, monitored SubprocVecEnv for Atari.
Parameters: - env_id – (str) the environment ID
- num_env – (int) the number of environment you wish to have in subprocesses
- seed – (int) the inital seed for RNG
- wrapper_kwargs – (dict) the parameters for wrap_deepmind function
- start_index – (int) start rank index
- allow_early_resets – (bool) allows early reset of the environment
- start_method – (str) method used to start the subprocesses. See SubprocVecEnv doc for more information
Returns: (Gym Environment) The atari environment
-
stable_baselines.common.cmd_util.
make_mujoco_env
(env_id, seed, allow_early_resets=True)[source]¶ Create a wrapped, monitored gym.Env for MuJoCo.
Parameters: - env_id – (str) the environment ID
- seed – (int) the inital seed for RNG
- allow_early_resets – (bool) allows early reset of the environment
Returns: (Gym Environment) The mujoco environment
-
stable_baselines.common.cmd_util.
make_robotics_env
(env_id, seed, rank=0, allow_early_resets=True)[source]¶ Create a wrapped, monitored gym.Env for MuJoCo.
Parameters: - env_id – (str) the environment ID
- seed – (int) the inital seed for RNG
- rank – (int) the rank of the environment (for logging)
- allow_early_resets – (bool) allows early reset of the environment
Returns: (Gym Environment) The robotic environment