Skip to content

Commit

Permalink
fixing broken test for the Runner - bad import
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Jun 4, 2021
1 parent ea9c09c commit 53cfa3d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Change Log
than just boolean.
- [BREAKING] now the observation stores the information related to shunts by default. This means old logs computed with
the runner might not work with this new version.
- [BREAKING] the "Runner.py" file has been renamed, following pep convention "runner.py". You should rename your
import `from grid2op.Runner.Runner import Runner` to `from grid2op.Runner.runner import Runner`
(**NB** we higly recommend importing the `Runner` like `from grid2op.Runner import Runner` though !)
- [FIXED]: some bugs in the `action_space.get_all_unitary_redispatch` and `action_space.get_all_unitary_curtail`
- [FIXED]: some bugs in the `GreedyAgent` and `TopologyGreedy`
- [ADDED] support for the "alarm operator" / "attention budget" feature
Expand Down
1 change: 1 addition & 0 deletions grid2op/tests/test_AlarmFeature.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def test_runner(self):
ep_dat = EpisodeData.from_disk(agent_path=f, name=res[0][1])
assert len(ep_dat) == 10
assert ep_dat.observations[0].attention_budget == 3
assert ep_dat.observations[1].attention_budget == 3 + 1. / (12. * 8.)

def test_kwargs(self):
"""test the get_kwargs function properly foward the attention budget"""
Expand Down
2 changes: 1 addition & 1 deletion grid2op/tests/test_Runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from grid2op.Reward import L2RPNReward
from grid2op.Backend import PandaPowerBackend
from grid2op.MakeEnv import make
from grid2op.Runner.Runner import _aux_one_process_parrallel
from grid2op.Runner.aux_fun import _aux_one_process_parrallel
from grid2op.Runner import Runner
from grid2op.dtypes import dt_float
from grid2op.Agent import RandomAgent
Expand Down
3 changes: 0 additions & 3 deletions grid2op/tests/test_RunnerFast.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
PATH_PREVIOUS_RUNNER = os.path.join(data_dir, "runner_data")

import grid2op
from grid2op.Chronics import Multifolder
from grid2op.Reward import L2RPNReward
from grid2op.Backend import PandaPowerBackend
from grid2op.MakeEnv import make
from grid2op.Runner import Runner
from grid2op.dtypes import dt_float
Expand Down

0 comments on commit 53cfa3d

Please sign in to comment.