Skip to content

Releases: Grid2op/grid2op

Release v1.10.5

15 Oct 12:37
e7422c6
Compare
Choose a tag to compare
  • [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_env and update_env to point to
    https://api.github.com/repos/Grid2Op/grid2op-datasets/
  • [IMPROVED] clarity of the "work in progress" in this CHANGELOG

Release v1.10.4

14 Oct 13:35
v1.10.4
9bb03c8
Compare
Choose a tag to compare
  • [FIXED] an issue in the backend: if the backend failed to be
    created the _grid attribute was set to None and 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_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.
  • [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

12 Jul 07:29
Compare
Choose a tag to compare
  • [BREAKING] env.chronics_hander.set_max_iter(xxx) is now a private function. Use
    env.set_max_iter(xxx) or even better env.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 (eg CSVForecastHandler) the method set_max_iter is
    now private (for the same reason as the env.chronics_handler). We do not recommend to
    use it (will likely have no effect). Prefer using env.set_max_iter instead.
  • [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_env and gym_env.observation_space.initial_obs_space
    have been deleted (for the Dict space only, for the other spaces like the Box they
    were not present in the first place)
  • [BREAKING] in the GymEnv class 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 passing gym_env = GymEnv(grid2op_env, with_forecast=True)
  • [FIXED] a bug in the MultiFolder and MultifolderWithCache leading to the wrong
    computation of max_iter on 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 _observationClass attribute 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 seed and MultifolderWithCache which caused
    #616
  • [FIXED] another issue with the seeding of MultifolderWithCache: the seed was not used
    correctly on the cache data when calling chronics_handler.reset multiple times without
    any changes
  • [FIXED] Backend now 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 FromNPY time 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 Runner when using multi processing on macos and windows OS: some non default
    parameters where not propagated in the "child" process (bug in runner._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.reset when
    using the runner with runner.run(..., reset_options=xxx)
  • [ADDED] the argument mp_context when building the runner to help pass a multiprocessing context in the
    grid2op Runner
  • [ADDED] the time series are now able to regenerate their "random" part
    even when "cached" thanks to the addition of the regenerate_with_new_seed of the
    GridValue class (in public API)
  • [ADDED] MultifolderWithCache now supports FromHandlers time 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 series folder.
  • [IMPROVED] now the "maintenance from json" (eg the JSONMaintenanceHandler or the
    GridStateFromFileWithForecastsWithMaintenance) can be customized with the day
    of the week where the maintenance happens (key maintenance_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 EpisodeData have now explicitely a mode where they can be shared accross
    processes (using fork at least), see ep_data.make_serializable
  • [IMPROVED] chronix2grid tests are now done independantly on the CI

Release v1.10.2

27 May 11:11
Compare
Choose a tag to compare

Lots of things have been done in this release that focuses on user experience.

The most notable addition is to be able to set the initial state of the grid when calling env.reset()

Unfortunately, this comes with a few breaking changes.

Breaking changes

  • [BREAKING] the runner.run_one_episode now returns an extra first argument:
    chron_id, chron_name, cum_reward, timestep, max_ts = runner.run_one_episode() which
    is consistant with runner.run(...) (previously it returned only
    chron_name, cum_reward, timestep, max_ts = runner.run_one_episode())
  • [BREAKING] the runner now has no chronics_handler attribute (runner.chronics_handler
    is not defined)
  • [BREAKING] now grid2op forces everything to be connected at busbar 1 if
    param.IGNORE_INITIAL_STATE_TIME_SERIE == True (NOT the default) and
    no initial state is provided in env.reset(..., options={"init state": ...})

Additions

  • [ADDED] it is now possible to call change_reward directly from
    an observation (no need to do it from the Observation Space)
  • [ADDED] method to change the reward from the observation (observation_space
    is not needed anymore): you can use obs.change_reward
  • [ADDED] a way to automatically set the experimental_read_from_local_dir flags
    (with automatic class creation). For now it is disable by default, but you can
    activate it transparently (see doc)
  • [ADDED] possibility to set the grid to an initial state (using an action) when using the
    "time series" classes. The supported classes are GridStateFromFile - and all its derivative,
    FromOneEpisodeData, FromMultiEpisodeData, FromNPY and FromHandlers. The classes ChangeNothing
    and FromChronix2grid are not supported at the moment.
  • [ADDED] an "Handler" (JSONInitStateHandler) that can set the grid to an initial state (so as to make
    compatible the FromHandlers time series class with this new feature)
  • [ADDED] some more type hints in the GridObject class
  • [ADDED] Possibility to deactive the support of shunts if subclassing PandaPowerBackend
    (and add some basic tests)
  • [ADDED] a parameters (param.IGNORE_INITIAL_STATE_TIME_SERIE) which defaults to
    False that tells the environment whether it should ignore the
    initial state of the grid provided in the time series.
    By default it is NOT ignored, it is taken into account
    (for the environment that supports this feature)

Bug fixes

  • [FIXED] a small issue that could lead to having
    "redispatching_unit_commitment_availble" flag set even if the redispatching
    data was not loaded correctly
  • [FIXED] EducPandaPowerBackend now properly sends numpy array in the class attributes
    (instead of pandas series)
  • [FIXED] an issue when loading back data (with EpisodeData): when there were no storage units
    on the grid it did not set properly the "storage relevant" class attributes
  • [FIXED] a bug in the "gridobj.generate_classes()" function which crashes when no
    grid layout was set
  • [FIXED] notebook 5 on loading back data with EpisodeData.
  • [FIXED] converter between backends (could not handle more than 2 busbars)
  • [FIXED] a bug in BaseMultiProcessEnvironment: set_filter had no impact
  • [FIXED] an issue in the Runner (self.chronics_handler was sometimes used, sometimes not
    and most of the time incorrectly)
  • [FIXED] on RemoteEnv class (impact all multi process environment): the kwargs used to build then backend
    where not used which could lead to"wrong" backends being used in the sub processes.
  • [FIXED] a bug when the name of the times series and the names of the elements in the backend were
    different: it was not possible to set names_chronics_to_grid correctly when calling env.make

Improvments

  • [IMPROVED] documentation about obs.simulate to make it clearer the
    difference between env.step and obs.simulate on some cases
  • [IMPROVED] type hints on some methods of GridObjects
  • [IMPROVED] replace np.nonzero(arr) calls with arr.nonzero() which could
    save up a bit of computation time.
  • [IMPROVED] force class attributes to be numpy arrays of proper types when the
    classes are initialized from the backend.
  • [IMPROVED] some (slight) speed improvments when comparing actions or deep copying objects
  • [IMPROVED] the way the "grid2op compat" mode is handled
  • [IMPROVED] the coverage of the tests in the "test_basic_env_ls.py" to test more in depth lightsim2grid
    (creation of multiple environments, grid2op compatibility mode)
  • [IMPROVED] the function to test the backend interface in case when shunts are not supported
    (improved test AAATestBackendAPI.test_01load_grid)

Release v1.10.1

18 Mar 11:09
Compare
Choose a tag to compare
  • [FIXED] issue #593
  • [FIXED] backward compatibility issues with "oldest" lightsim2grid versions
    (now tested in basic settings)
  • [ADDED] a "compact" way to store the data in the Runner
  • [IMPROVED] the "train_val_split" functions, now more names (for the folders)
    can be used

Release v1.10.0

07 Mar 09:58
Compare
Choose a tag to compare
  • [BREAKING] the order of the actions in env.action_space.get_all_unitary_line_set and
    env.action_space.get_all_unitary_topologies_set might have changed (this is caused
    by a rewriting of these functions in case there is not 2 busbars per substation)
  • [FIXED] github CI did not upload the source files
  • [FIXED] l2rpn_utils module did not stored correctly the order
    of actions and observation for wcci_2020
  • [FIXED] 2 bugs detected by static code analysis (thanks sonar cloud)
  • [FIXED] a bug in act.get_gen_modif (vector of wrong size was used, could lead
    to some crashes if n_gen >= n_load)
  • [FIXED] a bug in act.as_dict when shunts were modified
  • [FIXED] a bug affecting shunts: sometimes it was not possible to modify their p / q
    values for certain values of p or q (an AmbiguousAction exception was raised wrongly)
  • [FIXED] a bug in the _BackendAction: the "last known topoolgy" was not properly computed
    in some cases (especially at the time where a line was reconnected)
  • [FIXED] MultiDiscreteActSpace and DiscreteActSpace could be the same classes
    on some cases (typo in the code).
  • [FIXED] a bug in MultiDiscreteActSpace : the "do nothing" action could not be done if one_sub_set (or one_sub_change)
    was selected in attr_to_keep
  • [ADDED] a method gridobj.topo_vect_element() that does the opposite of gridobj.xxx_pos_topo_vect
  • [ADDED] a mthod gridobj.get_powerline_id(sub_id) that gives the
    id of all powerlines connected to a given substation
  • [ADDED] a convenience function obs.get_back_to_ref_state(...)
    for the observation and not only the action_space.
  • [IMPROVED] handling of "compatibility" grid2op version
    (by calling the relevant things done in the base class
    in BaseAction and BaseObservation) and by using the from packaging import version
    to check version (instead of comparing strings)
  • [IMPROVED] slightly the code of check_kirchoff to make it slightly clearer
  • [IMRPOVED] typing and doc for some of the main classes of the Action module
  • [IMRPOVED] typing and doc for some of the main classes of the Observation module
  • [IMPROVED] methods gridobj.get_lines_id, gridobj.get_generators_id, gridobj.get_loads_id
    gridobj.get_storages_id are now class methods and can be used with type(env).get_lines_id(...)
    or act.get_lines_id(...) for example.
  • [IMPROVED] obs.get_energy_graph() by giving the "local_bus_id" and the "global_bus_id"
    of the bus that represents each node of this graph.
  • [IMPROVED] obs.get_elements_graph() by giving access to the bus id (local, global and
    id of the node) where each element is connected.
  • [IMPROVED] description of the different graph of the grid in the documentation.
  • [IMPROVED] type hints for the gym_compat module (more work still required in this area)
  • [IMPROVED] the MultiDiscreteActSpace to have one "dimension" controling all powerlines
    (see "one_line_set" and "one_line_change")
  • [IMPROVED] doc at different places, including the addition of the MDP implemented by grid2op.

Release v1.9.8

26 Jan 09:34
Compare
Choose a tag to compare
  • [FIXED] the backend.check_kirchoff function was not correct when some elements were disconnected
    (the wrong columns of the p_bus and q_bus was set in case of disconnected elements)
  • [FIXED] PandapowerBackend, when no slack was present
  • [FIXED] the "BaseBackendTest" class did not correctly detect divergence in most cases (which lead
    to weird bugs in failing tests)
  • [FIXED] an issue with imageio having deprecated the fps kwargs (see #569)
  • [FIXED] adding the "loads_charac.csv" in the package data
  • [FIXED] a bug when using grid2op, not "utils.py" script could be used (see
    #577). This was caused by the modification of
    sys.path when importing the grid2op test suite.
  • [ADDED] A type of environment that does not perform the "emulation of the protections"
    for some part of the grid (MaskedEnvironment) see #571
  • [ADDED] a "gym like" API for reset allowing to set the seed and the time serie id directly when calling
    env.reset(seed=.., options={"time serie id": ...})
  • [IMPROVED] the CI speed: by not testing every possible numpy version but only most ancient and most recent
  • [IMPROVED] Runner now test grid2op version 1.9.6 and 1.9.7
  • [IMPROVED] refacto gridobj_cls._clear_class_attribute and gridobj_cls._clear_grid_dependant_class_attributes
  • [IMPROVED] the bahviour of the generic class MakeBackend used for the test suite.
  • [IMPROVED] re introducing python 12 testing
  • [IMPROVED] error messages in the automatic test suite (AAATestBackendAPI)

Release v1.9.7

01 Dec 09:42
Compare
Choose a tag to compare
  • [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 #561 (indent issue)
  • [FIXED] issue #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.

Release v1.9.6

26 Oct 14:11
Compare
Choose a tag to compare
  • [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 #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 inforeturn 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 #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"

Release v1.9.5

18 Sep 13:59
Compare
Choose a tag to compare
  • [FIXED] issue #518
  • [FIXED] issue #446
  • [FIXED] issue #523 by having a "_BackendAction" folder instead of a file
  • [FIXED] issue #522 and adding back certain notebooks to the CI
  • [FIXED] an issue when disconnecting loads / generators on msot recent pandas version
  • [FIXED] issue #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...)