Skip to content

Commit

Permalink
fixing a bug preventing to load an environment when the layout is not…
Browse files Browse the repository at this point in the history
… correct
  • Loading branch information
BDonnot committed Oct 1, 2024
1 parent df61eaf commit 4b60e36
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Next release
- [FIXED] the `self.skip_if_needed()` was missing for one of the test suite.
- [FIXED] an error in the descirption of the `educ_case14_storage` environment
(wrong sign for the slack generator)
- [FIXED] the environment would not load in case of an incorrect "layout.json"
instead of raising a warning.
- [IMPROVED] error message when forecasts are not correctly set-up

[1.10.3] - 2024-07-12
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Benjamin Donnot'

# The full version, including alpha/beta/rc tags
release = '1.10.4.dev0'
release = '1.10.4.dev1'
version = '1.10'


Expand Down
6 changes: 4 additions & 2 deletions grid2op/MakeEnv/MakeFromPath.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,8 @@ def make_from_dataset_path(

# Set graph layout if not None and not an empty dict
if graph_layout is not None and graph_layout:
env.attach_layout(graph_layout)

try:
env.attach_layout(graph_layout)
except EnvError as exc_:
warnings.warn(f"Error {exc_} while setting the environment layout.")
return env
2 changes: 1 addition & 1 deletion grid2op/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Grid2Op
"""
__version__ = '1.10.4.dev0'
__version__ = '1.10.4.dev1'

__all__ = [
"Action",
Expand Down

0 comments on commit 4b60e36

Please sign in to comment.