Grid2op

Latest version: v1.10.5

Safety actively analyzes 702445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 11

1.9.7

----------------------
- [BREAKING] removal of the `grid2op/Exceptions/PowerflowExceptions.py` file and move the
`DivergingPowerflow` as part of the BackendException. If you imported (to be avoided)
with `from grid2op.Exceptions.PowerflowExceptions import PowerflowExceptions`
simply do `from grid2op.Exceptions import PowerflowExceptions` and nothing
will change.
- [BREAKING] rename with filename starting with lowercase all the files in the "`Exceptions`",
module. This is both consistent with python practice but allows also to make the
difference between the files in the
module and the class imported. This should have little to no impact on all codes but to "upgrade"
instead of `from grid2op.Exceptions.XXX import PowerflowExceptions` (which you should not have done in the first place)
just do `from grid2op.Exceptions import PowerflowExceptions`. Expect other changes like this for other grid2op modules
in the near future.
- [BREAKING] change the `gridobj_cls.shape()` and `gridobj_cls.dtype()` to `gridobj_cls.shapes()` and `gridobj_cls.dtypes()`
to be more clear when dealing with action_space and observation_space (where `shape` and `dtype` are attribute and not functions)
This change means you can still use `act.shape()` and `act.dtype()` but that `act_space.shape` and `act_space.dtype` are now
clearly properties (and NOT attribute). For the old function `gridobj_cls.dtype()` you can now use `gridobj_cls.dtypes()`
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/561 (indent issue)
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/550 : issue with `shunts_data_available` now better handled
- [IMPROVED] the function to check the backend interface now also check that
the `topo_vect` returns value between 1 and 2.
- [IMPROVED] the function to check backend now also check the `topo_vect`
for each type of elements.

1.9.6

----------------------
- [BREAKING] when a storage is connected alone on a bus, even if it produces / absorbs 0.0 MW it
will raise a diverging powerflow error (previously the storage was automatically disconnected by
`PandaPowerBackend`, but probably not by other backends)
- [BREAKING] when a shunt is alone on a bus, the powerflow will diverge even in DC mode
(previously it only converges which was wrong behaviour: grid2op should not disconnect shunt)
- [FIXED] a bug in PandaPowerBackend (DC mode) where isolated load did not raised
exception (they should lead to a divergence)
- [FIXED] some wrong behaviour in the `remove_line_status_from_topo` when no observation where provided
and `check_cooldown` is `False`
- [FIXED] a bug in PandaPowerBackend in AC powerflow: disconnected storage unit had no 0. as voltage
- [FIXED] a bug in PandaPowerBackend in AC powerflow when a generator was alone a bus it made the powerflow
crash on some cases (*eg* without lightsim2grid, without numba)
- [FIXED] a bug in PandaPowerBackend in DC (in some cases non connected grid were not spotted)
- [FIXED] now the observations once reloaded have the correct `_is_done` flag (`obs._is_done = False`)
which allows to use the `obs.get_energy_graph()` for example. This fixes https://github.com/Grid2Op/grid2op/issues/538
- [ADDED] now depends on the `typing_extensions` package
- [ADDED] a complete test suite to help people develop new backend using "Test Driven Programming"
techniques
- [ADDED] the information on which time series data has been used by the environment in the `info`return value
of `env.step(...)`
- [ADDED] a test suite easy to set up to test the backend API (and only the backend for now, integration tests with
runner and environment will follow)
- [ADDED] an attribute of the backend to specify which file extension can be processed by it. Environment creation will
fail if none are found. See `backend.supported_grid_format` see https://github.com/Grid2Op/grid2op/issues/429
- [IMPROVED] now easier than ever to run the grid2op test suite with a new backend (for relevant tests)
- [IMPROVED] type hints for `Backend` and `PandapowerBackend`
- [IMPROVED] distribute python 3.12 wheel
- [IMPROVED] test for python 3.12 and numpy 1.26 when appropriate (*eg* when numpy version is released)
- [IMPROVED] handling of environments without shunts
- [IMPROVED] error messages when grid is not consistent
- [IMPROVED] add the default `l2rpn_case14_sandbox` environment in all part of the docs (substituing `rte_case14_realistic` or nothing)
- [IMPROVED] imports on the `Exceptions` module
- [IMPROVED] pandapower backend raises `BackendError` when "diverging"

