Skip to content

Commit

Permalink
scripts: Fixed env name in JSON and deleted MOnitor wrap and fixed ev…
Browse files Browse the repository at this point in the history
…al freq timesteps in train script
  • Loading branch information
AlejandroCN7 committed Aug 3, 2023
1 parent 01acb85 commit 994a1cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions scripts/train_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
env = gym.make(
conf['environment'],
** env_params)
env = Monitor(env)

# env for evaluation if is enabled
eval_env = None
Expand All @@ -111,7 +110,6 @@
eval_env = gym.make(
conf['environment'],
** env_params)
eval_env = Monitor(eval_env)

# ---------------------------------------------------------------------------- #
# Wrappers #
Expand Down Expand Up @@ -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'])
Expand Down
4 changes: 2 additions & 2 deletions scripts/train_agent_example.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -52,7 +52,7 @@
},
"evaluation": {
"eval_freq": 2,
"eval_length": 1
"eval_length": 2
},
"wandb": {
"init_params": {
Expand Down

0 comments on commit 994a1cd

Please sign in to comment.