From 994a1cd33bd7fa0616e4e242cee0bd77fabf34d6 Mon Sep 17 00:00:00 2001 From: AlejandroCN7 Date: Thu, 3 Aug 2023 13:11:11 +0000 Subject: [PATCH] scripts: Fixed env name in JSON and deleted MOnitor wrap and fixed eval freq timesteps in train script --- scripts/train_agent.py | 4 +--- scripts/train_agent_example.json | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/train_agent.py b/scripts/train_agent.py index da20ca128d..69d541fad8 100644 --- a/scripts/train_agent.py +++ b/scripts/train_agent.py @@ -101,7 +101,6 @@ env = gym.make( conf['environment'], ** env_params) - env = Monitor(env) # env for evaluation if is enabled eval_env = None @@ -111,7 +110,6 @@ eval_env = gym.make( conf['environment'], ** env_params) - eval_env = Monitor(eval_env) # ---------------------------------------------------------------------------- # # Wrappers # @@ -241,7 +239,7 @@ log_path=eval_env.experiment_path + '/best_model/', eval_freq=(eval_env.timestep_per_episode - 1) * - conf['evaluation']['eval_freq'], + conf['evaluation']['eval_freq'] - 1, deterministic=True, render=False, n_eval_episodes=conf['evaluation']['eval_length']) diff --git a/scripts/train_agent_example.json b/scripts/train_agent_example.json index fba15d6f56..c04d90de01 100644 --- a/scripts/train_agent_example.json +++ b/scripts/train_agent_example.json @@ -1,6 +1,6 @@ { "id": "ExperimentExample", - "environment": "Eplus-5Zone-hot-continuous-stochastic-v1", + "environment": "Eplus-5zone-hot-continuous-stochastic-v1", "episodes": 5, "algorithm": { "name": "SB3-PPO", @@ -52,7 +52,7 @@ }, "evaluation": { "eval_freq": 2, - "eval_length": 1 + "eval_length": 2 }, "wandb": { "init_params": {