From ec6e198cdb2c1b99d99a86779169d8438520c176 Mon Sep 17 00:00:00 2001 From: marota Date: Wed, 16 Jun 2021 10:46:55 +0200 Subject: [PATCH] Update ExpertAgent.py compatibility with Grid2Op which now expect topological actions to be array of int --- l2rpn_baselines/ExpertAgent/ExpertAgent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2rpn_baselines/ExpertAgent/ExpertAgent.py b/l2rpn_baselines/ExpertAgent/ExpertAgent.py index f501830..cfce4cc 100644 --- a/l2rpn_baselines/ExpertAgent/ExpertAgent.py +++ b/l2rpn_baselines/ExpertAgent/ExpertAgent.py @@ -265,7 +265,7 @@ def reco_line(self, observation): # for a substation we get the reference topology action def reference_topology_sub_action(self, observation, sub_id): topo_vec_sub = observation.state_of(substation_id=sub_id)['topo_vect'] - topo_target = list(np.ones(len(topo_vec_sub))) + topo_target = list(np.ones(len(topo_vec_sub)).astype('int')) action_def = {"set_bus": {"substations_id": [(sub_id, topo_target)]}} action = self.action_space(action_def) return action