baselines/common/cmd_util.py
def make_mujoco_env(env_id, seed, reward_scale=1.0):
    """
    Create a wrapped, monitored gym.Env for MuJoCo.
    """
    rank = MPI.COMM_WORLD.Get_rank()
    myseed = seed  + 1000 * rank if seed is not None else None
    set_global_seeds(myseed)
    env = gym.make(env_id)
    logger_path = None if logger.get_dir() is None else os.path.join(logger.get_dir(), str(rank))
    env = Monitor(env, logger_path, allow_early_resets=True)
    env.seed(seed)
    if reward_scale != 1.0:
        from baselines.common.retro_wrappers import RewardScaler
        env = RewardScaler(env, reward_scale)
    return env
def make_mujoco_env(env_id, seed, reward_scale=1.0):
    """
    Create a wrapped, monitored gym.Env for MuJoCo.
    """
    rank = MPI.COMM_WORLD.Get_rank()
    myseed = seed  + 1000 * rank if seed is not None else None
    set_global_seeds(myseed)
    env = gym.make(env_id)
    logger_path = None if logger.get_dir() is None else os.path.join(logger.get_dir(), str(rank))
    env = Monitor(env, logger_path, allow_early_resets=True)
    env.seed(seed)
    if reward_scale != 1.0:
        from baselines.common.retro_wrappers import RewardScaler
        env = RewardScaler(env, reward_scale)
    return env
def make_mujoco_env ( env_id , seed , reward_scale = 1.0 ) : rank = MPI . COMM_WORLD . Get_rank ( ) myseed = seed + 1000 * rank if seed is not None else None set_global_seeds ( myseed ) env = gym . make ( env_id ) logger_path = None if logger . get_dir ( ) is None else os . path . join ( logger . get_dir ( ) , str ( rank ) ) env = Monitor ( env , logger_path , allow_early_resets = True ) env . seed ( seed ) if reward_scale != 1.0 : from baselines . common . retro_wrappers import RewardScaler env = RewardScaler ( env , reward_scale ) return env
Create a wrapped, monitored gym.Env for MuJoCo.
Create a wrapped monitored gym . Env for MuJoCo .