Skip to content

Commit 92dc62b

Browse files
committed
fix ci
1 parent c6789d2 commit 92dc62b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

grid2op/Action/baseAction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4054,7 +4054,7 @@ def _aux_affect_object_int(
40544054
if self._names_chronics_to_backend is not None and _nm_ch_bk_key in self._names_chronics_to_backend:
40554055
# initial action to set the state, might use the name in the time series...
40564056
nms_conv = self._names_chronics_to_backend[_nm_ch_bk_key]
4057-
el_id_or_name = nms_conv[el_id_or_name]
4057+
el_id = nms_conv[el_id]
40584058
tmp = (name_els == el_id).nonzero()[0]
40594059
if len(tmp) == 0:
40604060
raise IllegalAction(f"No known {name_el} with name {el_id}")
@@ -4077,7 +4077,7 @@ def _aux_affect_object_int(
40774077
if self._names_chronics_to_backend is not None and _nm_ch_bk_key in self._names_chronics_to_backend:
40784078
# initial action to set the state, might use the name in the time series...
40794079
nms_conv = self._names_chronics_to_backend[_nm_ch_bk_key]
4080-
el_id_or_name = nms_conv[el_id_or_name]
4080+
key = nms_conv[key]
40814081
tmp = (name_els == key).nonzero()[0]
40824082
if len(tmp) == 0:
40834083
raise IllegalAction(f"No known {name_el} with name {key}")
@@ -5506,7 +5506,7 @@ def _aux_affect_object_float(
55065506
if self._names_chronics_to_backend is not None and _nm_ch_bk_key in self._names_chronics_to_backend:
55075507
# initial action to set the state, might use the name in the time series...
55085508
nms_conv = self._names_chronics_to_backend[_nm_ch_bk_key]
5509-
el_id_or_name = nms_conv[el_id_or_name]
5509+
key = nms_conv[key]
55105510
tmp = (name_els == key).nonzero()[0]
55115511
if len(tmp) == 0:
55125512
raise IllegalAction(f"No known {name_el} with name {key}")

grid2op/tests/test_action_set_orig_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _aux_make_step(self, act=None):
108108
return self.env.step(act)
109109

110110
def _aux_get_init_act(self):
111-
return self.env.chronics_handler.get_init_action()
111+
return self.env.chronics_handler.get_init_action(names_chronics_to_backend=self._names_ch_to_bk())
112112

113113
def _aux_get_act_valid(self):
114114
# check the action in the time series folder is valid

0 commit comments

Comments
 (0)