Skip to content

Commit

Permalink
solved #178 (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCN7 authored Mar 15, 2022
1 parent 0c02db3 commit 07ed0dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion sinergym/utils/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def _on_step(self) -> bool:
try:
action = self.locals['action'][-1]
except KeyError:
print('Algorithm action key in locals dict unknown')
try:
action = self.locals['actions'][-1]
except KeyError:
raise KeyError(
'Algorithm action key in locals dict unknown.')

if self.training_env.get_attr('flag_discrete')[0]:
action = self.training_env.get_attr('action_mapping')[0][action]
Expand Down
2 changes: 1 addition & 1 deletion sinergym/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.6
1.7.7

0 comments on commit 07ed0dd

Please sign in to comment.