Releases: Grid2op/grid2op
Release: 1.12.4
- [BREAKING] the behaviour of grid2op environment when ENV_DOES_REDISPATCHING
flag is turned on is changed and is now exactly the one
described in the doc (before it completly skipped the redispathcing / curtailment
storage) - [FIXED] copy on write issues in PandaPowerBackend
- [FIXED] a bug causing Grid2op/lightsim2grid#128
- [FIXED] some warnings in the docstrings (escaped character)
- [FIXED] some issues spotted by sonarcloud (especially attribute names)
- [FIXED] doc about the ENV_DOES_REDISPATCHING parameters. see issue
#752 - [ADDED] some tests that modification of load_p (for one load) only change this load
(same for load_q and gen_v) - [IMPROVED] security in the way episode statistics are saved (to prevent malicious
tempering with path) - [IMPROVED] use df.to_numpy() instead of df.values when df is a pandas dataframe
- [IMPROVED] grid2op parameters now uses "slots" to avoid setting incorrect values
not used by grid2op.
Release: 1.12.3
[1.12.3] - 2026-02-04
- [FIXED] the warnings when building the documentation.
- [FIXED] the deprecation warnings when importing grid2op
with recent python versions (due to presence of math equation
in some docstring) - [FIXED] issues when loading a grid with disconnected elements: grid2op
did not know on which bus to reconnect them when only the "reconnect" bus was given. - [FIXED] an issue leading to wrong setpoint values for shunt_p and shunt_q in the previous
stored state (EnvPreviousState) - [FIXED] a wrong type hints in
_aux_check_finite_floatof Backend (in Backend.py) - [ADDED] a test (in the AAA test) to assess that the backend._sh_vnkv is properly set if the shunts are
handled by the backend. - [IMPROVED] code for AAA backend tests (avoid equality check for float)
- [IMPROVED] doc when loading grid with disconnected elements
Release: 1.12.2
- [FIXED] an issue preventing to change the way
the voltages are set - [FIXED] a test when using gymnasium>= 1.2.1 (AsynchVectEnv)
- [ADDED] a convenience class to allow agent to override
voltage setpoint from provided time seies (VCFromFileAgentOverrides)
Release: 1.12.1
Changelog
- [BREAKING] (small impact) action "property"
shunt_p,shunt_qandshunt_bus
are now named_shunt_p,_shunt_qand_shunt_bus. - [BREAKING] (small impact): new convention for
env._gen_uptimeand
env._gen_downtime: if a generatorgen_idis disconnected, then
env._gen_uptime[gen_id] = -1and if it is connected, then
env._gen_downtime[gen_id] = -1 - [BREAKING] (small impact): new convention for
env._gen_uptimeand
env._gen_downtime: they are 0 (and not 1) at the initial observation
(env._gen_uptimeis 0 after the env.reset for connected generator and
still -1 - see point above- for disconnected ones) - [FIXED] when using the default action converter from gym_compat module,
it only generates actions that can be performed by the user (authorized by
the rules and the action class) - [FIXED]
env._gen_uptimeandenv._gen_downtimeare now properly updated
after a generator has been detached from the grid. - [ADDED] the possibility to act on the backend directly from the action
with the "act." - [ADDED] set
pandas<3in the dependencies, to make sure PandapowerBackend
still work (ChainedAssignmentError still occur) - [IMPROVED] some pandas
ChainedAssignmentErrorwarning in pandapower backend
(more work is required in this direction) - [IMPROVED] consistency between AmbiguousAction and IllegalAction exceptions:
when an action cannot be built, it is ambiguous now and not illegal. - [IMPROVED] cleaner installation, relying only on "pyproject.toml"
- [IMPROVED] documentation of "how to create a new grid2op observation"
having different attributes. - [IMPROVED] documentation of the "action" class
- [IMPROVED] computation speed, especially in cases of "do nothing"
- [IMPROVED] if the same action is used multiple times, the "is_ambiguous()"
method will be computed only once (results will be cached). - [IMPROVED] computation times at various places (eg by avoiding unnecessary copies)
Processing time improvment
With python 3.11 on a laptop, by running :
python profiler_do_nothing.py --use_ls --no_test --name l2rpn_case14_sandbox
python profiler_do_nothing.py --use_ls --no_test --name l2rpn_idf_2023
for different grid2op version, the results (number of steps per second) are:
| grid2op version | ieee14 | ieee118 |
|---|---|---|
| 1.9.8 | 1720 | 1150 |
| 1.10.5.post1 | 1700 | 1170 |
| 1.11.0 | 810 | 250 |
| 1.12.0 | 882 | 250 |
| 1.12.1 | 1780 | 1220 |
Release: 1.12.0
- [BREAKING] the
inforeturned argument ofenv.step(...)function
does not have the unclearis_redispatching_illegalkey. This key has been
replaced (without any change to its signification) withfailed_redispatching - [FIXED] issue 713
- [FIXED] pandapower 3 compatibility
- [ADDED] compatibility with numpy 2, scipy >= 1.14 and python 3.13
- [ADDED] some examples showing how grid2op can be use to solve some specific
kind of problem (related to N-1 safety and phase shift transformer). - [IMPROVED] clarity of the
failed_redispatchingkey of theinforeturned value
of theenv.stepfunction (previously calledis_redispatching_illegalwhich
was not clear) - [IMPROVED] way to load back class stored in json format
- [IMPROVED] the way the Observation class can be overriden
Release: 1.11.0
This is rather large release, including (but not limited too):
A whole new feature: it is now possible to continue an episode if a load or a generator is disconnected by an Agent (this is called detachement) This feature is disabled by default, unless the kwargs allow_detachment=True is passed when an environment is created). This comes with added action and observation attributes.
Different bugfixes, including some for the "protections" module and the SOFT_OVERFLOW_THRESHOLD parameters.
The ability to tell an environment not to perform redispatching and let either the Agent take care of it (if the agent actions is correct) or the Environment (in case the action does not lead to an equilibrium)
And some quality of life feature, for example being able to retrieve information about objects based on their names or ids, some methods are now correctly spelled (eg check_kirchoff) or improved type hinting.
Full changes are:
- [BREAKING] Change for
FromMultiEpisodeDatathat disables the caching by default
when creating the data. - [BREAKING] deprecation of
backend.check_kirchoffin favor ofbackend.check_kirchhoff
(fix the typo in the name) - [BREAKING] change the name of the generated classes: now by default the backend class
name is added. This behaviour can be turned off by passing_add_cls_nm_bk=False
when callinggrid2op.make(...). If you develop a new Backend, you can also
customize the added name by overloading theget_class_added_nameclass method. - [BREAKING] it is now forbidden to create environment with arguments.
Only key-word arguments are allowed. - [BREAKING] the way actions is serialized has been changed with respect to the
from_vect/
to_vectmethod. This might introduce some issues when loading previously saved actions
with this methods. - [BREAKING] first kwargs of
backend.apply_actionmethod is now spelledbackend_action
(instead of backendAction) - [BREAKING] (not yet) rationalization of the backend public / private API part. The
environment (and simulator, forecast env etc.) will always call the method_public
for exampleload_grid_public,reset_public,copy_publicandapply_action_public.
These function of the baseBackendshould NOT be overriden, and will internally call
the functionsload_grid,reset,copyandapply_actionwhich were part of the public
API. These last member functions will be renamed (in a later version)_load_grid,
_reset,_copyand_apply_actionto reflect this change. NOT for this version however ! - [BREAKING] removal of the
rest_servergrid2op module (it will be release as a separate package instead)
It has been removed from grid2op core package for securtiy reasons. - [FIXED] issue #657
- [FIXED] missing an import on the
MaskedEnvironmentclass - [FIXED] a bug when trying to set the load_p, load_q, gen_p, gen_v by names.
- [FIXED] the
obs.get_forecast_env: in some cases the resulting first
observation (obtained fromfor_env.reset()) did not have the correct
topology. - [FIXED] issue #665 (
obs.reset()
was not correctly implemented: some attributes were forgotten) - [FIXED] issue #667 (
act.as_serializable_dict()
was not correctly implemented AND the_aux_affect_object_intand_aux_affect_object_float
have been also fixed - weird behaviour when you give them a list with the exact length of the
object you tried to modified (for example a list with a size ofn_loadthat affected the loads)) - [FIXED] a bug when using the
DoNothingHandlerfor the maintenance and the
environment data - [FIXED] an issue preventing to set the thermal limit in the options
if the last simulated action lead to a game over - [FIXED] some bugs in
act.from_json(...)due to the handling of the injection modifications. - [FIXED] logos now have the correct URL
- [FIXED] deprecated call to
tostring_rgb(replacedtostring_argb) in the env.render function. - [FIXED] warnings not properly issued in the AAA test when backend failed to call
can_handle_XXXfunctions (egcan_handle_more_than_2_busbar()orcan_handle_detachment()) - [FIXED] an issue with
obs.get_forecast_envwith changeNothing and DoNothingHandler time series - [FIXED] a bug in updating the shunt in PandaPowerBackend (depdending on pandas version)
- [FIXED] a bug when action that reconnect loads, storage units or shunts are done
in the "obs.simulate" (results could depend from previous "obs.simulate" calls) - [FIXED] a bug in "obs.simulate" and "obs.get_forecast_env" : when a line was disconnected
and the user tried to reconnect it (without specifying on which bus) it could do something
different than "env.step" (with the same action) - [FIXED] a powerflow is run when the environment is first created even before the initial "env.step"
function is called. This is to ensure proper behaviour if env is used without being reset. - [FIXED] no error was catched if the backend could not properly apply the action sent by the environment.
- [FIXED] an issue in the AAA tests: when backend does not support storages, some tests were skipped not correctly
- [FIXED] an issue when computing the cascading failure routine, in case multiple iterations were performed,
the cooldowns were not updated correctly. - [FIXED] cascading failure could be started at the first observation (t=0, just after a reset).
- [FIXED] a bug when "SOFT_OVERFLOW_THRESHOLD" was not 1.: it also impacted "instantaneous overcurrent protections"
(it was triggered whenflow > SOFT_OVERFLOW_THRESHOLD * HARD_OVERFLOW_THRESHOLD * th_lim) - [FIXED] a bug when "SOFT_OVERFLOW_THRESHOLD" was not 1.: the backend routine to compute the protections
disconnected the lines with a counter based onflow > th_limand notflow > th_lim * SOFT_OVERFLOW_THRESHOLD - [ADDED] Possibility to disconnect loads, generators and storage units (if proper flag set in the environment).
See documentation. - [ADDED] possibility to set the "thermal limits" when calling
env.reset(..., options={"thermal limit": xxx}) - [ADDED] possibility to retrieve some structural information about elements with
withgridobj.get_line_info(...),gridobj.get_load_info(...),gridobj.get_gen_info(...)
or ,gridobj.get_storage_info(...) - [ADDED] codacy badge on the readme
- [ADDED] a method to check the KCL (
obs.check_kirchhoff) directly from the observation
(previously it was only possible to do it from the backend). This should
be used for testing purpose only - [ADDED] parameters to disable the "redispatching routine" of the environment
(seeparams.ENV_DOES_REDISPATCHING) - [ADDED] parameters to stop the episode when one of the constraints of one of the
generators is not met (seeparams.STOP_EP_IF_SLACK_BREAK_CONSTRAINTS) - [ADDED] possibility to set the initial time stamp of the observation in the
env.reset
kwargs by usingenv.reset(..., options={"init datetime": XXX}) - [ADDED] the
ChangeNothingtime series class now supports forecast - [ADDED] test coverage on the CI
- [ADDED] the
obs.timestep_protection_triggeredcounter which counts whether or not the
"time overcurrent protection" (soft overflow) will be triggered: lines will be disconnected
iftime overcurrent protection > parameters.NB_TIMESTEP_POWERFLOW_ALLOWED - [IMPROVED] possibility to set the injections values with names
to be consistent with other way to set the actions (eg set_bus) - [IMPROVED] error messages when creating an action which changes the injections
- [IMPROVED] (linked to #657) the way the
"chronics_hander" in the ObsEnv behaves (it now fully implements the public interface of
a "real" chronic_handler) - [IMPROVED] error message in the
FromNPYclass when the backend is checked - [IMRPOVED] the
FromMultiEpisodeDataclass with the addition of thecaching
kwargs to allow / disable caching (which was default behavior in previous version) - [IMPROVED] the
FromMultiEpisodeDataclass that now returns also the path of the data - [IMPROVED] the classes inherited from
GreedyAgentwith the added possibility to
do theobs.simulateon a different time horizon (kwargsimulated_time_step) - [IMPROVED] some type hints for some agent class
- [IMPROVED] the
backend.update_from_obsfunction to work even when observation
does not have shunt information but there are not shunts on the grid. - [IMPROVED] consistency of
MultiMixEnvin case of automatic_classes (only one
class is generated for all mixes) - [IMRPOVED] handling of disconnected elements in the backend no more
raise error. The baseBackendclass does that. - [IMPROVED] the
act.as_serializable_dict()to be more 'backend agnostic'as
it nows tries to use the name of the elements in the json output - [IMPROVED] the way shunt data are digested in the
BaseActionclass (it is now
possible to use the same things as for the other types of element) - [IMPROVED] grid2op does not require the
chronicsfolder when using theFromHandlers
class - [IMPROVED] the function
action.get_topological_impact(...)has now a "caching" mechanism
that allows not to recompute it over and over again (this is internal API please do not change
it... unless you know what you are doing) - [IMPROVED]
ForecastEnvis now part of the public API. - [IMPROVED] no need to call
self._compute_pos_big_top()at the end of the implementation ofbackend.load_grid() - [IMPROVED] type hints in various files.
- [IMPROVED] documentation of the backend
- [IMRPOVED]
SOFT_OVERFLOW_THRESHOLDcan now be lower than 1
Pre release: 1.11.0.dev4
Pre release that robustifies the "detachment" feature.
Release v1.10.5
- [FIXED] new pypi link (no change in code)
- [FIXED] mybinder environment
- [FIXED] update all the links in the README.md (for the new grid2op location)
- [FIXED] update all the links in the docs and the grid2op source files
(to match new location: Grid2op/grid2op.git) - [FIXED] the link in the
make_envandupdate_envto point to
https://api.github.com/repos/Grid2Op/grid2op-datasets/ - [IMPROVED] clarity of the "work in progress" in this CHANGELOG
Release v1.10.4
- [FIXED] an issue in the backend: if the backend failed to be
created the_gridattribute was set toNoneand not set back to - [FIXED] the
self.skip_if_needed()was missing for one of the test suite. - [FIXED] an error in the descirption of the
educ_case14_storageenvironment
(wrong sign for the slack generator) - [FIXED] the environment would not load in case of an incorrect "layout.json"
instead of raising a warning. - [FIXED] some issue with gym_compat module for "newest" version of
gymnasium (1.0.0) - [FIXED] github ci (v1 and v2 artifact are now deprecated)
- [ADDED] a code of conduct from github
- [ADDED] a "CONTRIBUTING.md" files (instead of having contribution instructions
in the readme) - [ADDED] numpy 2 support (now that pandapower allows it)
- [IMPROVED] error message when forecasts are not correctly set-up
Release v1.10.3
- [BREAKING]
env.chronics_hander.set_max_iter(xxx)is now a private function. Use
env.set_max_iter(xxx)or even betterenv.reset(options={"max step": xxx}).
Indeed,env.chronics_hander.set_max_iter()will likely have
no effect at all on your environment. - [BREAKING] for all the
Handler(egCSVForecastHandler) the methodset_max_iteris
now private (for the same reason as theenv.chronics_handler). We do not recommend to
use it (will likely have no effect). Prefer usingenv.set_max_iterinstead. - [BREAKING] now the
runner.run()method only accept kwargs argument
(because it should always have been like this) - [BREAKING] to improve pickle support and multi processing capabilities, the attribute
gym_env.observation_space._init_envandgym_env.observation_space.initial_obs_space
have been deleted (for theDictspace only, for the other spaces like theBoxthey
were not present in the first place) - [BREAKING] in the
GymEnvclass now by default the underlying grid2op environment has no
forecast anymore in an attempt to make this wrapper faster AND more easily pickle-able. You can
retrieve the old behaviour by passinggym_env = GymEnv(grid2op_env, with_forecast=True) - [FIXED] a bug in the
MultiFolderandMultifolderWithCacheleading to the wrong
computation ofmax_iteron some corner cases - [FIXED] the function
cleanup_action_space()did not work correctly when the "chronics_hander"
was not initialized for some classes - [FIXED] the
_observationClassattribute of the "observation env" (used for simulate and forecasted env)
is now an Observation and not an Action. - [FIXED] a bug when deep copying an "observation environment" (it changes its class)
- [FIXED] issue on
seedandMultifolderWithCachewhich caused
#616 - [FIXED] another issue with the seeding of
MultifolderWithCache: the seed was not used
correctly on the cache data when callingchronics_handler.resetmultiple times without
any changes - [FIXED]
Backendnow properly raise EnvError (grid2op exception) instead of previously
EnvironmentError(python default exception) - [FIXED] a bug in
PandaPowerBackend(missing attribute) causing directly
#617 - [FIXED] a bug in
Environment: the thermal limit were used when loading the environment
even before the "time series" are applied (and before the user defined thermal limits were set)
which could lead to disconnected powerlines even before the initial step (t=0, when time
series are loaded) - [FIXED] an issue with the "max_iter" for
FromNPYtime series generator - [FIXED] a bug in
MultiMixEnvironment: a multi-mix could be created even if the underlying
powergrids (for each mix) where not the same. - [FIXED] a bug in
generate_classes(experimental_read_from_local_dir) with alert data. - [FIXED] a bug in the
Runnerwhen using multi processing on macos and windows OS: some non default
parameters where not propagated in the "child" process (bug inrunner._ger_params) - [ADDED] possibility to skip some step when calling
env.reset(..., options={"init ts": ...}) - [ADDED] possibility to limit the duration of an episode with
env.reset(..., options={"max step": ...}) - [ADDED] possibility to specify the "reset_options" used in
env.resetwhen
using the runner withrunner.run(..., reset_options=xxx) - [ADDED] the argument
mp_contextwhen building the runner to help pass a multiprocessing context in the
grid2opRunner - [ADDED] the time series are now able to regenerate their "random" part
even when "cached" thanks to the addition of theregenerate_with_new_seedof the
GridValueclass (in public API) - [ADDED]
MultifolderWithCachenow supportsFromHandlerstime series generator - [IMPROVED] more consistency in the way the classes are initialized at the creation of an environment
- [IMPROVED] more consistency when an environment is copied (some attributes of the copied env were
deep copied incorrectly) - [IMPROVED] Doc about the runner
- [IMPROVED] the documentation on the
time seriesfolder. - [IMPROVED] now the "maintenance from json" (eg the
JSONMaintenanceHandleror the
GridStateFromFileWithForecastsWithMaintenance) can be customized with the day
of the week where the maintenance happens (keymaintenance_day_of_week) - [IMPROVED] in case of "
MultiMixEnvironment" there is now only class generated for
all the underlying mixes (instead of having one class per mixes) - [IMPROVED] the
EpisodeDatahave now explicitely a mode where they can be shared accross
processes (usingforkat least), seeep_data.make_serializable - [IMPROVED] chronix2grid tests are now done independantly on the CI