Skip to content

Commit

Permalink
fixing the script utils.py to properly generate the runner logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Nov 2, 2020
1 parent 2a6f5e4 commit 2c1d4e9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions utils/make_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,16 @@ def modify_and_push_docker(version, # grid2op version
import grid2op
from grid2op.Agent import RandomAgent
from grid2op.Runner import Runner
from grid2op.tests.helper_path_test import data_dir
PATH_PREVIOUS_RUNNER = os.path.join(data_dir, "runner_data")
env = grid2op.make("rte_case5_example", test=True)
runner = Runner(**env.get_params_for_runner(), agentClass=RandomAgent)
runner.run(nb_episode=2,
path_save=os.path.join(PATH_PREVIOUS_RUNNER, f"res_agent_{version}"),
pbar=True,
max_iter=100)
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore")
PATH_PREVIOUS_RUNNER = os.path.join(path, "grid2op", "data_test", "runner_data")
env = grid2op.make("rte_case5_example", test=True)
runner = Runner(**env.get_params_for_runner(), agentClass=RandomAgent)
runner.run(nb_episode=2,
path_save=os.path.join(PATH_PREVIOUS_RUNNER, f"res_agent_{version}"),
pbar=True,
max_iter=100)
# Stage in git
start_subprocess_print(["git", "add", f'{os.path.join(PATH_PREVIOUS_RUNNER, f"res_agent_{version}")}/*'])

Expand Down

0 comments on commit 2c1d4e9

Please sign in to comment.