Exemplo n.º 1
0
def run_baselines(env_id, seed, log_dir):
    '''
    Create baselines model and training.

    Replace the ppo and its training with the algorithm you want to run.

    :param env: Environment of the task.
    :param seed: Random seed for the trial.
    :param log_dir: Log dir path.
    :return
    '''
    launch_params = {
        'env': env_id,
        'logdir': log_dir,
        'n_epochs': params['n_epochs'],
        'num_cpu':
        1,  # For FetchReachEnv, the performance is not relevant to num_cpu
        'seed': seed,
        'policy_save_interval': 0,
        'replay_strategy': 'future',
        'clip_return': 1,
    }
    launch(**launch_params)

    return osp.join(log_dir, 'progress.csv')
Exemplo n.º 2
0
def run_baselines(env_id, seed, log_dir):
    """
    Create baselines model and training.

    Replace the ppo and its training with the algorithm you want to run.

    :param env: Environment of the task.
    :param seed: Random seed for the trail.
    :param log_dir: Log dir path.
    :return
    """
    launch_params = {
        "env": env_id,
        "logdir": log_dir,
        "n_epochs": params["n_epochs"],
        "num_cpu":
        1,  # For FetchReachEnv, the performance is not relevant to num_cpu
        "seed": seed,
        "policy_save_interval": 0,
        "replay_strategy": "future",
        "clip_return": 1,
    }
    launch(**launch_params)

    return osp.join(log_dir, "progress.csv")