1.9.5

---------------------
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/518
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/446
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/523 by having a "_BackendAction" folder instead of a file
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/522 and adding back certain notebooks to the CI
- [FIXED] an issue when disconnecting loads / generators on msot recent pandas version
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/527 : now do nothing action are detected in
`act.as_serializable_dict()` AND weird do nothing action can be made through the action space
(`env.action_space({"change_bus": {}})` is not ambiguous, though might not be super efficient...)

1.9.4

---------------------
- [FIXED] read-the-docs template is not compatible with latest sphinx version (7.0.0)
see https://github.com/readthedocs/sphinx_rtd_theme/issues/1463
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/511
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/508
- [ADDED] some classes that can be used to reproduce exactly what happened in a previously run environment
see `grid2op.Chronics.FromOneEpisodeData` and `grid2op.Opponent.FromEpisodeDataOpponent`
and `grid2op.Chronics.FromMultiEpisodeData`
- [ADDED] An helper function to get the kwargs to disable the opponent (see `grid2op.Opponent.get_kwargs_no_opponent()`)
- [IMPROVED] doc of `obs.to_dict` and `obs.to_json` (see https://github.com/Grid2Op/grid2op/issues/509)

1.9.3

---------------------
- [BREAKING] the "chronix2grid" dependency now points to chronix2grid and not to the right branch
this might cause an issue if you install `grid2op[chronix2grid]` for the short term
- [BREAKING] force key-word arguments in `grid2op.make` except for the first one (env name), see
[rte-france503](https://github.com/Grid2Op/grid2op/issues/503)
- [FIXED] a bug preventing to use storage units in "sim2real" environment (when the
grid for forecast is not the same as the grid for the environment)
- [ADDED] a CI to test package can be installed and loaded correctly on windows, macos and line_ex_to_sub_pos
for python 3.8, 3.9, 3.10 and 3.11
- [ADDED] possibility to change the "soft_overflow_threshold" in the parameters (like
the "hard_overflow_threshold" but for delayed protections).
See `param.SOFT_OVERFLOW_THRESHOLD`
- [ADDED] the `gym_env.observation_space.get_index(attr_nm)` for `BoxGymObsSpace` that allows to retrieve which index
of the observation represents which attribute.

1.9.2

---------------------
- [BREAKING] rename with filename starting with lowercase all the files in the "`Backend`", "`Action`" and
"`Environment`" modules. This is both consistent with python practice but allows also to make the
difference between the files in the
module and the class imported. This should have little to no impact on all codes but to "upgrade"
instead of `from grid2op.Action.BaseAction import BaseAction` (which you should not have done in the first place)
just do `from grid2op.Action import BaseAction`. Expect other changes like this for other grid2op modules
in the near future.
- [FIXED] broken environ "l2rpn_idf_2023" (with test=True) due to the presence of a `__pycache__` folder
- [FIXED] time series `MultiFolder` will now ignore folder `__pycache__`
- [FIXED] an issue with compatibility with previous versions (due to alert)
- [FIXED] an issue with the `_ObsEnv` when using reward that could not be used in forecast (`self.is_simulated_env()`
was not working as expected due to a wrong init of the reward in `_ObsEnv`)
- [FIXED] an issue when disconnecting loads / generators / storage units and changing their values in the same
action: the behaviour could depend on the backend. As of 1.9.2 the "disconnections" have the priority (if
an action disconnect an element, it will not change its sepoint at the same time).
- [FIXED] a bug in `AlertReward` due to `reset` not being called.
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/494
- [ADDED] the score function used for the L2RPN 2023 competition (Paris Area)
- [IMPROVED] overall performances by calling `arr.sum()` or `arr.any()` instead of `np.sum(arr)` or
`np.any(arr)` see https://numpy.org/neps/nep-0018-array-function-protocol.html#performance
- [IMPROVED] overall performance of `obs.simulate` function by improving speed of copy of `_BackendAction`
- [IMPROVED] overall performance of `env.step` / `obs.simulate` by preventing unnecessary observation deep copy
- [IMPROVED] overall performance of `env.step` / `obs.simulate` by switching to `copy.deepcopy(obs)` instead of
`obs.copy()`

Page 2 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.