From 98d0fc5c0107c1208d14a91d2883f6abc0bb9f4c Mon Sep 17 00:00:00 2001 From: DEUCE1957 <2246306W@student.gla.ac.uk> Date: Fri, 16 Aug 2024 10:50:13 +0200 Subject: [PATCH 01/21] Debug: Fix Missing Legal and Ambigious Arrays in CompactEpisodeData --- grid2op/Episode/CompactEpisodeData.py | 4 +++- grid2op/Runner/runner.py | 2 +- grid2op/tests/test_CompactEpisodeData.py | 14 +++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/grid2op/Episode/CompactEpisodeData.py b/grid2op/Episode/CompactEpisodeData.py index e5cdabf9..f9f59431 100644 --- a/grid2op/Episode/CompactEpisodeData.py +++ b/grid2op/Episode/CompactEpisodeData.py @@ -95,9 +95,11 @@ def __init__(self, env, obs, exp_dir, ep_id:str=None): """ if exp_dir is not None: self.exp_dir = p(exp_dir) + self.exp_dir = self.exp_dir / "CompactEpisodeData" + self.exp_dir.mkdir(parents=False, exist_ok=True) else: self.exp_dir = None - self.array_names = ("actions", "env_actions", "attacks", "observations", "rewards", "other_rewards", "disc_lines", "times") + self.array_names = ("actions", "env_actions", "attacks", "observations", "rewards", "other_rewards", "disc_lines", "times", "legal", "ambiguous") self.space_names = ("observation_space", "action_space", "attack_space", "env_modification_space") if ep_id is None: self.ep_id = env.chronics_handler.get_name() diff --git a/grid2op/Runner/runner.py b/grid2op/Runner/runner.py index 189dbefa..67606750 100644 --- a/grid2op/Runner/runner.py +++ b/grid2op/Runner/runner.py @@ -1728,7 +1728,7 @@ def run( ) else: if add_detailed_output and (_IS_WINDOWS or _IS_MACOS): - self.logger.warn( + self.logger.warning( "Parallel run are not fully supported on windows or macos when " '"add_detailed_output" is True. So we decided ' "to fully deactivate them." diff --git a/grid2op/tests/test_CompactEpisodeData.py b/grid2op/tests/test_CompactEpisodeData.py index 11f9dec7..c9bcde58 100644 --- a/grid2op/tests/test_CompactEpisodeData.py +++ b/grid2op/tests/test_CompactEpisodeData.py @@ -12,7 +12,7 @@ import unittest import grid2op -from grid2op.Agent import OneChangeThenNothing +from grid2op.Agent import DoNothingAgent, OneChangeThenNothing from grid2op.tests.helper_path_test import * from grid2op.Chronics import Multifolder from grid2op.Reward import L2RPNReward @@ -140,6 +140,8 @@ def act(self, observation, reward, done=False): assert len(episode_data.observations) == self.max_iter + 1 assert len(episode_data.env_actions) == self.max_iter assert len(episode_data.attacks) == self.max_iter + assert len(episode_data.ambiguous) == self.max_iter + assert len(episode_data.legal) == self.max_iter def test_one_episode_with_saving(self): f = tempfile.mkdtemp() @@ -163,6 +165,7 @@ def test_collection_wrapper_after_run(self): OneChange = OneChangeThenNothing.gen_next( {"set_bus": {"lines_or_id": [(1, -1)]}} ) + # env.reset(options=) runner = Runner( init_grid_path=self.init_grid_path, init_env_path=self.init_grid_path, @@ -178,9 +181,10 @@ def test_collection_wrapper_after_run(self): agentClass=OneChange, use_compact_episode_data=True, ) - ep_id, ep_name, cum_reward, timestep, max_ts, episode_data = runner.run_one_episode( - max_iter=self.max_iter, detailed_output=True - ) + with warnings.catch_warnings(category=UserWarning, action="ignore"): + *_, episode_data = runner.run_one_episode( + max_iter=self.max_iter, detailed_output=True, + ) # Check that the type of first action is set bus assert episode_data.action_space.from_vect(episode_data.actions[0]).get_types()[2] @@ -257,7 +261,7 @@ def test_with_opponent(self): ) episode_data = CompactEpisodeData.from_disk(path=f, ep_id=res[0][1]) - lines_impacted, subs_impacted = episode_data.attack_space.from_vect(episode_data.attacks[0]).get_topological_impact() + lines_impacted, _ = episode_data.attack_space.from_vect(episode_data.attacks[0]).get_topological_impact() assert lines_impacted[3] def test_can_return_ep_data(self): From d67b5162c5f8c3a28fc581d65f8728488a141cfe Mon Sep 17 00:00:00 2001 From: DEUCE1957 <2246306W@student.gla.ac.uk> Date: Fri, 16 Aug 2024 11:39:43 +0200 Subject: [PATCH 02/21] Debug: Remove Catch Warning --- grid2op/tests/test_CompactEpisodeData.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/grid2op/tests/test_CompactEpisodeData.py b/grid2op/tests/test_CompactEpisodeData.py index c9bcde58..e755b478 100644 --- a/grid2op/tests/test_CompactEpisodeData.py +++ b/grid2op/tests/test_CompactEpisodeData.py @@ -181,10 +181,8 @@ def test_collection_wrapper_after_run(self): agentClass=OneChange, use_compact_episode_data=True, ) - with warnings.catch_warnings(category=UserWarning, action="ignore"): - *_, episode_data = runner.run_one_episode( - max_iter=self.max_iter, detailed_output=True, - ) + *_, episode_data = runner.run_one_episode( + max_iter=self.max_iter, detailed_output=True, # Check that the type of first action is set bus assert episode_data.action_space.from_vect(episode_data.actions[0]).get_types()[2] From 2bc55f8aeecff01296068b275c9768090453ac60 Mon Sep 17 00:00:00 2001 From: deuce1957 Date: Tue, 17 Sep 2024 14:38:10 +0200 Subject: [PATCH 03/21] Debug: Fix collection_wrapper_after_run test --- grid2op/tests/test_CompactEpisodeData.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/grid2op/tests/test_CompactEpisodeData.py b/grid2op/tests/test_CompactEpisodeData.py index e755b478..380abd4b 100644 --- a/grid2op/tests/test_CompactEpisodeData.py +++ b/grid2op/tests/test_CompactEpisodeData.py @@ -181,8 +181,11 @@ def test_collection_wrapper_after_run(self): agentClass=OneChange, use_compact_episode_data=True, ) - *_, episode_data = runner.run_one_episode( - max_iter=self.max_iter, detailed_output=True, + with warnings.catch_warnings(): + warnings.filterwarnings("ignore") + *_, episode_data = runner.run_one_episode( + max_iter=self.max_iter, detailed_output=True, + ) # Check that the type of first action is set bus assert episode_data.action_space.from_vect(episode_data.actions[0]).get_types()[2] @@ -298,4 +301,4 @@ def test_can_return_ep_data(self): if __name__ == "__main__": - unittest.main() + unittest.main() \ No newline at end of file From de693d2dbc11ea56ca1c0a1a8c67b5cdd8f4122f Mon Sep 17 00:00:00 2001 From: Benjamin DONNOT Date: Mon, 14 Oct 2024 10:44:13 +0200 Subject: [PATCH 04/21] Create CODE_OF_CONDUCT.md Using the github default one --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..18c91471 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From c0b2342ed66f5560feb5a818e4df47e3b8282d3d Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 10:49:19 +0200 Subject: [PATCH 05/21] remove v1 and v2 github artifacts --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18544397..97af71e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -125,7 +125,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true @@ -203,7 +203,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true From 4a30e5658b868e51502de9304f189660a9dfa7b7 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 10:51:54 +0200 Subject: [PATCH 06/21] add some tests for python 3.13 --- .github/workflows/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 97af71e9..6fa5206e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,6 +43,11 @@ jobs: abi: cp312, version: '3.12', } + - { + name: cp313, + abi: cp313, + version: '3.13', + } steps: @@ -121,6 +126,10 @@ jobs: name: cp312, version: '3.12', } + - { + name: cp313, + version: '3.13', + } steps: From 0173dbcd32ce96e992d0561f9f8771326ffa1ad2 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 11:10:12 +0200 Subject: [PATCH 07/21] rollback python 3.13 support, waiting for pandapower --- .github/workflows/main.yml | 18 +++++++++--------- setup.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6fa5206e..92a60c6f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,11 +43,11 @@ jobs: abi: cp312, version: '3.12', } - - { - name: cp313, - abi: cp313, - version: '3.13', - } + # - { + # name: cp313, # issue with pandapower atm + # abi: cp313, + # version: '3.13', + # } steps: @@ -126,10 +126,10 @@ jobs: name: cp312, version: '3.12', } - - { - name: cp313, - version: '3.13', - } + # - { # issue with pandapower atm + # name: cp313, + # version: '3.13', + # } steps: diff --git a/setup.py b/setup.py index db3c36bf..34d79b3b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def my_test_suite(): pkgs = { "required": [ - "numpy>=1.20,<2", # disable numpy 2 for now + "numpy", "scipy>=1.4.1", "pandas>=1.0.3", "pandapower>=2.2.2", From a98a470e329f4098a593e96e56d09d0dcbb2728b Mon Sep 17 00:00:00 2001 From: Benjamin DONNOT Date: Mon, 14 Oct 2024 11:46:33 +0200 Subject: [PATCH 08/21] Create CONTRIBUTING.md --- CONTRIBUTING.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..69dbbc0f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contribution + +We welcome contributions from everyone. + +If you want to contribute, a good starting point is to get in touch with us through: +- github (discussion, issues or pull-request) +- the project [discord](https://discord.gg/cYsYrPT) +- mail (see current corresponding author from the grid2op package on pypi here https://pypi.org/project/Grid2Op/) + +Contribution can take different forms: + +- reporting bugs +- improving the documentation +- improving the code examples (notebooks or example in the doc) +- fixing some reported issues (for example at https://github.com/rte-france/Grid2Op/issues ) +- adding a new functionality to grid2op (or increase its speed) +- extend grid2op + +# What to do ? + +For smaller changes (including, but not limited to the reporting of a bug or a contribution to the explanotory notebooks or the documentations) +a simple "pull request" with your modifications by detailing what you had in mind and the goal of your changes. + +In case of a major change (or if you have a doubt on what is "a small change"), please open an issue first +to discuss what you would like to change and then follow as closely as possible the guidelines below. This is to ensure +first that no other contribution is this direction is being currently made but also to make sure that it +does not conflicts with some core ideas of the project. + +# Guidelines for contributing to the codebase + +For larger contributions, you can follow the given : + +1. fork the repository located at +2. synch your fork with the "latest developement branch of grid2op". For example, if the latest grid2op release + on pypi is `1.10.3` you need to synch your repo with the branch named `dev_1.10.4` or `dev_1.11.0` (if + the branch `dev_1.10.4` does not exist). It will be the highest number in the branches `dev_*` on + grid2op official github repository. +3. implement your functionality / code your modifications, add documentation or any kind of contribution +4. make sure to add tests and documentation if applicable +5. once it is developed, synch your repo with the last development branch again (see point 2 above) and + make sure to solve any possible conflicts +6. write a pull request and make sure to target the right branch (the "last development branch") + +# When will it be merged ? + +A contribution will be merged once approved by the maintainers (this is why it is recommended to first +get in touch with the team) + +Code in the contribution should pass all the current tests, have some dedicated tests for the new feature (if applicable) +and documentation (if applicable). + +New contributions should respect the "**Code of Conduct**" of grid2op. From b77f31856cfcfd79f02315ec80d962c946ec2158 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 11:50:29 +0200 Subject: [PATCH 09/21] adding contributing.md and code of conduct [skip ci] --- CHANGELOG.rst | 5 +++++ README.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 82df64ba..c859329e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -77,6 +77,11 @@ Next release 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 [1.10.3] - 2024-07-12 diff --git a/README.md b/README.md index b24db06d..7406a782 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,11 @@ For example, the "getting started" notebooks referenced some pages of the help. ## Contributing +Please consult the "CONTRIBUTING.md" file for extra information. This is a summary and +in case of conflicting instructions, follow the one given in the `CONTRIBUTING.md` file +and discard these ones. + + We welcome contributions from everyone. They can take the form of pull requests for smaller changed. In case of a major change (or if you have a doubt on what is "a small change"), please open an issue first to discuss what you would like to change. From 3e23381092b9d70c6c456aab29444c554d78f577 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 11:53:54 +0200 Subject: [PATCH 10/21] slightly change the CONTRIBUTING.md and the changelog, for the new release --- CHANGELOG.rst | 3 ++- CONTRIBUTING.md | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c859329e..e9116b35 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -66,7 +66,7 @@ Next release - TODO work on the reward class (see https://github.com/rte-france/Grid2Op/issues/584) -[1.10.4] - 2024-xx-yy +[1.10.4] - 2024-10-14 ------------------------- - [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 @@ -84,6 +84,7 @@ Next release - [ADDED] numpy 2 support (now that pandapower allows it) - [IMPROVED] error message when forecasts are not correctly set-up + [1.10.3] - 2024-07-12 ------------------------- - [BREAKING] `env.chronics_hander.set_max_iter(xxx)` is now a private function. Use diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69dbbc0f..6fb0b538 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,4 +49,7 @@ get in touch with the team) Code in the contribution should pass all the current tests, have some dedicated tests for the new feature (if applicable) and documentation (if applicable). +If you contribute to some grid2op notebooks, please make sure to "clear all outputs" +before making the pull request. + New contributions should respect the "**Code of Conduct**" of grid2op. From a51c8257937a33649e7fc705c87ff2dd05995488 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 12:06:20 +0200 Subject: [PATCH 11/21] update docs --- docs/environment.rst | 2 +- grid2op/Environment/baseEnv.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/environment.rst b/docs/environment.rst index b90c0c8b..5c71eb3e 100644 --- a/docs/environment.rst +++ b/docs/environment.rst @@ -151,7 +151,7 @@ Feel free to consult the documentation of the :func:`Environment.reset` function for more information (this doc might be outdated, the one of the function should be more up to date with the code). -.. info:: +.. note:: In the near future (next few releases) we will also attempt to make the customization of the `parameters` or the `skip number of steps`, `maximum duration of the scenarios` also available in `env.reset()` options. diff --git a/grid2op/Environment/baseEnv.py b/grid2op/Environment/baseEnv.py index 440d89e9..f45a733f 100644 --- a/grid2op/Environment/baseEnv.py +++ b/grid2op/Environment/baseEnv.py @@ -4448,7 +4448,7 @@ def classes_are_in_files(self) -> bool: Whether the classes created when this environment has been made are store on the hard drive (will return `True`) or not. - .. info:: + .. note:: This will become the default behaviour in future grid2op versions. See :ref:`troubleshoot_pickle` for more information. From 3116d0e9579e8fd48424b63ad37521ae6b2e08e3 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 14:41:03 +0200 Subject: [PATCH 12/21] refacto the 'make_release' to sign commits [skip ci] --- utils/make_release.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/make_release.py b/utils/make_release.py index c91346dd..171c12ad 100644 --- a/utils/make_release.py +++ b/utils/make_release.py @@ -197,10 +197,10 @@ def modify_and_push_docker(version, # grid2op version start_subprocess_print(["git", "add", f'{os.path.join(PATH_PREVIOUS_RUNNER, f"res_agent_{version}")}/*']) # Commit - start_subprocess_print(["git", "commit", "-m", "Release v{}".format(version)]) + start_subprocess_print(["git", "commit", "-S", "-m", "Release v{}".format(version)]) if not is_prerelease: # Create a new git tag - start_subprocess_print(["git", "tag", "-a", "v{}".format(version), "-m", "Release v{}".format(version)]) + start_subprocess_print(["git", "tag", "-s", "-a", "v{}".format(version), "-m", "Release v{}".format(version)]) if is_prerelease: print("Please push changes: 'git push'") @@ -227,4 +227,3 @@ def modify_and_push_docker(version, # grid2op version path=path, docker_versions=[version, "latest"], docker_tags=["--no-cache"]) - From 9bb03c808bc2ba9fc6273bca0a3aecea513a738f Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 14 Oct 2024 15:06:40 +0200 Subject: [PATCH 13/21] Release v1.10.4 --- Dockerfile | 2 +- docs/conf.py | 2 +- grid2op/__init__.py | 2 +- .../res_agent_1.10.4/00/_parameters.json | 24 ++ .../res_agent_1.10.4/00/actions.npz | Bin 0 -> 335 bytes .../res_agent_1.10.4/00/agent_exec_times.npz | Bin 0 -> 241 bytes .../00/disc_lines_cascading_failure.npz | Bin 0 -> 218 bytes .../res_agent_1.10.4/00/env_modifications.npz | Bin 0 -> 492 bytes .../res_agent_1.10.4/00/episode_meta.json | 11 + .../res_agent_1.10.4/00/episode_times.json | 12 + .../res_agent_1.10.4/00/grid2op.info | 3 + .../res_agent_1.10.4/00/observations.npz | Bin 0 -> 2503 bytes .../res_agent_1.10.4/00/opponent_attack.npz | Bin 0 -> 206 bytes .../res_agent_1.10.4/00/other_rewards.json | 9 + .../res_agent_1.10.4/00/rewards.npz | Bin 0 -> 237 bytes .../res_agent_1.10.4/01/_parameters.json | 24 ++ .../res_agent_1.10.4/01/actions.npz | Bin 0 -> 271 bytes .../res_agent_1.10.4/01/agent_exec_times.npz | Bin 0 -> 216 bytes .../01/disc_lines_cascading_failure.npz | Bin 0 -> 216 bytes .../res_agent_1.10.4/01/env_modifications.npz | Bin 0 -> 325 bytes .../res_agent_1.10.4/01/episode_meta.json | 11 + .../res_agent_1.10.4/01/episode_times.json | 12 + .../res_agent_1.10.4/01/grid2op.info | 3 + .../res_agent_1.10.4/01/observations.npz | Bin 0 -> 742 bytes .../res_agent_1.10.4/01/opponent_attack.npz | Bin 0 -> 206 bytes .../res_agent_1.10.4/01/other_rewards.json | 3 + .../res_agent_1.10.4/01/rewards.npz | Bin 0 -> 213 bytes .../res_agent_1.10.4/dict_action_space.json | 220 ++++++++++++++++++ .../res_agent_1.10.4/dict_attack_space.json | 220 ++++++++++++++++++ .../dict_env_modification_space.json | 220 ++++++++++++++++++ .../dict_observation_space.json | 220 ++++++++++++++++++ 31 files changed, 995 insertions(+), 3 deletions(-) create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/_parameters.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/actions.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/agent_exec_times.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/disc_lines_cascading_failure.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/env_modifications.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_meta.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_times.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/grid2op.info create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/observations.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/opponent_attack.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/other_rewards.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/00/rewards.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/_parameters.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/actions.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/agent_exec_times.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/disc_lines_cascading_failure.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/env_modifications.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_meta.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_times.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/grid2op.info create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/observations.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/opponent_attack.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/other_rewards.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/01/rewards.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/dict_action_space.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/dict_attack_space.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/dict_env_modification_space.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.4/dict_observation_space.json diff --git a/Dockerfile b/Dockerfile index 3d47b14d..ba7adc8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ WORKDIR /Grid2Op RUN git pull RUN git remote update RUN git fetch --all --tags -RUN git checkout "tags/v1.10.3" -b "v1.10.3-branch" +RUN git checkout "tags/v1.10.4" -b "v1.10.4-branch" # Install Dependencies RUN pip3 install .[optional,challenge] WORKDIR / diff --git a/docs/conf.py b/docs/conf.py index 8f354d8e..2c2e06bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Benjamin Donnot' # The full version, including alpha/beta/rc tags -release = '1.10.4.dev1' +release = '1.10.4' version = '1.10' diff --git a/grid2op/__init__.py b/grid2op/__init__.py index f0399504..61ae763e 100644 --- a/grid2op/__init__.py +++ b/grid2op/__init__.py @@ -11,7 +11,7 @@ Grid2Op """ -__version__ = '1.10.4.dev1' +__version__ = '1.10.4' __all__ = [ "Action", diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/_parameters.json b/grid2op/data_test/runner_data/res_agent_1.10.4/00/_parameters.json new file mode 100644 index 00000000..46aaa941 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/00/_parameters.json @@ -0,0 +1,24 @@ +{ + "ACTIVATE_STORAGE_LOSS": true, + "ALARM_BEST_TIME": 12, + "ALARM_WINDOW_SIZE": 12, + "ALERT_TIME_WINDOW": 12, + "ALLOW_DISPATCH_GEN_SWITCH_OFF": true, + "ENV_DC": false, + "FORECAST_DC": false, + "HARD_OVERFLOW_THRESHOLD": 2.0, + "IGNORE_INITIAL_STATE_TIME_SERIE": 0, + "IGNORE_MIN_UP_DOWN_TIME": true, + "INIT_STORAGE_CAPACITY": 0.5, + "LIMIT_INFEASIBLE_CURTAILMENT_STORAGE_ACTION": false, + "MAX_LINE_STATUS_CHANGED": 1, + "MAX_SIMULATE_PER_EPISODE": -1, + "MAX_SIMULATE_PER_STEP": -1, + "MAX_SUB_CHANGED": 1, + "NB_TIMESTEP_COOLDOWN_LINE": 0, + "NB_TIMESTEP_COOLDOWN_SUB": 0, + "NB_TIMESTEP_OVERFLOW_ALLOWED": 2, + "NB_TIMESTEP_RECONNECTION": 10, + "NO_OVERFLOW_DISCONNECTION": false, + "SOFT_OVERFLOW_THRESHOLD": 1.0 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/actions.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/00/actions.npz new file mode 100644 index 0000000000000000000000000000000000000000..ab3d12e410dff133114b57d40ae4d9ec99376238 GIT binary patch literal 335 zcmWIWW@Zs#U|`??Vnv2@_RSS1fh>h+kcbFFN@7W(US2^ZBZB}~3@F6_k_UmemkxR{ zIZCj9czY}OOfJ{Agb4ydTbAc_iSy4*IyseZ;YR6Lr!TTK3u?ApTX3dXj>Yuj_xAe- z&K#=yeD=(m%h~1f=O%rBqWrD<)ykf=0{QIM4S5R z#dlZL6<*C)vaqsvW?SJ6z2_&7`PiG++b{Kb|4K3X*IfC)ec$&Sm-@Y;{KcO=&A~59 zW5xE$JO9@%pDJ6XU%z?v=IEdK+h$9>HkuD{HX8Z=ws?RyBa;X-u0TMjZ(szmVL=k$ R&B_MiGXkL*kY)zU0sy{waiRbK literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/agent_exec_times.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/00/agent_exec_times.npz new file mode 100644 index 0000000000000000000000000000000000000000..7b3a67a0d3dd72c940db4aaea4f32bdd6149a4f9 GIT binary patch literal 241 zcmWIWW@Zs#U|`??Vnv4NmAYTEfh++gkcbFFN@7W(US2^ZBZB}~3@F6_k_Um=Z^U0o z3!FR=a4cZ$yh%}WVwU7BU6409ZPB{L3+7FW4+)wwLwtVxlu2Ad<=$sB{aCxi(^bTl zF#VKjV`H()G(_EU1&^k10#rpIXb|bl?}va1VS?)y%fY@005)!KFt6C literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/disc_lines_cascading_failure.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/00/disc_lines_cascading_failure.npz new file mode 100644 index 0000000000000000000000000000000000000000..7e68c884b65c3015b636b5e00ed7d6e5311298bd GIT binary patch literal 218 zcmWIWW@Zs#U|`??Vnv2S%K|b(fUE_~AQ2IUl*E!my}W`-Mg{?}7*L7lr9 zVfrc6#>QsFB{s{7Yb#d@lb+ioM&_4MZU;3a7BMgccr!AIFynF$#9k2Dzz8B?t_$#H QWdrdUfzS*{_klPJ0L11pT>t<8 literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/env_modifications.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/00/env_modifications.npz new file mode 100644 index 0000000000000000000000000000000000000000..e944d24511ca7168b9d04b0e18d68051c9b1c5f1 GIT binary patch literal 492 zcmWIWW@Zs#U|`??Vnv3H&#!c+F#?%gAQ2IUl*E!my}W`-Mg{?}7*K`*EDxmLUfY`` z5-7p;Kv>}8d!=R4t-4Cbl~@wfrLB)1JLDy{x!KhtB|OLFi`<&DcMcmmI>e+560D0E z?>W43a1aQpNHf1Fu;xx$WMy2%gEQf>aeVTh-yK~1n_qr?>-2}A`%Guq$UdJPS+{-9 zzZc!CyY_P2YC6yMOK#R2zAHKDqhf=fGe4DywVvPS4G`^D1@y=A%Vx*VTP< zz9HXo`A9`=K=}UdT~X3Uek|rlT(5Cj-*rO$ncMH@ZnAlE{Ks3T{kg?P@6C_-2Yc^% z(Uo>BzvuYhO@Drc?|(TXjr~`w#pb%pihHk~|6KR_)vFTwmdka!|1P-iTC`1GPds34^|aNqK?)!5xxa1alyC0}FTU;AcGKU^NB83*?OBmPn;swf z?OVGX=-l)lrf;`b@BbC6lK%Vq171*Y;sJl&|6>U7W@Hj!#uY;d%?+SfgU45ZH!B;6 N&j^HOKzadK769{A$gcnZ literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_meta.json b/grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_meta.json new file mode 100644 index 00000000..a2185b52 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_meta.json @@ -0,0 +1,11 @@ +{ + "agent_seed": null, + "backend_type": "PandaPowerBackend_rte_case5_example", + "chronics_max_timestep": "100", + "chronics_path": "/home/donnotben/Documents/grid2op_dev/grid2op/data/rte_case5_example/chronics/00", + "cumulative_reward": 35.87366485595703, + "env_seed": null, + "env_type": "Environment_rte_case5_example", + "grid_path": "/home/donnotben/Documents/grid2op_dev/grid2op/data/rte_case5_example/grid.json", + "nb_timestep_played": 7 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_times.json b/grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_times.json new file mode 100644 index 00000000..88634154 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/00/episode_times.json @@ -0,0 +1,12 @@ +{ + "Agent": { + "total": 0.00021775700224679895 + }, + "Env": { + "apply_act": 0.025833767002040986, + "observation_computation": 0.00829864700062899, + "powerflow_computation": 0.20847854800376808, + "total": 0.24261096200643806 + }, + "total": 0.24721698199937236 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/grid2op.info b/grid2op/data_test/runner_data/res_agent_1.10.4/00/grid2op.info new file mode 100644 index 00000000..bcdf33ac --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/00/grid2op.info @@ -0,0 +1,3 @@ +{ + "version": "1.10.4" +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/00/observations.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/00/observations.npz new file mode 100644 index 0000000000000000000000000000000000000000..0631b40a7aef46e594eac6bd18cf86ef643c5826 GIT binary patch literal 2503 zcmc&$X*3&%7S=M;b~+TJWsK6rRytZ@IYOdpFdm7dttCdJrdqp}h$V^+?Wl&yQ2UaM zS`!f^V=rk{sanz^Nh6lhN)Qoigs4p0ciwrw-tTwsx%>Tb&pr2?`@vl071ZS99$2Z)I@nD% zrNVpetMoWt*$7t4EnL>t3n7{6YcFX&lRxF;sFE9pLOe6BQ2w?iUDLwU?{WK-1gq`0 zasq+(NY_B5vsKH_{(z9^oN z#0wssu!e}!-`y44ic^k^UJ_T(eICQA60JR_8&4p!-`&xOuap8q?cevZsFwj70KV#G zXt2wp8}q8rs$tESnb=-zMpxvdk;pat>K^RJ_^9LI?$Oj%fT340dj??tNAtf_0>xq& z3Z3Wx(d0rpHx@)pPzSc=vU8>JhY42(xsongw55QSww+fE!wHpGIt9)nqpIPwUv2yu zeL$zq^#l5iBMF2jQPc%McBL+#oY+#zlX=h8B`VK)5JG93+-lwAn>zI~FPr*vdebYvlN2(1|^SOhwf$7DgJ`oc}6JC-B!y?}LUy8ql{XDuw zdBbp?uZUL4MT6!a4E^RL&zAinExVQz(*{M?@sl9thTFbewPvKUW-{L*6J6~%xX=q{ zg54+8z-}_230zf^zUoi5Nb1M2{(P!~kxtCzUQa)zyW#=O*ts&`jelcc?qe>YS`M3` zI`$w2;j_Nsc^zk94J#Eht}jkkG2kfQHYe*z zChDewDOKbHWKYI=S+{f&J5JpWS15~YNl?sD;B(@&R;Z^b8(BTqFv9hi!)Bjm-#|A2Nn*dfY6=Itx}cI96&_XM z7!XgrMjuvH_u=%k0uU*L#Kj$YK%G3f#G?FXh;+kHWHrV)x#RbBd2BO?n=H*OU84%$Z4W*jkTq*&@O84??tilpq5{M%dKpr#Tpyjz-wj@M*v9YeubF=6bo zzS>#E=yn@;uvK$zs&q$rj%}T0>q#ZPL?4{1S_9S&SX?`b9x_pXJRkC`a8!Ci& z06y!FSls^k(n%{yc4yL7v-v%R^U2dDAsGnx%N7T&3)w*gc#XMTGxS@?6LV9fZUjQt z=~z6DZE@0*g<(cTffN>6uK{JIVjI_uL#VFxlzTjqUGhl>JSfMYzjSiFMTumZg8B&d z0&#=NFG@FSGJG1JZWY|i`Kem+{bt6dMxt3c4RY4|W0z#Pj&w@!V_;TX=-vAz0&*#2 zT}^kiWZDva`S2X;zS;{Us=`*i!KV!zl+w8N+cZ5^qG_`Do3lxN!f7IDaK6aF@fEAE8(c*T3#> zv*Nm9*{OWNwisYirWpb0#qkZ!zR4>&ANn46_|0Ppfh8baPPq-X{=MaJBu~cz*|!I# zG{4tU#Ts0qH>@VQbbk{Pq1bNzXJ)_VRpHxqY9f*pwcdYx7B+Jc3azKpUep9q`sTkI zMHIi4&B#S=6)J>BhUkP}s#Q5f+fM%5I1`|-T38`b#P@%D_I6BX`^<*TBD=ocQ`J+U zRI`naUt+pLsb|o+Yy^^ehOvbfW;M{3w#iY69ky(3Kx3O1KpNZC zTyM*^<}@ww7k_mM%qm%Oh~aAO=5v1%Xh{iqSIZgmR4?u;eBM|6*WbH((`zGb>6m21 ztpIJEtuJfZp5h#PbO^&!pJlcrF-BK0b|huP_UHNs?k| z+kTG5rY#RIgf=md!GaWpsTXVo3&}8Quq%_h|0l1JghogtAa;uBU{=^Xj`E-$WbyQS-;zn zp-l#7AbFszYH*5y*+m<_BGenPBW9~*>kbKPcVhq>c9_Zdw;)-LgM6|p5u zKc(8(*sQqNW?6A<>=FAD;gUcIf>(`q24t4EyqH9PDfc76JBMFS{87 kycwB9m~lA~;uH|szz8B?4i4~UWdrdUfzS*{F9dNI0DGxBcmMzZ literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/_parameters.json b/grid2op/data_test/runner_data/res_agent_1.10.4/01/_parameters.json new file mode 100644 index 00000000..46aaa941 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/01/_parameters.json @@ -0,0 +1,24 @@ +{ + "ACTIVATE_STORAGE_LOSS": true, + "ALARM_BEST_TIME": 12, + "ALARM_WINDOW_SIZE": 12, + "ALERT_TIME_WINDOW": 12, + "ALLOW_DISPATCH_GEN_SWITCH_OFF": true, + "ENV_DC": false, + "FORECAST_DC": false, + "HARD_OVERFLOW_THRESHOLD": 2.0, + "IGNORE_INITIAL_STATE_TIME_SERIE": 0, + "IGNORE_MIN_UP_DOWN_TIME": true, + "INIT_STORAGE_CAPACITY": 0.5, + "LIMIT_INFEASIBLE_CURTAILMENT_STORAGE_ACTION": false, + "MAX_LINE_STATUS_CHANGED": 1, + "MAX_SIMULATE_PER_EPISODE": -1, + "MAX_SIMULATE_PER_STEP": -1, + "MAX_SUB_CHANGED": 1, + "NB_TIMESTEP_COOLDOWN_LINE": 0, + "NB_TIMESTEP_COOLDOWN_SUB": 0, + "NB_TIMESTEP_OVERFLOW_ALLOWED": 2, + "NB_TIMESTEP_RECONNECTION": 10, + "NO_OVERFLOW_DISCONNECTION": false, + "SOFT_OVERFLOW_THRESHOLD": 1.0 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/actions.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/01/actions.npz new file mode 100644 index 0000000000000000000000000000000000000000..a4e918bc64bd2626dad72f9c3d7b6d4d2d30c909 GIT binary patch literal 271 zcmWIWW@Zs#U|`??Vnv2siDrqNK$b!@NJNAoC9xz?FR!4IkwE|~29#m|$%DY#6OLSr zi41KIH literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/agent_exec_times.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/01/agent_exec_times.npz new file mode 100644 index 0000000000000000000000000000000000000000..ea20bc6a3cc7228353a2fc8f43aaabd0ca19a4e5 GIT binary patch literal 216 zcmWIWW@Zs#U|`??Vnv3J3d`GrfGhzfkcbFFN@7W(US2^ZBZB}~3@F6_k_Um=Z^U0o z3!FR=a4cZ$yh%}WVwU7BU6409ZPB{L3+7FW4+)wwLwtVxlu2Ad<=$sB{aCxi(^bTl zF#VKjV`HWfh>kDkcbFFN@7W(US2^ZBZB}~3?v1X2hwj(Y}8{3 z6gmEIb!bJ~?bu10VT*2b9Ld=%dr>3AXk+mr0d3<=y&UfsJmM|6*Ps!yr<*-MVqsuV z{r)GXPyW3B=H2@@vN}s$cWG?iX8-C`nqKtAz*R9x_vV(LeferJ$d`J``k;_vLB7^wEuedZJ*z-(S u=dA;|5-(`DZ^szm&B!FejLYi??G20|HY^|lyjj^md`2KN1JXZ190ma6HE7uY literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_meta.json b/grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_meta.json new file mode 100644 index 00000000..f40a89c3 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_meta.json @@ -0,0 +1,11 @@ +{ + "agent_seed": null, + "backend_type": "PandaPowerBackend_rte_case5_example", + "chronics_max_timestep": "100", + "chronics_path": "/home/donnotben/Documents/grid2op_dev/grid2op/data/rte_case5_example/chronics/01", + "cumulative_reward": 0.0, + "env_seed": null, + "env_type": "Environment_rte_case5_example", + "grid_path": "/home/donnotben/Documents/grid2op_dev/grid2op/data/rte_case5_example/grid.json", + "nb_timestep_played": 1 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_times.json b/grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_times.json new file mode 100644 index 00000000..83c50070 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/01/episode_times.json @@ -0,0 +1,12 @@ +{ + "Agent": { + "total": 3.0235001759137958e-05 + }, + "Env": { + "apply_act": 0.003892230997735169, + "observation_computation": 0.0, + "powerflow_computation": 0.06602870100323344, + "total": 0.0699209320009686 + }, + "total": 0.07084095099708065 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/grid2op.info b/grid2op/data_test/runner_data/res_agent_1.10.4/01/grid2op.info new file mode 100644 index 00000000..bcdf33ac --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.4/01/grid2op.info @@ -0,0 +1,3 @@ +{ + "version": "1.10.4" +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/observations.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/01/observations.npz new file mode 100644 index 0000000000000000000000000000000000000000..759857b42953470c7200fd15b762c7e50a3cfb2b GIT binary patch literal 742 zcmWIWW@Zs#U|`??Vnv3-Mlsn5ObiS=f)!T#a3*NH_xUL10lKAz{M+U*vyX2zLX5#1>rUa>8DNf#tr)p}Lz0;HwhEaP69 zByM-hE9QmM?h}`K=gu@)G^vG)akF5E2dm=*B@R`_xwj461ciDyV*mX6&|JN*nE$@* z^!Lwot!HgBJI~3-=DvCN=h)p=o289z_O_bd+~u?F!o{8YH-Ei7t?%63pIi2=+`3jf zer5UF+`H4)uL-|W9~D1+W&HlC)YxU##;dQeSgYIdH_eL?m~!Yrs#oH|fD^s8QoZM5 zPN^vS&i^CH;{0(*<;4#dTvGo>R=j(&_SDRM1r;y88{FMpTx>A!y1B%4+2|;_ACDGa zI`LGUH~jW~?)^4(7FAc`c!Ifa^R*vl-uuzq`}y(feldN1cGhBd_ZRNlpLkpU=@tLq z^&0+PXBEA?_n`igTzA-?xjE8#UUfPD)Z=dccE4j`H_aygn}J_!rtY!3v#+~~S6^?d z_M4xzW7D^Q%!6~cecIW6-D~C3<@{6D^~b!CkNsL$zwu|7<-gZHJC}XDZn67$%9K^H z|4T#OhVS+Nx^vgQ+V6!%aknR#{Q2e>R8wXCul#Cr%E|D>g|9Zh6@Rqz_~bjC%CbAZ z@h`sfX`buOBD<4wvm`ToY$G>WnE%|r+&DPR%3gZ2r+;Bp{`8V(%l4;leZG2UbQ>htAU%<}hptR8>*f7<7>iS+x&*7ttSGd@!qHG9_U>%qU|Ac=!Qvcf)& lA;6oFNrV|!+C*5;zzAZ)Qfh!VD;tQ<2!v)pdKNgf0sz=^ExZ5# literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.4/01/opponent_attack.npz b/grid2op/data_test/runner_data/res_agent_1.10.4/01/opponent_attack.npz new file mode 100644 index 0000000000000000000000000000000000000000..e05f269121334f0cb4e2072ef79bb0768da95322 GIT binary patch literal 206 zcmWIWW@Zs#U|`??Vnv4fx;QTnAgci^BEpc8SdyrhS5V2wAOIEv3NwJ@L16Y9@mJCU zCr<<%3s^gEQq-K7C3#C1c9_Zdw;)-LgM6|p5u zKc(8(*sQqNW?6A< Date: Tue, 15 Oct 2024 10:26:39 +0200 Subject: [PATCH 14/21] fixing the url to point to Grid2op/grid2op instead of rte-france/grid2op [skip ci] Signed-off-by: DONNOT Benjamin --- CHANGELOG.rst | 357 +++++++++--------- CONTRIBUTING.md | 14 +- README.md | 49 ++- binder/environment.yml | 7 +- docs/developer/create_an_environment.rst | 2 +- docs/developer/createbackend.rst | 2 +- docs/final.rst | 2 +- docs/grid2op.rst | 4 +- docs/grid_graph.rst | 4 +- docs/makeenv.rst | 2 +- docs/model_based.rst | 4 +- docs/quickstart.rst | 4 +- docs/user/opponent.rst | 2 +- docs/user/simulator.rst | 2 +- grid2op/Action/_backendAction.py | 2 +- grid2op/Action/serializableActionSpace.py | 2 +- grid2op/Backend/pandaPowerBackend.py | 2 +- grid2op/Chronics/fromChronix2grid.py | 2 +- grid2op/Chronics/fromNPY.py | 4 +- grid2op/Chronics/gridValue.py | 2 +- grid2op/Converter/AnalogStateConverter.py | 2 +- grid2op/Converter/ConnectivityConverter.py | 2 +- grid2op/Environment/environment.py | 4 +- grid2op/MakeEnv/Make.py | 4 +- grid2op/MakeEnv/MakeFromPath.py | 4 +- grid2op/MakeEnv/UpdateEnv.py | 2 +- grid2op/MakeEnv/get_default_aux.py | 4 +- grid2op/Observation/baseObservation.py | 14 +- grid2op/Reward/baseReward.py | 2 +- grid2op/Runner/runner.py | 2 +- grid2op/_create_test_suite.py | 2 +- .../data_test/5bus_fake_grid_format/readme.md | 2 +- grid2op/simulator/simulator.py | 2 +- grid2op/tests/BaseBackendTest.py | 2 +- grid2op/tests/BaseRedispTest.py | 2 +- grid2op/tests/helper_path_test.py | 2 +- grid2op/tests/test_Agent.py | 2 +- grid2op/tests/test_Environment.py | 2 +- grid2op/tests/test_gym_asynch_env.py | 2 +- grid2op/tests/test_gym_env_renderer.py | 2 +- grid2op/tests/test_issue_319.py | 2 +- grid2op/tests/test_issue_321.py | 2 +- grid2op/tests/test_issue_327.py | 2 +- grid2op/tests/test_issue_331.py | 2 +- grid2op/tests/test_issue_340.py | 2 +- grid2op/tests/test_issue_361.py | 2 +- grid2op/tests/test_issue_364.py | 2 +- grid2op/tests/test_issue_367.py | 2 +- grid2op/tests/test_issue_369.py | 2 +- grid2op/tests/test_issue_374.py | 2 +- grid2op/tests/test_issue_377.py | 2 +- grid2op/tests/test_issue_379.py | 2 +- grid2op/tests/test_issue_380.py | 2 +- grid2op/tests/test_issue_389.py | 2 +- grid2op/tests/test_issue_396.py | 2 +- grid2op/tests/test_issue_616.py | 2 +- grid2op/tests/test_issue_617.py | 2 +- grid2op/tests/test_issue_sim2real_storage.py | 4 +- .../test_remove_line_status_from_topo.py | 2 +- 59 files changed, 299 insertions(+), 270 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e9116b35..49f356cb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,17 +1,9 @@ -Change Log -=========== - [TODO] -------------------- -- [???] closer integration with `gym` especially the "register env", being able to - create an env from a string etc. -- [???] clean the notebook on RL -- [???] use the typing module for type annotation. - [???] use some kind of "env.get_state()" when simulating instead of recoding everything "by hand" - [???] use "backend.get_action_to_set()" in simulate - [???] model better the voltage, include voltage constraints - [???] use the prod_p_forecasted and co in the "next_chronics" of simulate -- [???] add a "_cst_" or something in the `const` member of all the classes - [???] in deepcopy of env, make tests that the "pointers" are properly propagated in the attributes (for example `envcpy._game_rules.legal_action` should not be copied when building `envcpy._helper_action_env`) - [???] add multi agent @@ -23,48 +15,77 @@ Change Log - [???] model delay in observations - [???] model delay in action - [???] Code and test the "load from disk" method -- [???] Make the redispatching data independent from the time step (eg instead of "in MW / step" have it in "MW / h") - and have grid2op convert it to MW / step - [???] add a "plot action" method - [???] in MultiEnv, when some converter of the observations are used, have each child process to compute it in parallel and transfer the resulting data. - [???] "asynch" multienv - [???] properly model interconnecting powerlines -Work kind of in progress ----------------------------------- -- TODO A number of max buses per sub -- TODO in the runner, save multiple times the same sceanrio -- TODO in the gym env, make the action_space and observation_space attribute - filled automatically (see ray integration, it's boring to have to copy paste...) - -Next release +Next few releases --------------------------------- + +General grid2op improvments: + - numpy 2 compat (need pandapower for that) -- automatic read from local dir also on windows ! -- TODO doc for the "new" feature of automatic "experimental_read_from_local_dir" - TODO bug on maintenance starting at midnight (they are not correctly handled in the observation) => cf script test_issue_616 +- TODO A number of max buses per sub +- TODO in the runner, save multiple times the same scenario +- TODO improve type annotation for all public functions +- TODO add a "_cst_" or something for the `const` members of all the classes +- TODO properly document and type hint all public members of all the public classes +- TODO properly implement the copy and "deepcopy" API +- TODO Make the redispatching data independent from the time step (eg instead of "in MW / step" have it in "MW / h") + and have grid2op convert it to MW / step + +Better multi processing support: + +- automatic read from local dir also on windows ! +- TODO doc for the "new" feature of automatic "experimental_read_from_local_dir" +- TODO extend this feature to work also on windows based OS +- TODO finish the test in automatic_classes + + +Features related to gymnasium compatibility: + - TODO put the Grid2opEnvWrapper directly in grid2op as GymEnv - TODO faster gym_compat (especially for DiscreteActSpace and BoxGymObsSpace) - TODO Notebook for tf_agents - TODO Notebook for acme - TODO Notebook using "keras rl" (see https://keras.io/examples/rl/ppo_cartpole/) - TODO example for MCTS https://github.com/bwfbowen/muax et https://github.com/google-deepmind/mctx -- TODO jax everything that can be: create a simple env based on jax for topology manipulation, without - redispatching or rules -- TODO backend in jax, maybe ? - TODO done and truncated properly handled in gym_compat module (when game over before the end it's probably truncated and not done) - TODO when reset, have an attribute "reset_infos" with some infos about the way reset was called. +- TODO on CI: test only gym, only gymnasium and keep current test for both gym and gymnasium +- TODO refactor the gym_compat module to have a "legacy" stuff exactly like today + and the current class only supporting gymnasium (with possibly improved speed) +- TODO in the gym env, make the action_space and observation_space attribute + filled automatically (see ray integration, it's boring to have to copy paste...) +- [???] closer integration with `gymnasium` especially the "register env", being able to + create an env from a string etc. + +Grid2op extended features: + - TODO ForecastEnv in MaskedEnv ! (and obs.simulate there too !) -- TODO finish the test in automatic_classes - TODO in multi-mix increase the reset options with the mix the user wants - TODO L2RPN scores as reward (sum loads after the game over and have it in the final reward) -- TODO on CI: test only gym, only gymnasium and keep current test for both gym and gymnasium -- TODO work on the reward class (see https://github.com/rte-france/Grid2Op/issues/584) +- TODO work on the reward class (see https://github.com/Grid2Op/grid2op/issues/584) +- TODO jax everything that can be: create a simple env based on jax for topology manipulation, without + redispatching or rules +- TODO backend in jax, maybe ? + +Native multi agents support: +- cf ad-hoc branch (dev-multiagents) + +[1.10.4] - 2024-10-15 +------------------------- +- [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) +- [IMPROVED] clarity of the "work in progress" in this CHANGELOG [1.10.4] - 2024-10-14 ------------------------- @@ -111,14 +132,14 @@ Next release 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 - https://github.com/rte-france/Grid2Op/issues/616 + https://github.com/Grid2Op/grid2op/issues/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 - https://github.com/rte-france/Grid2Op/issues/617 + https://github.com/Grid2Op/grid2op/issues/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 @@ -220,7 +241,7 @@ Next release [1.10.1] - 2024-03-xx ---------------------- -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/593 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/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 @@ -279,13 +300,13 @@ Next release - [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 https://github.com/rte-france/Grid2Op/issues/569) +- [FIXED] an issue with imageio having deprecated the `fps` kwargs (see https://github.com/Grid2Op/grid2op/issues/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 - https://github.com/rte-france/Grid2Op/issues/577). This was caused by the modification of + https://github.com/Grid2Op/grid2op/issues/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 https://github.com/rte-france/Grid2Op/issues/571 + for some part of the grid (`MaskedEnvironment`) see https://github.com/Grid2Op/grid2op/issues/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 @@ -313,8 +334,8 @@ Next release 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/rte-france/Grid2Op/issues/561 (indent issue) -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/550 : issue with `shunts_data_available` now better handled +- [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` @@ -336,7 +357,7 @@ Next release 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/rte-france/Grid2Op/issues/538 + 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 @@ -345,7 +366,7 @@ Next release - [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/rte-france/Grid2Op/issues/429 + 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 @@ -358,12 +379,12 @@ Next release [1.9.5] - 2023-09-18 --------------------- -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/518 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/446 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/523 by having a "_BackendAction" folder instead of a file -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/522 and adding back certain notebooks to the CI +- [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/rte-france/Grid2Op/issues/527 : now do nothing action are detected in +- [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...) @@ -371,20 +392,20 @@ Next release --------------------- - [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/rte-france/Grid2Op/issues/511 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/508 +- [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/rte-france/Grid2Op/issues/509) +- [IMPROVED] doc of `obs.to_dict` and `obs.to_json` (see https://github.com/Grid2Op/grid2op/issues/509) [1.9.3] - 2023-07-28 --------------------- - [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-france#503](https://github.com/rte-france/Grid2Op/issues/503) + [rte-france#503](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 @@ -413,7 +434,7 @@ Next release 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/rte-france/Grid2Op/issues/494 +- [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 @@ -495,7 +516,7 @@ Next release returns also the total number of steps of the environment. - [FIXED] a bug in `PandapowerBackend` when running in dc mode (voltages were not read correctly from the generators) -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/389 which was caused by 2 independant things: +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/389 which was caused by 2 independant things: 1) the `PandapowerBackend` did not compute the `theta` correctly on powerline especially if they are connected to a disconnected bus (in this case I chose to put `theta=0`) @@ -509,11 +530,11 @@ Next release - [FIXED] a bug when the storage unit names where not set in the backend and needed to be set automatically (wrong names were used) - [FIXED] a bug in `PandaPowerBackend` when using `BackendConverter` and one the backend do not support shunts. -- [FIXED] 2 issues related to gym env: https://github.com/rte-france/Grid2Op/issues/407 and - https://github.com/rte-france/Grid2Op/issues/418 +- [FIXED] 2 issues related to gym env: https://github.com/Grid2Op/grid2op/issues/407 and + https://github.com/Grid2Op/grid2op/issues/418 - [FIXED] some bus in the `obs.get_energy_graph` (previously `obs.as_networkx()`) for the cooldowns of substation -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/396 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/403 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/396 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/403 - [FIXED] a bug in `PandaPowerBackend` when it was copied (the kwargs used to build it were not propagated) - [FIXED] a bug in the `Runner` when the time series class used is not `MultiFolder` (*eg* `GridStateFromFile`): we could not run twice the same environment. @@ -522,7 +543,7 @@ Next release ignored when "chunk_size" was set. - [FIXED] a bug when shunts were alone in `backend.check_kirchoff()` - [FIXED] an issue with "max_iter" in the runner when `MultifolderWithCache` - (see issue https://github.com/rte-france/Grid2Op/issues/447) + (see issue https://github.com/Grid2Op/grid2op/issues/447) - [FIXED] a bug in `MultifolderWithCache` when seeding was applied - [ADDED] the function `obs.get_forecast_env()` that is able to generate a grid2op environment from the forecasts data in the observation. This is especially useful in model based RL. @@ -546,7 +567,7 @@ Next release - [ADDED] Runner is now able to store if an action is legal or ambiguous - [ADDED] experimental support to count the number of "high resolution simulator" (`obs.simulate`, `obs.get_simulator` and `obs.get_forecast_env`) in the environment (see - https://github.com/rte-france/Grid2Op/issues/417). It might not work properly in distributed settings + https://github.com/Grid2Op/grid2op/issues/417). It might not work properly in distributed settings (if the agents uses parrallel processing or if MultiProcessEnv is used), in MultiMixEnv, etc. - [ADDED] it now possible to check the some rules based on the definition of areas on the grid. @@ -559,7 +580,7 @@ Next release is by default encoded by `0` - [IMPROVED] documentation of `BaseObservation` and its attributes - [IMPROVED] `PandapowerBackend` can now be loaded even if the underlying grid does not converge in `AC` (but - it should still converge in `DC`) see https://github.com/rte-france/Grid2Op/issues/391 + it should still converge in `DC`) see https://github.com/Grid2Op/grid2op/issues/391 - [IMPROVED] `obs.get_energy_graph` (previously `obs.as_networkx()`) method: almost all powerlines attributes can now be read from the resulting graph object. @@ -606,27 +627,27 @@ Next release --------------------- - [BREAKING] now requires numpy >= 1.20 to work (otherwise there are issues with newer versions of pandas). -- [BREAKING] issue https://github.com/rte-france/Grid2Op/issues/379 requires +- [BREAKING] issue https://github.com/Grid2Op/grid2op/issues/379 requires different behaviour depending on installed gym package. - [BREAKING] cooldowns are not consistent between `env.step` and `obs.simulate`. If `obs.time_before_cooldown_line[l_id] > 0` it will be illegal, at the next call to `env.step` (and `obs.simulate`) to modify the status of this powerline `l_id`. Same for `obs.time_before_cooldown_sub[s_id] > 0` if trying to modify topology of substation `s_id`. This also impacts the maintenances and hazards. - This is also linked to github issue https://github.com/rte-france/Grid2Op/issues/148 + This is also linked to github issue https://github.com/Grid2Op/grid2op/issues/148 - [FIXED] a bug when using a `Runner` with an environment that has - been copied (see https://github.com/rte-france/Grid2Op/issues/361) -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/358 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/363 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/364 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/365 and - https://github.com/rte-france/Grid2Op/issues/376 . Now the function(s) + been copied (see https://github.com/Grid2Op/grid2op/issues/361) +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/358 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/363 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/364 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/365 and + https://github.com/Grid2Op/grid2op/issues/376 . Now the function(s) `gridobj.process_shunt_data` and `gridobj.process_grid2op_shunt_data` are called `gridobj.process_shunt_static_data` -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/367 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/369 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/374 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/377 by adding a special +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/367 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/369 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/374 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/377 by adding a special method `backend.update_thermal_limit_from_vect` - [ADDED] the "`packaging`" python package is now required to install grid2op. It allows to support different `gym` versions that changes behavior regarding @@ -634,20 +655,20 @@ Next release - [ADDED] the function `act.remove_line_status_from_topo` to ignore the line status modification that would be induced by "set_bus" or "change_bus" when some cooldown applies on the powerline. - [IMPROVED] clarify documentation of gym compat module (see - https://github.com/rte-france/Grid2Op/issues/372 and - https://github.com/rte-france/Grid2Op/issues/373) as well as the doc - for MultifolderWithCache (see https://github.com/rte-france/Grid2Op/issues/370) + https://github.com/Grid2Op/grid2op/issues/372 and + https://github.com/Grid2Op/grid2op/issues/373) as well as the doc + for MultifolderWithCache (see https://github.com/Grid2Op/grid2op/issues/370) [1.7.2] - 2022-07-05 -------------------- -- [FIXED] seeding issue https://github.com/rte-france/Grid2Op/issues/331 -- [FIXED] clarify doc about fixed size matrices / graphs https://github.com/rte-france/Grid2Op/issues/330 +- [FIXED] seeding issue https://github.com/Grid2Op/grid2op/issues/331 +- [FIXED] clarify doc about fixed size matrices / graphs https://github.com/Grid2Op/grid2op/issues/330 - [FIXED] improved the behaviour of `obs._get_bus_id` and `obs._aux_fun_get_bus` : when some objects were on busbar 2 they had a "wrong" bus id (it was lagged by 1) meaning an empty "bus" was introduced. - [FIXED] an issue with `obs.state_of(...)` when inspecting storage units - (see https://github.com/rte-france/Grid2Op/issues/340) + (see https://github.com/Grid2Op/grid2op/issues/340) - [FIXED] an issue with `act0 + act1` when curtailment was applied - (see https://github.com/rte-france/Grid2Op/issues/340) + (see https://github.com/Grid2Op/grid2op/issues/340) - [FIXED] a slight "bug" in the formula to compute the redispatching cost for L2RPN 2022 competition. - [IMPROVED] possibility to pass the env variable `_GRID2OP_FORCE_TEST` to force the flag of "test=True" when creating an environment. This is especially useful when testing to prevent @@ -662,10 +683,10 @@ Next release `PandapowerBackend`. So if you made a class that inherit from it, you should add these arguments in the constructor (otherwise you will not be able to use the runner) [This should not impact lot of codes, if any] -- [FIXED] a documentation issue https://github.com/rte-france/Grid2Op/issues/281 +- [FIXED] a documentation issue https://github.com/Grid2Op/grid2op/issues/281 - [FIXED] a bug preventing to use the `FromChronix2grid` chronics class when there is an opponent on the grid. -- [FIXED] a documentation issue https://github.com/rte-france/Grid2Op/issues/319 +- [FIXED] a documentation issue https://github.com/Grid2Op/grid2op/issues/319 on notebook 11 - [FIXED] some issues when the backend does not support shunts data (caused during the computation of the size of the observation) Tests are now performed in @@ -675,7 +696,7 @@ Next release is the case for `l2rpn_wcci_2022` env. For this env, your are forced to use grid2op version >= 1.7.1 - [FIXED] an issue when converting a "done" action as a graph, see - https://github.com/rte-france/Grid2Op/issues/327 + https://github.com/Grid2Op/grid2op/issues/327 - [ADDED] score function for the L2RPN WCCI 2022 competition - [IMPROVED] adding the compatibility with logger in the reward functions. - [IMPROVED] when there is a game over caused by redispatching, the observation is @@ -685,7 +706,7 @@ Next release - [IMPROVED] the arguments used to create a backend can be (if used properly) re used (without copy !) when making a `Runner` from an environment for example. - [IMPROVED] description and definition of `obs.curtailment_limit_effective` are now - consistent (issue https://github.com/rte-france/Grid2Op/issues/321) + consistent (issue https://github.com/Grid2Op/grid2op/issues/321) [1.7.0] - 2022-04-29 --------------------- @@ -694,7 +715,7 @@ Next release This impacts also `ScoreICAPS2021` and `ScoreL2RPN2020`. - [BREAKING] in the "gym_compat" module the curtailment action type has for dimension the number of dispatchable generators (as opposed to all generators - before) this was mandatory to fix issue https://github.com/rte-france/Grid2Op/issues/282 + before) this was mandatory to fix issue https://github.com/Grid2Op/grid2op/issues/282 - [BREAKING] the size of the continuous action space for the redispatching in case of gym compatibility has also been adjusted to be consistent with curtailment. Before it has the size of `env.n_gen` now `np.sum(env.gen_redispatchable)`. @@ -702,9 +723,9 @@ Next release - [BREAKING] adding the `curtailment_limit_effective` in the observation converted to gym. This changes the sizes of the gym observation. - [FIXED] a bug preventing to use `backend.update_from_obs` when there are shunts on the grid for `PandapowerBackend` -- [FIXED] a bug in the gym action space: see issue https://github.com/rte-france/Grid2Op/issues/281 -- [FIXED] a bug in the gym box action space: see issue https://github.com/rte-france/Grid2Op/issues/283 -- [FIXED] a bug when using `MultifolderWithCache` and `Runner` (see issue https://github.com/rte-france/Grid2Op/issues/285) +- [FIXED] a bug in the gym action space: see issue https://github.com/Grid2Op/grid2op/issues/281 +- [FIXED] a bug in the gym box action space: see issue https://github.com/Grid2Op/grid2op/issues/283 +- [FIXED] a bug when using `MultifolderWithCache` and `Runner` (see issue https://github.com/Grid2Op/grid2op/issues/285) - [FIXED] a bug in the `env.train_val_split_random` where sometimes some wrong chronics name were sampled. - [FIXED] the `max` value of the observation space is now 1.3 * pmax to account for the slack bus (it was @@ -723,8 +744,8 @@ Next release - [FIXED] a bug in the hashing of environment in case of storage units (the characteristics of the storage units were not taken into account in the hash). - [FIXED] a bug in the `obs.as_dict()` method. -- [FIXED] a bug in when using the "env.generate_classe()" https://github.com/rte-france/Grid2Op/issues/310 -- [FIXED] another bug in when using the "env.generate_classe()" on windows https://github.com/rte-france/Grid2Op/issues/311 +- [FIXED] a bug in when using the "env.generate_classe()" https://github.com/Grid2Op/grid2op/issues/310 +- [FIXED] another bug in when using the "env.generate_classe()" on windows https://github.com/Grid2Op/grid2op/issues/311 - [ADDED] a function `normalize_attr` allowing to easily scale some data for the `BoxGymObsSpace` and `BoxGymActSpace` - [ADDED] support for distributed slack in pandapower (if supported) @@ -773,32 +794,32 @@ Next release are to be expected in following versions). - [FIXED] a bug for the EpisodeData that did not save the first observation when "add_detailed_output" was set to ``True`` and the data were not saved on disk. -- [FIXED] an issue when copying the environment with the opponent (see issue https://github.com/rte-france/Grid2Op/issues/274) +- [FIXED] an issue when copying the environment with the opponent (see issue https://github.com/Grid2Op/grid2op/issues/274) - [FIXED] a bug leading to the wrong "backend.get_action_to_set()" when there were storage units on the grid. - [FIXED] a bug in the "BackendConverter" when there are storage on the grid -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/265 -- [FIXED] issue https://github.com/rte-france/Grid2Op/issues/261 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/265 +- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/261 - [ADDED] possibility to "env.set_id" by giving only the folder of the chronics and not the whole path. - [ADDED] function "env.chronics_handler.available_chronics()" to return the list of available chronics for a given environment - [ADDED] possibility, through the `Parameters` class, to limit the number of possible calls to `obs.simulate(...)` - see `param.MAX_SIMULATE_PER_STEP` and `param.MAX_SIMULATE_PER_EPISODE` (see issue https://github.com/rte-france/Grid2Op/issues/273) -- [ADDED] a class to generate a "Chronics" readable by grid2op from numpy arrays (see https://github.com/rte-france/Grid2Op/issues/271) + see `param.MAX_SIMULATE_PER_STEP` and `param.MAX_SIMULATE_PER_EPISODE` (see issue https://github.com/Grid2Op/grid2op/issues/273) +- [ADDED] a class to generate a "Chronics" readable by grid2op from numpy arrays (see https://github.com/Grid2Op/grid2op/issues/271) - [ADDED] an attribute `delta_time` in the observation that tells the time (in minutes) between two consecutive steps. - [ADDED] a method of the action space to show a list of actions to get back to the original topology - (see https://github.com/rte-france/Grid2Op/issues/275) + (see https://github.com/Grid2Op/grid2op/issues/275) `env.action_space.get_back_to_ref_state(obs)` - [ADDED] a method of the action to store it in a grid2op independant fashion (using json and dictionaries), see `act.as_serializable_dict()` - [ADDED] possibility to generate a gym `DiscreteActSpace` from a given list of actions (see - https://github.com/rte-france/Grid2Op/issues/277) + https://github.com/Grid2Op/grid2op/issues/277) - [ADDED] a class that output a noisy observation to the agent (see `NoisyObservation`): the agent sees the real values of the environment with some noise, this could used to model inacurate sensors. - [IMPROVED] observation now raises `Grid2OpException` instead of `RuntimeError` -- [IMRPOVED] docs (and notebooks) for the "split_train_val" https://github.com/rte-france/Grid2Op/issues/269 +- [IMRPOVED] docs (and notebooks) for the "split_train_val" https://github.com/Grid2Op/grid2op/issues/269 - [IMRPOVED] the "`env.split_train_val(...)`" function to also generate a test dataset see - https://github.com/rte-france/Grid2Op/issues/276 + https://github.com/Grid2Op/grid2op/issues/276 [1.6.4] - 2021-11-08 --------------------- @@ -810,7 +831,7 @@ Next release - [FIXED] a bug preventing to print the action space if some "part" of it had no size (empty action space) - [FIXED] a bug preventing to copy an action properly (especially for the alarm) - [FIXED] a bug that did not "close" the backend of the observation space when the environment was `closed`. This - might be related to `Issue#255 `_ + might be related to `Issue#255 `_ - [ADDED] serialization of `current_iter` and `max_iter` in the observation. - [ADDED] the possibility to use the runner only on certain episode id (see `runner.run(..., episode_id=[xxx, yyy, ...])`) @@ -832,7 +853,7 @@ Next release - [FIXED] a bug that allowed to use wrongly the function `backend.get_action_to_set()` even when the backend has diverged (which should not be possible) - [FIXED] a bug leading to non correct consideration of the status of powerlines right after the activation - of some protections (see `Issue#245 `_ ) + of some protections (see `Issue#245 `_ ) - [IMPROVED] the PandaPowerBackend is now able to load a grid with a distributed slack bus. When loaded though, the said grid will be converted to one with a single slack bus (the first slack among the distributed) - [IMPROVED] massive speed-ups when copying environment or using `obs.simulate` (sometimes higher than 30x speed up) @@ -865,7 +886,7 @@ Next release [1.6.0] (hotfix) - 2021-06-23 ------------------------------ -- [FIXED] issue `Issue#235 `_ issue when using the "simulate" +- [FIXED] issue `Issue#235 `_ issue when using the "simulate" feature in case of divergence of powerflow. [1.6.0] - 2021-06-22 @@ -880,21 +901,21 @@ Next release (**NB** we higly recommend importing the `Runner` like `from grid2op.Runner import Runner` though !) - [FIXED]: the L2RPN_2020 score has been updated to reflect the score used during these competitions (there was an error between `DoNothingAgent` and `RecoPowerlineAgent`) - [see `Issue#228 `_ ] + [see `Issue#228 `_ ] - [FIXED]: some bugs in the `action_space.get_all_unitary_redispatch` and `action_space.get_all_unitary_curtail` - [FIXED]: some bugs in the `GreedyAgent` and `TopologyGreedy` -- [FIXED]: `Issue#220 `_ `flow_bus_matrix` did not took into +- [FIXED]: `Issue#220 `_ `flow_bus_matrix` did not took into account disconnected powerlines, leading to impossibility to compute this matrix in some cases. -- [FIXED]: `Issue#223 `_ : now able to plot a grid even +- [FIXED]: `Issue#223 `_ : now able to plot a grid even if there is nothing controllable in grid2op present in it. - [FIXED]: an issue where the parameters would not be completely saved when saved in json format (alarm feature was - absent) (related to `Issue#224 `_ ) + absent) (related to `Issue#224 `_ ) - [FIXED]: an error caused by the observation non being copied when a game over occurred that caused some issue in - some cases (related to `Issue#226 `_ ) + some cases (related to `Issue#226 `_ ) - [FIXED]: a bug in the opponent space where the "`previous_fail`" kwargs was not updated properly and send wrongly to the opponent - [FIXED]: a bug in the geometric opponent when it did attack that failed. -- [FIXED]: `Issue#229 `_ typo in the `AlarmReward` class when reset. +- [FIXED]: `Issue#229 `_ typo in the `AlarmReward` class when reset. - [ADDED] support for the "alarm operator" / "attention budget" feature - [ADDED] retrieval of the `max_step` (ie the maximum number of step that can be performed for the current episode) in the observation @@ -905,11 +926,11 @@ Next release - [ADDED] a first version of the "l2rpn_icaps_2021" environment (accessible with `grid2op.make("l2rpn_icaps_2021", test=True)`) - [IMPROVED] prevent the use of the same instance of a backend in different environments -- [IMPROVED] `Issue#217 `_ : no more errors when trying to +- [IMPROVED] `Issue#217 `_ : no more errors when trying to load a grid with unsupported elements (eg. 3w trafos or static generators) by PandaPowerBackend -- [IMPROVED] `Issue#215 `_ : warnings are issued when elements +- [IMPROVED] `Issue#215 `_ : warnings are issued when elements present in pandapower grid will not be modified grid2op side. -- [IMPROVED] `Issue#214 `_ : adding the shunt information +- [IMPROVED] `Issue#214 `_ : adding the shunt information in the observation documentation. - [IMPROVED] documentation to use the `env.change_paramters` function. @@ -920,10 +941,10 @@ Next release new change. (for previously coded opponent, the only thing you have to do to make it compliant with the new interface is, in the `opponent.attack(...)` function return `whatever_you_returned_before, None` instead of simply `whatever_you_returned_before`) -- [FIXED]: `Issue#196 `_ an issue related to the +- [FIXED]: `Issue#196 `_ an issue related to the low / high of the observation if using the gym_compat module. Some more protections are enforced now. -- [FIXED]: `Issue#196 `_ an issue related the scaling when negative +- [FIXED]: `Issue#196 `_ an issue related the scaling when negative numbers are used (in these cases low / max would be mixed up) - [FIXED]: an issue with the `IncreasingFlatReward` reward types - [FIXED]: a bug due to the conversion of int to float in the range of the `BoxActionSpace` for the `gym_compat` module @@ -942,30 +963,30 @@ Next release See the `GeometricOpponent`. - [IMPROVED]: on windows at least, grid2op does not work with gym < 0.17.2 Checks are performed in order to make sure the installed open ai gym package meets this requirement (see issue - `Issue#185 `_ ) + `Issue#185 `_ ) - [IMPROVED] the seed of openAI gym for composed action space (see issue `https://github.com/openai/gym/issues/2166`): in waiting for an official fix, grid2op will use the solution proposed there https://github.com/openai/gym/issues/2166#issuecomment-803984619 [1.5.1] - 2021-04-15 ----------------------- -- [FIXED]: `Issue#194 `_: (post release): change the name +- [FIXED]: `Issue#194 `_: (post release): change the name of the file `platform.py` that could be mixed with the python "platform" module to `_glop_platform_info.py` -- [FIXED]: `Issue #187 `_: improve the computation and the +- [FIXED]: `Issue #187 `_: improve the computation and the documentation of the `RedispReward`. This has an impact on the `env.reward_range` of all environments using this reward, because the old "reward_max" was not correct. -- [FIXED] `Issue #181 `_ : now environment can be created with +- [FIXED] `Issue #181 `_ : now environment can be created with a layout and a warning is issued in this case. -- [FIXED] `Issue #180 `_ : it is now possible to set the thermal +- [FIXED] `Issue #180 `_ : it is now possible to set the thermal limit with a dictionary - [FIXED] a typo that would cause the attack to be discarded in the runner in some cases (cases for now not used) - [FIXED] an issue linked to the transformation into gym box space for some environments, - this **might** be linked to `Issue #185 `_ + this **might** be linked to `Issue #185 `_ - [ADDED] a feature to retrieve the voltage angle (theta) in the backend (`backend.get_theta`) and in the observation. - [ADDED] support for multimix in the GymEnv (lack of support spotted thanks to - `Issue #185 `_ ) + `Issue #185 `_ ) - [ADDED] basic documentation of the environment available. -- [ADDED] `Issue #166 `_ : support for simulate in multi environment +- [ADDED] `Issue #166 `_ : support for simulate in multi environment settings. - [IMPROVED] extra layer of security preventing modification of `observation_space` and `action_space` of environment - [IMPROVED] better handling of dynamically generated classes @@ -997,7 +1018,7 @@ Next release instead of `prod_p`, `prod_q` and `prod_v` (old names are still accessible for backward compatibility in the observation space) but conversion to json / dict will be affected as well as the converters (*eg* for gym compatibility) -- [FIXED] `Issue #164 `_: reward is now properly computed +- [FIXED] `Issue #164 `_: reward is now properly computed at the end of an episode. - [FIXED] A bug where after running a Runner, the corresponding EpisodeData's CollectionWrapper where not properly updated, and did not contain any objects. @@ -1013,9 +1034,9 @@ Next release - [FIXED] a bug in the serialization (as vector) of some action classes, namely: `PowerlineSetAction` and `PowerlineSetAndDispatchAction` and `PowerlineChangeDispatchAndStorageAction` - [FIXED] a bug preventing to use the `obs.XXX_matrix()` function twice -- [FIXED] issue `Issue #172 `_: wrong assertion was made preventing +- [FIXED] issue `Issue #172 `_: wrong assertion was made preventing the use of `env.train_val_split_random()` -- [FIXED] issue `Issue #173 `_: a full nan vector could be +- [FIXED] issue `Issue #173 `_: a full nan vector could be converted to action or observation without any issue if it had the proper dimension. This was due to a conversion to integer from float. - [FIXED] an issue preventing to load the grid2op.utils submodule when installed not in "develop" mode @@ -1081,9 +1102,9 @@ Next release --------------------- - [BREAKING] GymConverter has been moved to `grid2op.gym_compat` module instead of `grid2op.Converter` - [FIXED] wrong computation of voltage magnitude at extremity of powerlines when the powerlines were disconnected. -- [FIXED] `Issue #151 `_: modification of observation attributes 3 +- [FIXED] `Issue #151 `_: modification of observation attributes 3 could lead to crash -- [FIXED] `Issue #153 `_: negative generator could happen in some +- [FIXED] `Issue #153 `_: negative generator could happen in some cases - [FIXED] an error that lead to wrong normalization of some generator (due to slack bus) when using the gymconverter. @@ -1116,11 +1137,11 @@ Next release - [FIXED] an issue causing errors when using `action_space.change_bus` and `action_space.set_bus` - [FIXED] an issue in the sampling: redispatching and "change_bus" where always performed at the same time -- [FIXED] `Issue #144 `_: typo that could lead to not +- [FIXED] `Issue #144 `_: typo that could lead to not display some error messages in some cases. -- [FIXED] `Issue #146 `_: awkward behaviour that lead to not calling +- [FIXED] `Issue #146 `_: awkward behaviour that lead to not calling the reward function when the episode was over. -- [FIXED] `Issue #147 `_: un consistency between step and simulate +- [FIXED] `Issue #147 `_: un consistency between step and simulate when cooldowns where applied (rule checking was not using the right method). - [FIXED] An error preventing the loading of an Ambiguous Action (in case an agent took such action, the `EpisodeData` would not load it properly). @@ -1141,7 +1162,7 @@ Next release - [ADDED] a function that allows to modify some parameters of the environment (see `grid2op.update_env`) - [ADDED] a class to convert between two backends - [FIXED] out dated documentation in some classes -- [FIXED] `Issue #140`_: illegal action were +- [FIXED] `Issue #140`_: illegal action were not properly computed in some cases, especially in case of divergence of the powerflow. Also now the "why" the action is illegal is displayed (instead of a generic "this action is illegal"). - [FIXED] `LightSim Issue #10`_: @@ -1152,15 +1173,15 @@ Next release --------------------- - [ADDED] `ActionSpace.sample` method is now implemented - [ADDED] DeltaRedispatchRandomAgent: that takes redispatching actions of a configurable [-delta;+delta] in MW on random generators. -- [FIXED] `Issue #129`_: game over count for env_actions -- [FIXED] `Issue #127 `_: Removed no longer existing attribute docstring `indisponibility` -- [FIXED] `Issue #133 `_: Missing positional argument `space_prng` in `Action.SerializableActionSpace` -- [FIXED] `Issue #131 `_: Forecast values are accessible without needing to call `obs.simulate` beforehand. -- [FIXED] `Issue #134 `_: Backend iadd actions with lines extremities disconnections (set -1) -- [FIXED] issue `Issue #125 `_ -- [FIXED] issue `Issue #126 `_ Loading runner logs no longer checks environment actions ambiguity -- [IMPROVED] issue `Issue #16 `_ improving openai gym integration. -- [IMPROVED] `Issue #134 `_ lead us to review and rationalize the +- [FIXED] `Issue #129`_: game over count for env_actions +- [FIXED] `Issue #127 `_: Removed no longer existing attribute docstring `indisponibility` +- [FIXED] `Issue #133 `_: Missing positional argument `space_prng` in `Action.SerializableActionSpace` +- [FIXED] `Issue #131 `_: Forecast values are accessible without needing to call `obs.simulate` beforehand. +- [FIXED] `Issue #134 `_: Backend iadd actions with lines extremities disconnections (set -1) +- [FIXED] issue `Issue #125 `_ +- [FIXED] issue `Issue #126 `_ Loading runner logs no longer checks environment actions ambiguity +- [IMPROVED] issue `Issue #16 `_ improving openai gym integration. +- [IMPROVED] `Issue #134 `_ lead us to review and rationalize the behavior of grid2op concerning the powerline status. Now it behave more rationally and has now the following behavior: if a powerline origin / extremity bus is "set" to -1 at one end and not modified at the other, it will disconnect this powerline, if a powerline origin / extremity bus is "set" to 1 or 2 at one end and not modified at the other, it will @@ -1181,7 +1202,7 @@ Next release --------------------- - [FIXED] the EpisodeData now properly propagates the end of the episode - [FIXED] `MultiFolder.split_and_save` function did not use properly the "seed" -- [FIXED] issue `Issue 122 `_ +- [FIXED] issue `Issue 122 `_ - [FIXED] Loading of multimix environment when they are already present in the data cache. - [UPDATED] notebook 3 to reflect the change made a long time ago for the ambiguous action (when a powerline is reconnected) @@ -1206,7 +1227,7 @@ Next release - [FIXED] a weird effect on `env.reset` that did not reset the state of the previous observation held by the environment. This could have caused some issue in some corner cases. - [FIXED] `BaseAction.__iadd__` fixed a bug with change actions `+=` operator reported in - `Issue #116 `_ + `Issue #116 `_ - [FIXED] `obs.simulate` post-initialized reward behaves like the environment - [FIXED] `LinesReconnectedReward` fixes reward inverted range - [FIXED] the `get_all_unitary_topologies_change` now counts only once the "do nothing" action. @@ -1214,7 +1235,7 @@ Next release a problem. - [FIXED] `grid2op.make` will now raise an error if an invalid argument has been passed to it. - [FIXED] some arguments were not passed correctly to `env.get_kwargs()` or `env.get_params_for_runner()` -- [ADDED] `Issue #110 `_ Adding an agent that is able to reconnect +- [ADDED] `Issue #110 `_ Adding an agent that is able to reconnect disconnected powerlines that can be reconnected, see `grid2op.Agent.RecoPowerlineAgent` - [ADDED] a clearer explanation between illegal and ambiguous action. - [ADDED] `MultiEnvMultiProcess` as a new multi-process class to run different environments in multiples prallel @@ -1227,7 +1248,7 @@ Next release - [ADDED] the overload of "__getattr__" for environment running in parallel - [ADDED] capability to change the powerlines on which the opponent attack at the environment initialization - [UPDATED] `Backend.PandaPowerBackend.apply_action` vectorized backend apply action method for speed. -- [UPDATED] `Issue #111 `_ Converter is better documented to be +- [UPDATED] `Issue #111 `_ Converter is better documented to be more broadly usable. - [UPDATED] `MultiEnv` has been updated for new use case: Providing different environments configurations on the same grid and an arbitrary number of processes for each of these. @@ -1238,29 +1259,29 @@ Next release [0.9.4] - 2020-06-12 --------------------- -- [FIXED] `Issue #114 `_ the issue concerning the +- [FIXED] `Issue #114 `_ the issue concerning the bug for the maintenance. [0.9.3] - 2020-05-29 --------------------- -- [FIXED] `Issue #69 `_ MultEnvironment is now working with windows +- [FIXED] `Issue #69 `_ MultEnvironment is now working with windows based OS. -- [ADDED] `Issue #108 `_ Seed is now part of the public agent API. +- [ADDED] `Issue #108 `_ Seed is now part of the public agent API. The notebook has been updated accordingly. - [ADDED] Some function to disable the `obs.simulate` if wanted. This can lead to around 10~15% performance speed up in case `obs.simulate` is not used. See `env.deactivate_forecast` and `env.reactivate_forecast` - (related to `Issued #98 `_) + (related to `Issued #98 `_) - [UPDATED] the first introductory notebook. - [UPDATED] possibility to reconnect / disconnect powerline giving its name when using `reconnect_powerline` and `disconnect_powerline` methods of the action space. -- [UPDATED] `Issue #105 `_ problem solved for notebook 4. +- [UPDATED] `Issue #105 `_ problem solved for notebook 4. based OS. - [UPDATED] overall speed enhancement mostly in the `VoltageControler`, with the adding of the previous capability, some updates in the `BackendAction` - `Issued #98 `_ + `Issued #98 `_ - [UPDATED] Added `PlotMatplot` constructor arguments to control display of names and IDs of the grid elements - (gen, load, lines). As suggested in `Issue #106 `_ + (gen, load, lines). As suggested in `Issue #106 `_ [0.9.2] - 2020-05-26 @@ -1272,7 +1293,7 @@ Next release - [ADDED] a function that returns the types of the action see `action.get_types()` - [ADDED] a class to "cache" the data in memory instead of reading it over an over again from disk (see `grid2op.chronics.MultifolderWithCache` (related to - `Issued #98 `_) ) + `Issued #98 `_) ) - [ADDED] improve the documentation of the observation class. - [UPDATED] Reward `LinesReconnectedReward` to take into account maintenances downtimes - [UPDATED] Adds an option to disable plotting load and generators names when using `PlotMatplot` @@ -1284,26 +1305,26 @@ Next release [0.9.0] - 2020-05-19 ---------------------- -- [BREAKING] `Issue #83 `_: attributes name of the Parameters class +- [BREAKING] `Issue #83 `_: attributes name of the Parameters class are now more consistent with the rest of the package. Use `NB_TIMESTEP_OVERFLOW_ALLOWED` instead of `NB_TIMESTEP_POWERFLOW_ALLOWED`, `NB_TIMESTEP_COOLDOWN_LINE` instead of `NB_TIMESTEP_LINE_STATUS_REMODIF` and `NB_TIMESTEP_COOLDOWN_SUB` instead of `NB_TIMESTEP_TOPOLOGY_REMODIF` -- [BREAKING] `Issue #87 `_: algorithm of the environment that solves +- [BREAKING] `Issue #87 `_: algorithm of the environment that solves the redispatching to make sure the environment meet the phyiscal constraints is now cast into an optimization routine that uses `scipy.minimize` to be solved. This has a few consequences: more dispatch actions are tolerated, computation time can be increased in some cases, when the optimization problem cannot be solved, a game over is thrown, `scipy` is now a direct dependency of `grid2op`, code base of `grid2op` is simpler. - [BREAKING] any attempt to use an un intialized environment (*eg* after a game over but before calling `env.reset` will now raise a `Grid2OpException`) -- [FIXED] `Issue #84 `_: it is now possible to load multiple +- [FIXED] `Issue #84 `_: it is now possible to load multiple environments in the same python script and perform random action on each. -- [FIXED] `Issue #86 `_: the proper symmetries are used to generate +- [FIXED] `Issue #86 `_: the proper symmetries are used to generate all the actions that can "change" the buses (`SerializationActionSpace.get_all_unitary_topologies_change`). -- [FIXED] `Issue #88 `_: two flags are now used to tell the environment +- [FIXED] `Issue #88 `_: two flags are now used to tell the environment whether or not to activate the possibility to dispatch a turned on generator (`forbid_dispatch_off`) and whether or not to ignore the gen_min_uptimes and gen_min_downtime propertiers (`ignore_min_up_down_times`) that are initialized from the Parameters of the grid now. -- [FIXED] `Issue #89 `_: pandapower backend should not be compatible +- [FIXED] `Issue #89 `_: pandapower backend should not be compatible with changing the bus of the generator representing the slack bus. - [FIXED] Greedy agents now uses the proper data types `dt_float` for the simulated reward (previously it was platform dependant) @@ -1322,14 +1343,14 @@ Next release [0.8.2] - 2020-05-13 ---------------------- -- [FIXED] `Issue #75 `_: PlotGrid displays double powerlines correctly. +- [FIXED] `Issue #75 `_: PlotGrid displays double powerlines correctly. - [FIXED] Action `+=` operator (aka. `__iadd__`) doesn't create warnings when manipulating identical arrays containing `NaN` values. -- [FIXED] `Issue #70 `_: for powerline disconnected, now the voltage +- [FIXED] `Issue #70 `_: for powerline disconnected, now the voltage is properly set to `0.0` -- [UPDATED] `Issue #40 `_: now it is possible to retrieve the forecast +- [UPDATED] `Issue #40 `_: now it is possible to retrieve the forecast of the injections without running an expensive "simulate" thanks to the `obs.get_forecasted_inj` method. -- [UPDATED] `Issue #78 `_: parameters can be put as json in the +- [UPDATED] `Issue #78 `_: parameters can be put as json in the folder of the environment. - [UPDATED] minor fix for `env.make` - [UPDATED] Challenge tensorflow dependency to `tensorflow==2.2.0` @@ -1337,11 +1358,11 @@ Next release [0.8.1] - 2020-05-05 ---------------------- -- [FIXED] `Issue #65 `_: now the length of the Episode Data is properly +- [FIXED] `Issue #65 `_: now the length of the Episode Data is properly computed -- [FIXED] `Issue #66 `_: runner is now compatible with multiprocessing +- [FIXED] `Issue #66 `_: runner is now compatible with multiprocessing again -- [FIXED] `Issue #67 `_: L2RPNSandBoxReward is now properly computed +- [FIXED] `Issue #67 `_: L2RPNSandBoxReward is now properly computed - [FIXED] Serialization / de serialization of Parameters as json is now fixed [0.8.0] - 2020-05-04 @@ -1434,7 +1455,7 @@ Next release [0.6.1] - 2020-04-?? -------------------- -- [FIXED] `Issue #54 `_: Setting the bus for disconnected lines no +- [FIXED] `Issue #54 `_: Setting the bus for disconnected lines no longer counts as a substation operation. - [FIXED] if no redispatch actions are taken, then the game can no more invalid a provided action due to error in the redispatching. This behavior was caused by increase / decrease of the system losses that was higher (in absolute @@ -1496,15 +1517,15 @@ Next release - [FIXED] Loading L2RPN_2019 dataset - [FIXED] a bug that prevents the voltage controler to be changed when using `grid2op.make`. - [FIXED] `time_before_cooldown_line` vector were output twice in observation space - (see `issue 47 `_ part 1) + (see `issue 47 `_ part 1) - [FIXED] the number of active bus on a substation was not computed properly, which lead to some unexpected behavior regarding the powerlines switches (depending on current stats of powerline, changing the buses of some powerline has different effect) - (see `issue 47 `_ part 2) + (see `issue 47 `_ part 2) - [FIXED] wrong voltages were reported for PandapowerBackend that causes some isolated load to be not detected - (see `issue 51 `_ ) + (see `issue 51 `_ ) - [FIXED] improve the install script to not crash when numba can be installed, but cannot be loaded. - (see `issue 50 `_ ) + (see `issue 50 `_ ) - [UPDATED] import documentation of `Space` especially in case someone wants to build other type of Backend [0.5.8] - 2020-03-20 @@ -1523,14 +1544,14 @@ Next release - [FIXED] `ReadPypowNetData` does not crash when argument "chunk_size" is provided now. - [FIXED] some typos in the Readme - [FIXED] some redispatching declared illegal but are in fact legal (due to - a wrong assessment) (see `issue 44 `_) + a wrong assessment) (see `issue 44 `_) - [FIXED] reconnecting a powerline now does not count the mandatory actions on both its ends (previously you could not reconnect a powerline with the L2RPN 2019 rules because it required acting on 2 substations) as "substation action" - [UPDATED] add a blank environment for easier use. - [UPDATED] now raise an error if the substations layout does not match the number of substations on the powergrid. -- [UPDATED] better handling of system without numba `issue 42 `_) +- [UPDATED] better handling of system without numba `issue 42 `_) - [UPDATED] better display of the error message if all dispatchable generators are set - `issue 39 `_ + `issue 39 `_ - [UPDATED] change the link to the doc in the notebook to point to readthedoc and not to local documentation. - [UPDATED] Simulate action behavior result is the same as stepping given perfect forecasts at t+1 @@ -1541,7 +1562,7 @@ Next release - [ADDED] a new class to (PlotMatPlotlib) to display the grid layout and the position of the element, as well as their name and ID - [ADDED] possibility to read by chunk the data (memory efficiency and huge speed up at the beginning of training) - (`issue 21 `_) + (`issue 21 `_) - [ADDED] improved method to limit the episode length in chronics handler. - [ADDED] a method to project some data on the layout of the grid (`GetLayout.plot_info`) - [FIXED] a bug in the simulated reward (it was not initialized properly) @@ -1590,7 +1611,7 @@ Next release to make it clear it's not part of the public API. - [UPDATED] change default environment to `case14_redisp` - [UPDATED] notebook 2 now explicitely says the proposed action is ambiguous in a python cell code (and not just - in the comments) see issue (`issue 27 `_) + in the comments) see issue (`issue 27 `_) [0.5.4] - 2020-02-06 --------------------- @@ -1647,7 +1668,7 @@ Next release - [UPDATED] Remove the TODO's already coded - [UPDATED] GridStateFromFile can now read the starting date and the time interval of the chronics. - [UPDATED] Documentation of BaseObservation: adding the units - (`issue 22 `_) + (`issue 22 `_) - [UPDATED] Notebook `getting_started/4_StudyYourAgent.ipynb` to use the converter now (much shorter and clearer) [0.4.3] - 2020-01-20 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fb0b538..46a652d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,19 @@ Contribution can take different forms: - adding a new functionality to grid2op (or increase its speed) - extend grid2op -# What to do ? +# On which topic to contribute ? + +If you want to contribute but are not sure were to start you can, for example: + +- tackle an opened issue tagged as `good first issue` +- try to solve an opened issue marked with `helps wanted` +- there are also some contribution ideas written in the `[TODO]` and `Next few releases` of the `CHANGELOG.rst` + at the top level of the github repo. + +In any case, if you are not sure about what is written here, feel free to ask in the grid2op [github discussion](https://github.com/orgs/Grid2op/discussions), +in the [grid2op discord](https://discord.gg/cYsYrPT) or by contacting by mail the person in charge of the [pypi package](https://pypi.org/project/Grid2Op/). + +# What to do concretely ? For smaller changes (including, but not limited to the reporting of a bug or a contribution to the explanotory notebooks or the documentations) a simple "pull request" with your modifications by detailing what you had in mind and the goal of your changes. diff --git a/README.md b/README.md index 7406a782..c1cddb23 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ [![PyPi_Compat](https://img.shields.io/pypi/pyversions/grid2op.svg)](https://pypi.org/project/Grid2Op/) [![LICENSE](https://img.shields.io/pypi/l/grid2op.svg)](https://www.mozilla.org/en-US/MPL/2.0/) [![Documentation Status](https://readthedocs.org/projects/grid2op/badge/?version=latest)](https://grid2op.readthedocs.io/en/latest/?badge=latest) -[![circleci](https://circleci.com/gh/rte-france/Grid2Op.svg?style=shield)](https://circleci.com/gh/rte-france/Grid2Op) -[![discord](https://discord.com/api/guilds/698080905209577513/embed.png)]( https://discord.gg/cYsYrPT) -[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master) +[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Grid2op/grid2op/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Grid2op/grid2op/tree/master) +[![discord](https://discord.com/api/guilds/698080905209577513/embed.png)](https://discord.gg/cYsYrPT) +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/grid2op/grid2op.git/master) Grid2Op is a platform, built with modularity in mind, that allows to perform powergrid operation. And that's what it stands for: Grid To Operate. -Grid2Op acts as a replacement of [pypownet](https://github.com/MarvinLer/pypownet) -as a library used for the Learning To Run Power Network [L2RPN](https://l2rpn.chalearn.org/). +It is used as a library used for the Learning To Run Power Network [L2RPN](https://l2rpn.chalearn.org/), +but also for research purpose (especially by the Reinforcement Learning community applied to power system) This framework allows to perform most kind of powergrid operations, from modifying the setpoint of generators, to load shedding, performing maintenance operations or modifying the *topology* of a powergrid @@ -71,7 +71,7 @@ pip3 install grid2op ### Install from source ```commandline -git clone https://github.com/rte-france/Grid2Op.git +git clone https://github.com/grid2op/Grid2Op.git cd Grid2Op pip3 install -U . cd .. @@ -80,7 +80,7 @@ cd .. ### Install for contributors ```commandline -git clone https://github.com/rte-france/Grid2Op.git +git clone https://github.com/grid2op/Grid2Op.git cd Grid2Op pip3 install -e . pip3 install -e .[optional] @@ -136,39 +136,39 @@ These notebooks will help you in understanding how this framework is used and co interesting part of this framework: * [00_Introduction](getting_started/00_Introduction.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/00_Introduction.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/00_Introduction.ipynb) and [00_SmallExample](getting_started/00_SmallExample.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/00_SmallExample.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/00_SmallExample.ipynb) describe what is adressed by the grid2op framework (with a tiny introductions to both power systems and reinforcement learning) and give and introductory example to a small powergrid manipulation. * [01_Grid2opFramework](getting_started/01_Grid2opFramework.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/01_Grid2opFramework.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/01_Grid2opFramework.ipynb) covers the basics of the Grid2Op framework. It also covers how to create a valid environment and how to use the `Runner` class to assess how well an agent is performing rapidly. * [02_Observation](getting_started/02_Observation.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/02_Observation.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/02_Observation.ipynb) details how to create an "expert agent" that will take pre defined actions based on the observation it gets from the environment. This Notebook also covers the functioning of the BaseObservation class. * [03_Action](getting_started/03_Action.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/03_Action.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/03_Action.ipynb) demonstrates how to use the BaseAction class and how to manipulate the powergrid. * [04_TrainingAnAgent](getting_started/04_TrainingAnAgent.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/04_TrainingAnAgent.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/04_TrainingAnAgent.ipynb) shows how to get started with reinforcement learning with the grid2op environment. It shows the basic on how to train a "PPO" model operating the grid relying on "stable baselines 3" PPO implementation. * [05_StudyYourAgent](getting_started/05_StudyYourAgent.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/05_StudyYourAgent.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/05_StudyYourAgent.ipynb) shows how to study an BaseAgent, for example the methods to reload a saved experiment, or to plot the powergrid given an observation for example. This is an introductory notebook. More user friendly graphical interface should come soon. * [06_Redispatching_Curtailment](getting_started/06_Redispatching_Curtailment.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/06_Redispatching_Curtailment.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/06_Redispatching_Curtailment.ipynb) explains what is the "redispatching" and curtailment from the point of view of a company who's in charge of keeping the powergrid safe (aka a Transmission System Operator) and how to @@ -176,34 +176,34 @@ interesting part of this framework: actions on the powergrid problem. * [07_MultiEnv](getting_started/07_MultiEnv.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/07_MultiEnv.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/07_MultiEnv.ipynb) details how grid2op natively support a single agent interacting with multiple environments at the same time. This is particularly handy to train "asynchronous" agent in the Reinforcement Learning community for example. * [08_PlottingCapabilities](getting_started/08_PlottingCapabilities.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/08_PlottingCapabilities.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/08_PlottingCapabilities.ipynb) shows you the different ways with which you can represent (visually) the grid your agent interact with. A renderer is available like in many open AI gym environment. But you also have the possibility to post process an agent and make some movies out of it, and we also developed a Graphical User Interface (GUI) called "[grid2viz](https://github.com/mjothy/grid2viz)" that allows to perform in depth study of your agent's behaviour on different scenarios and even to compare it with baselines. * [09_EnvironmentModifications](getting_started/09_EnvironmentModifications.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/09_EnvironmentModifications.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/09_EnvironmentModifications.ipynb) elaborates on the maintenance, hazards and attacks. All three of these represents external events that can disconnect some powerlines. This notebook covers how to spot when such things happened and what can be done when the maintenance or the attack is over. * [10_StorageUnits](getting_started/10_StorageUnits.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/10_StorageUnits.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/10_StorageUnits.ipynb) details the usage and behaviour of the storage units in grid2op. * [11_IntegrationWithExistingRLFrameworks](getting_started/11_IntegrationWithExistingRLFrameworks.ipynb) - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rte-france/Grid2Op/blob/master/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb) + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb) explains how to use grid2op with other reinforcement learning framework. TODO: this needs to be redone Try them out in your own browser without installing anything with the help of mybinder: -[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master) +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master) Or thanks to google colab (all links are provided near the notebook description) @@ -212,13 +212,12 @@ Or thanks to google colab (all links are provided near the notebook description) If you use this package in one of your work, please cite: ```text -@misc{grid2op, +@software{grid2op, author = {B. Donnot}, title = {{Grid2op- A testbed platform to model sequential decision making in power systems. }}, + url = {\url{https://GitHub.com/Grid2Op/grid2op}}, year = {2020}, publisher = {GitHub}, - journal = {GitHub repository}, - howpublished = {\url{https://GitHub.com/rte-france/grid2op}}, } ``` @@ -273,7 +272,7 @@ to discuss what you would like to change. To contribute to this code, you need to: -1. fork the repository located at +1. fork the repository located at 2. synch your fork with the "latest developement branch of grid2op". For example, if the latest grid2op release on pypi is `1.6.5` you need to synch your repo with the branch named `dev_1.6.6` or `dev_1.7.0` (if the branch `dev_1.6.6` does not exist). It will be the highest number in the branches `dev_*` on diff --git a/binder/environment.yml b/binder/environment.yml index 57b7926f..4789f2d4 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -7,13 +7,10 @@ dependencies: - keras - pip - pip: - - grid2op[challenge] - - l2rpn-baselines + - grid2op - jyquickhelper - numpy - numba - - keras - seaborn - plotly - - imageio - - ray[rllib, default] + - imageio \ No newline at end of file diff --git a/docs/developer/create_an_environment.rst b/docs/developer/create_an_environment.rst index 2e7dcfb8..f7f97d7c 100644 --- a/docs/developer/create_an_environment.rst +++ b/docs/developer/create_an_environment.rst @@ -228,7 +228,7 @@ Anyway, assuming you created your environment in `EXAMPLE_FOLDER` (remember, in We tried our best to display useful error messages if the environment is not loading properly. If you experience any trouble at this stage, feel free to post a github issue on the official grid2op repository - https://github.com/rte-france/grid2op/issues (you might need to log in on a github account for such purpose) + https://github.com/Grid2Op/grid2op/issues (you might need to log in on a github account for such purpose) .. _calibrate_th_lim_ex: diff --git a/docs/developer/createbackend.rst b/docs/developer/createbackend.rst index 93d0fb9c..c4ecce51 100644 --- a/docs/developer/createbackend.rst +++ b/docs/developer/createbackend.rst @@ -841,7 +841,7 @@ virtual environment is a good idea and is not covered here): .. code-block:: - git clone https://github.com/rte-france/grid2op.git grid2op_dev + git clone https://github.com/Grid2Op/grid2op.git grid2op_dev cd grid2op_dev pip install -e . diff --git a/docs/final.rst b/docs/final.rst index 0b6349e3..55fafbad 100644 --- a/docs/final.rst +++ b/docs/final.rst @@ -5,4 +5,4 @@ If you still can't find what you're looking for, try in one of the following pag * :ref:`search` Still trouble finding the information ? Do not hesitate to send a github issue about the documentation at this -link: `Documentation issue template `_ +link: `Documentation issue template `_ diff --git a/docs/grid2op.rst b/docs/grid2op.rst index f2e6b763..93f1f0e4 100644 --- a/docs/grid2op.rst +++ b/docs/grid2op.rst @@ -24,7 +24,7 @@ Today, the main usage of this platform is to serve as a computation engine for t competitions. This platform is still under development. If you notice a bug, let us know with a github issue at -`Grid2Op `_ +`Grid2Op `_ .. note:: Grid2op do not model any object on the powergrid. It has no internal modeling of the equations of the @@ -460,7 +460,7 @@ Going further -------------- To get started into the grid2op ecosystem, we made a set of notebooks that are available, without any installation thanks to -`Binder `_ . Feel free to visit the "getting_started" page for +`Binder `_ . Feel free to visit the "getting_started" page for more information and a detailed tour about the issue that grid2op tries to address. .. note:: diff --git a/docs/grid_graph.rst b/docs/grid_graph.rst index c9733b2c..3d78338a 100644 --- a/docs/grid_graph.rst +++ b/docs/grid_graph.rst @@ -230,7 +230,7 @@ substation `k` (with `j` different `k`) will never have a "bus" in common. Changing this would not be too difficult on grid2op side, but would make the action space even bigger. If you really need to use more than 2 buses at the same substation, do not hesitate to fill a feature request: - https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= + https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= The graph is dynamic @@ -256,7 +256,7 @@ on the step, nor the same number of edges, for example if powerlines are disconn If you want to model these, it is perfectly possible without too much trouble. You can fill a feature request for this if that is interesting to you : - https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= + https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= .. warning:: diff --git a/docs/makeenv.rst b/docs/makeenv.rst index 493818c6..e8e3978e 100644 --- a/docs/makeenv.rst +++ b/docs/makeenv.rst @@ -26,7 +26,7 @@ You can consult the different notebooks in the `getting_stared` directory of thi how to use it. Created Environment should behave exactly like a gymnasium environment. If you notice any unwanted behavior, please address -an issue in the official grid2op repository: `Grid2Op `_ +an issue in the official grid2op repository: `Grid2Op `_ The environment created with this method should be fully compatible with the gymnasium framework: if you are developing a new algorithm of "Reinforcement Learning" and you used the openai gymnasium framework to do so, you can port your code diff --git a/docs/model_based.rst b/docs/model_based.rst index 5bd37398..c0d3eda9 100644 --- a/docs/model_based.rst +++ b/docs/model_based.rst @@ -174,7 +174,7 @@ You can also use it to select the action that keep the grid in a "correct" state .. note:: We are sure there are lots of other ways to use "obs.simulate". If you have some idea let us know, for example by starting - a conversation here https://github.com/rte-france/Grid2Op/discussions or in our discord. + a conversation here https://github.com/Grid2Op/grid2op/discussions or in our discord. Simulator @@ -298,7 +298,7 @@ If you rather want to disconnect some powerline as way to stress the grid, you c .. note:: We are sure there are lots of other ways to use "obs.simulate". If you have some idea let us know, for example by starting - a conversation here https://github.com/rte-france/Grid2Op/discussions or in our discord. + a conversation here https://github.com/Grid2Op/grid2op/discussions or in our discord. Forecast env diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 54309452..3694626c 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -58,7 +58,7 @@ The second step is to clone the Grid2Op package (`git` is required): .. code-block:: bash - git clone https://github.com/rte-france/Grid2Op.git + git clone https://github.com/Grid2Op/grid2op.git cd Grid2Op python3 -m virtualenv venv_grid2op @@ -85,7 +85,7 @@ Start Using grid2op #################### To get started into the grid2op ecosystem, we made a set of notebooks that are available, without any installation thanks to -`Binder `_ . Feel free to visit the "getting_started" page for +`Binder `_ . Feel free to visit the "getting_started" page for more information and a detailed tour about the issue that grid2op tries to address. The most basic code, for those familiar with gymnasium (a well-known framework in reinforcement learning) is: diff --git a/docs/user/opponent.rst b/docs/user/opponent.rst index 71aa5b17..d73f699a 100644 --- a/docs/user/opponent.rst +++ b/docs/user/opponent.rst @@ -193,7 +193,7 @@ deactivate it, you can do this by customization the call to "grid2op.make" like .. note:: Currently it's not possible to deactivate an opponent once the environment is created. - If you want this feature, you can comment the issue https://github.com/rte-france/Grid2Op/issues/426 + If you want this feature, you can comment the issue https://github.com/Grid2Op/grid2op/issues/426 Detailed Documentation by class diff --git a/docs/user/simulator.rst b/docs/user/simulator.rst index a101d342..0ce75204 100644 --- a/docs/user/simulator.rst +++ b/docs/user/simulator.rst @@ -121,7 +121,7 @@ be too dangerous: .. warning:: This module is still under development, if you need any functionality, let us know with a github "feature request" - (https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) + (https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) Detailed Documentation by class diff --git a/grid2op/Action/_backendAction.py b/grid2op/Action/_backendAction.py index 727fcab8..1e8e869c 100644 --- a/grid2op/Action/_backendAction.py +++ b/grid2op/Action/_backendAction.py @@ -350,7 +350,7 @@ class _BackendAction(GridObjects): And in this case, for usage examples, see the examples available in: - - https://github.com/rte-france/Grid2Op/tree/master/examples/backend_integration: a step by step guide to + - https://github.com/Grid2Op/grid2op/tree/master/examples/backend_integration: a step by step guide to code a new backend - :class:`grid2op.Backend.educPandaPowerBackend.EducPandaPowerBackend` and especially the :func:`grid2op.Backend.educPandaPowerBackend.EducPandaPowerBackend.apply_action` diff --git a/grid2op/Action/serializableActionSpace.py b/grid2op/Action/serializableActionSpace.py index 79f40933..59c6c616 100644 --- a/grid2op/Action/serializableActionSpace.py +++ b/grid2op/Action/serializableActionSpace.py @@ -1227,7 +1227,7 @@ def get_all_unitary_topologies_set(action_space: Self, times if there has been an error in the symmetries. If you are interested in this topic, let us know with a discussion, for example here - https://github.com/rte-france/Grid2Op/discussions + https://github.com/Grid2Op/grid2op/discussions Parameters ---------- diff --git a/grid2op/Backend/pandaPowerBackend.py b/grid2op/Backend/pandaPowerBackend.py index 299043b6..98711ce4 100644 --- a/grid2op/Backend/pandaPowerBackend.py +++ b/grid2op/Backend/pandaPowerBackend.py @@ -1158,7 +1158,7 @@ def runpf(self, is_dc : bool=False) -> Tuple[bool, Union[Exception, None]]: self.v_or[:] *= self.lines_or_pu_to_kv self.v_ex[:] *= self.lines_ex_pu_to_kv - # see issue https://github.com/rte-france/Grid2Op/issues/389 + # see issue https://github.com/Grid2Op/grid2op/issues/389 self.theta_or[~np.isfinite(self.theta_or)] = 0.0 self.theta_ex[~np.isfinite(self.theta_ex)] = 0.0 diff --git a/grid2op/Chronics/fromChronix2grid.py b/grid2op/Chronics/fromChronix2grid.py index 9c684340..d7761ad1 100644 --- a/grid2op/Chronics/fromChronix2grid.py +++ b/grid2op/Chronics/fromChronix2grid.py @@ -231,7 +231,7 @@ def forecasts(self): By default, forecasts are only made 1 step ahead. We could change that. Do not hesitate to make a feature request - (https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) if that is necessary for you. + (https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) if that is necessary for you. """ # TODO implement that and maybe refacto with fromNPY ? if self._forecasts is None: diff --git a/grid2op/Chronics/fromNPY.py b/grid2op/Chronics/fromNPY.py index 475f5aa7..50d6e4c4 100644 --- a/grid2op/Chronics/fromNPY.py +++ b/grid2op/Chronics/fromNPY.py @@ -193,7 +193,7 @@ def __init__( if hazards is not None: raise ChronicsError( "This feature is not available at the moment. Fill a github issue at " - "https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=" + "https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=" ) self._forecasts = None @@ -460,7 +460,7 @@ def forecasts(self): By default, forecasts are only made 1 step ahead. We could change that. Do not hesitate to make a feature request - (https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) if that is necessary for you. + (https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) if that is necessary for you. """ if self._forecasts is None: return [] diff --git a/grid2op/Chronics/gridValue.py b/grid2op/Chronics/gridValue.py index 44cc2cb5..ec47b450 100644 --- a/grid2op/Chronics/gridValue.py +++ b/grid2op/Chronics/gridValue.py @@ -866,7 +866,7 @@ def regenerate_with_new_seed(self): :class:`GridStateFromFileWithForecastsWithMaintenance`) they need to be aware of this so that a reset actually update the seeds. - This is closely related to issue https://github.com/rte-france/Grid2Op/issues/616 + This is closely related to issue https://github.com/Grid2Op/grid2op/issues/616 .. danger:: This function should be called only once (not 0, not twice) after a "seed" function has been set. diff --git a/grid2op/Converter/AnalogStateConverter.py b/grid2op/Converter/AnalogStateConverter.py index f3dbc1a8..3763bc38 100644 --- a/grid2op/Converter/AnalogStateConverter.py +++ b/grid2op/Converter/AnalogStateConverter.py @@ -20,7 +20,7 @@ class AnalogStateConverter(Converter): The grid2op action is created from a set of real valued arrays It can not yet be converted to / from gym space. If this feature is interesting for you, you can - reply to the issue posted at https://github.com/rte-france/Grid2Op/issues/16 + reply to the issue posted at https://github.com/Grid2Op/grid2op/issues/16 """ diff --git a/grid2op/Converter/ConnectivityConverter.py b/grid2op/Converter/ConnectivityConverter.py index 5b971238..7d1fd170 100644 --- a/grid2op/Converter/ConnectivityConverter.py +++ b/grid2op/Converter/ConnectivityConverter.py @@ -27,7 +27,7 @@ class ConnectivityConverter(Converter): working. It can not yet be converted to / from gym space. If this feature is interesting for you, you can - reply to the issue posted at https://github.com/rte-france/Grid2Op/issues/16 + reply to the issue posted at https://github.com/Grid2Op/grid2op/issues/16 **NB** compare to :class:`IdToAct` this converter allows for a smaller size. If you have N elements connected at a substation, you end up with `N*(N-1)/2` different action. Compare to IdToAct though, it is expected that your diff --git a/grid2op/Environment/environment.py b/grid2op/Environment/environment.py index c41871bf..164e7203 100644 --- a/grid2op/Environment/environment.py +++ b/grid2op/Environment/environment.py @@ -468,7 +468,7 @@ def _init_backend( # needs to be done at the end, but before the first "step" is called self._observation_space.set_real_env_kwargs(self) - # see issue https://github.com/rte-france/Grid2Op/issues/617 + # see issue https://github.com/Grid2Op/grid2op/issues/617 # thermal limits are set AFTER this initial step _no_overflow_disconnection = self._no_overflow_disconnection self._no_overflow_disconnection = True @@ -1820,7 +1820,7 @@ def train_val_split( all_chron = sorted(os.listdir(chronics_path)) to_val = set(val_scen_id) - to_test = set() # see https://github.com/rte-france/Grid2Op/issues/363 + to_test = set() # see https://github.com/Grid2Op/grid2op/issues/363 if nm_test is not None: to_test = set(test_scen_id) diff --git a/grid2op/MakeEnv/Make.py b/grid2op/MakeEnv/Make.py index 15bd5b6c..7d310ba2 100644 --- a/grid2op/MakeEnv/Make.py +++ b/grid2op/MakeEnv/Make.py @@ -56,7 +56,7 @@ _REQUEST_FAIL_EXHAUSTED_ERR = ( 'Impossible to retrieve data at "{}".\n' "If the problem persists, please contact grid2op developers by sending an issue at " - "https://github.com/rte-france/Grid2Op/issues" + "https://github.com/Grid2Op/grid2op/issues" ) _REQUEST_FAIL_RETRY_ERR = ( 'Failure to get a response from the url "{}".\n' @@ -79,7 +79,7 @@ "Corrupted json retrieved from github api. " "Please wait a few minutes and try again. " "If the error persist, contact grid2op devs by making an issue at " - "\n\thttps://github.com/rte-france/Grid2Op/issues/new/choose" + "\n\thttps://github.com/Grid2Op/grid2op/issues/new/choose" ) _LIST_REMOTE_INVALID_DATASETS_JSON_ERR = ( "Impossible to retrieve available datasets. " diff --git a/grid2op/MakeEnv/MakeFromPath.py b/grid2op/MakeEnv/MakeFromPath.py index 5f3f7f78..c051bf67 100644 --- a/grid2op/MakeEnv/MakeFromPath.py +++ b/grid2op/MakeEnv/MakeFromPath.py @@ -617,7 +617,7 @@ def make_from_dataset_path( # code bellow is added to fix - # https://github.com/rte-france/Grid2Op/issues/593 + # https://github.com/Grid2Op/grid2op/issues/593 import inspect possible_params = inspect.signature(data_feeding_kwargs["gridvalueClass"].__init__).parameters data_feeding_kwargs_res = data_feeding_kwargs.copy() @@ -629,7 +629,7 @@ def make_from_dataset_path( if el not in possible_params: # if it's in the config but is not supported by the # user, then we ignore it - # see https://github.com/rte-france/Grid2Op/issues/593 + # see https://github.com/Grid2Op/grid2op/issues/593 if el in dfkwargs_cfg and not el in data_feeding_kwargs_user_prov: del data_feeding_kwargs_res[el] data_feeding_kwargs = data_feeding_kwargs_res diff --git a/grid2op/MakeEnv/UpdateEnv.py b/grid2op/MakeEnv/UpdateEnv.py index abb2c208..228658ce 100644 --- a/grid2op/MakeEnv/UpdateEnv.py +++ b/grid2op/MakeEnv/UpdateEnv.py @@ -147,7 +147,7 @@ def _update_files(env_name=None, answer_json=None, env_hashes=None): f'IF this environment is officially supported by grid2op (see full list at ' f'https://grid2op.readthedocs.io/en/latest/available_envs.html#description-of-some-environments) ' f'Please write an issue at :\n\t\t' - f'https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=question&title=Environment%20{env_name}%20is%20not%20up%20to%20date%20but%20I%20cannot%20update%20it.&body=%3c%21%2d%2dDescribe%20shortly%20the%20context%20%2d%2d%3e%0d' + f'https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=question&title=Environment%20{env_name}%20is%20not%20up%20to%20date%20but%20I%20cannot%20update%20it.&body=%3c%21%2d%2dDescribe%20shortly%20the%20context%20%2d%2d%3e%0d' ) else: # environment is up to date diff --git a/grid2op/MakeEnv/get_default_aux.py b/grid2op/MakeEnv/get_default_aux.py index 423127d7..553c5b02 100644 --- a/grid2op/MakeEnv/get_default_aux.py +++ b/grid2op/MakeEnv/get_default_aux.py @@ -88,13 +88,13 @@ def _get_default_aux( # first seek for the parameter in the kwargs, and check it's valid if name in kwargs: res = kwargs[name] - if defaultClassApp in (dict, list, set):# see https://github.com/rte-france/Grid2Op/issues/536 + if defaultClassApp in (dict, list, set):# see https://github.com/Grid2Op/grid2op/issues/536 try: res = copy.deepcopy(res) except copy.Error: warnings.warn(f"Impossible to copy mutable value for kwargs {name}. Make sure not to reuse " f"the same kwargs for creating two environments." - "(more info on https://github.com/rte-france/Grid2Op/issues/536)") + "(more info on https://github.com/Grid2Op/grid2op/issues/536)") if isclass is None: # I don't know whether it's an object or a class error_msg_here = None diff --git a/grid2op/Observation/baseObservation.py b/grid2op/Observation/baseObservation.py index e1c1016c..10f36207 100644 --- a/grid2op/Observation/baseObservation.py +++ b/grid2op/Observation/baseObservation.py @@ -2206,7 +2206,7 @@ def _add_edges_simple(self, vector, attr_nm, lor_bus, lex_bus, graph, fun_reduce dict_ = {} for lid, val in enumerate(vector): if not self.line_status[lid]: - # see issue https://github.com/rte-france/Grid2Op/issues/433 + # see issue https://github.com/Grid2Op/grid2op/issues/433 continue tup_ = (lor_bus[lid], lex_bus[lid]) if not tup_ in dict_: @@ -2234,7 +2234,7 @@ def _add_edges_multi(self, vector_or, vector_ex, attr_nm, lor_bus, lex_bus, grap dict_or_glop = {} for lid, val in enumerate(vector_or): if not self.line_status[lid]: - # see issue https://github.com/rte-france/Grid2Op/issues/433 + # see issue https://github.com/Grid2Op/grid2op/issues/433 continue tup_ = (lor_bus[lid], lex_bus[lid]) if tup_ in dict_or_glop: @@ -2245,7 +2245,7 @@ def _add_edges_multi(self, vector_or, vector_ex, attr_nm, lor_bus, lex_bus, grap dict_ex_glop = {} for lid, val in enumerate(vector_ex): if not self.line_status[lid]: - # see issue https://github.com/rte-france/Grid2Op/issues/433 + # see issue https://github.com/Grid2Op/grid2op/issues/433 continue tup_ = (lor_bus[lid], lex_bus[lid]) if tup_ in dict_ex_glop: @@ -2446,7 +2446,7 @@ def get_energy_graph(self) -> networkx.Graph: bus_v = np.zeros(mat_p.shape[0]) # i need to put lor_bus[self.line_status] otherwise pandapower might not detect a line # is disconnected and output the "wrong" voltage / theta in the graph - # see issue https://github.com/rte-france/Grid2Op/issues/389 + # see issue https://github.com/Grid2Op/grid2op/issues/389 bus_v[lor_bus[self.line_status]] = self.v_or[self.line_status] bus_v[lex_bus[self.line_status]] = self.v_ex[self.line_status] bus_theta = np.zeros(mat_p.shape[0]) @@ -4130,7 +4130,7 @@ def _update_attr_backend(self, backend: "grid2op.Backend.Backend") -> None: self.gen_margin_down[cls.gen_renewable] = 0.0 # because of the slack, sometimes it's negative... - # see https://github.com/rte-france/Grid2Op/issues/313 + # see https://github.com/Grid2Op/grid2op/issues/313 self.gen_margin_up[self.gen_margin_up < 0.] = 0. self.gen_margin_down[self.gen_margin_down < 0.] = 0. else: @@ -4478,7 +4478,7 @@ def get_forecast_env(self) -> "grid2op.Environment.Environment": See :ref:`danger-env-ownership` (first danger block). - This caused issue https://github.com/rte-france/Grid2Op/issues/568 for example. + This caused issue https://github.com/Grid2Op/grid2op/issues/568 for example. Returns ------- @@ -4629,7 +4629,7 @@ def get_env_from_external_forecasts(self, See :ref:`danger-env-ownership` (first danger block). - This caused issue https://github.com/rte-france/Grid2Op/issues/568 for example. + This caused issue https://github.com/Grid2Op/grid2op/issues/568 for example. Examples -------- diff --git a/grid2op/Reward/baseReward.py b/grid2op/Reward/baseReward.py index 51eb5d78..dead75fc 100644 --- a/grid2op/Reward/baseReward.py +++ b/grid2op/Reward/baseReward.py @@ -91,7 +91,7 @@ def __call__(action, env, has_error, is_done, is_illegal, is_ambiguous): Please make sure to check whether or not this is the case when defining your reward. This "new" behaviour has been introduce to "fix" the akward behavior spotted in - # https://github.com/rte-france/Grid2Op/issues/146 + # https://github.com/Grid2Op/grid2op/issues/146 .. code-block:: python diff --git a/grid2op/Runner/runner.py b/grid2op/Runner/runner.py index 67606750..a16a66b6 100644 --- a/grid2op/Runner/runner.py +++ b/grid2op/Runner/runner.py @@ -1243,7 +1243,7 @@ def _run_parrallel( tmp = p.starmap(_aux_one_process_parrallel, lists) else: if get_start_method() == 'spawn': - # https://github.com/rte-france/Grid2Op/issues/600 + # https://github.com/Grid2Op/grid2op/issues/600 with get_context("spawn").Pool(nb_process) as p: tmp = p.starmap(_aux_one_process_parrallel, lists) else: diff --git a/grid2op/_create_test_suite.py b/grid2op/_create_test_suite.py index 07a11988..39f865a2 100644 --- a/grid2op/_create_test_suite.py +++ b/grid2op/_create_test_suite.py @@ -78,7 +78,7 @@ def create_test_suite(make_backend_fun, For example you can do (inside a virtual env): - - git clone https://github.com/rte-france/grid2op.git grid2op_dev + - git clone https://github.com/Grid2Op/grid2op.git grid2op_dev - cd grid2op_dev - pip install -e . diff --git a/grid2op/data_test/5bus_fake_grid_format/readme.md b/grid2op/data_test/5bus_fake_grid_format/readme.md index 82ad05a3..12a51671 100644 --- a/grid2op/data_test/5bus_fake_grid_format/readme.md +++ b/grid2op/data_test/5bus_fake_grid_format/readme.md @@ -1 +1 @@ -# see issue https://github.com/rte-france/Grid2Op/issues/217 +# see issue https://github.com/Grid2Op/grid2op/issues/217 diff --git a/grid2op/simulator/simulator.py b/grid2op/simulator/simulator.py index 8f5ba694..553d82f8 100644 --- a/grid2op/simulator/simulator.py +++ b/grid2op/simulator/simulator.py @@ -257,7 +257,7 @@ def set_state( update_thermal_limit: bool, optional Do you update the thermal limit of the backend (we recommend to leave it to `True` otherwise some bugs can appear such as - https://github.com/rte-france/Grid2Op/issues/377) + https://github.com/Grid2Op/grid2op/issues/377) Raises ------ diff --git a/grid2op/tests/BaseBackendTest.py b/grid2op/tests/BaseBackendTest.py index 3ffbea5d..15321cf1 100644 --- a/grid2op/tests/BaseBackendTest.py +++ b/grid2op/tests/BaseBackendTest.py @@ -2665,7 +2665,7 @@ def test_storage_action_topo(self): class BaseIssuesTest(MakeBackend): def test_issue_125(self): - # https://github.com/rte-france/Grid2Op/issues/125 + # https://github.com/Grid2Op/grid2op/issues/125 self.skip_if_needed() backend = self.make_backend_with_glue_code() with warnings.catch_warnings(): diff --git a/grid2op/tests/BaseRedispTest.py b/grid2op/tests/BaseRedispTest.py index 3fe3ea4e..89fa9286 100644 --- a/grid2op/tests/BaseRedispTest.py +++ b/grid2op/tests/BaseRedispTest.py @@ -473,7 +473,7 @@ def test_redispatch_generator_off(self): class BaseTestRedispTooLowHigh(MakeBackend): - # test bug reported in issues https://github.com/rte-france/Grid2Op/issues/44 + # test bug reported in issues https://github.com/Grid2Op/grid2op/issues/44 def setUp(self) -> None: super().setUp() backend = self.make_backend_with_glue_code() diff --git a/grid2op/tests/helper_path_test.py b/grid2op/tests/helper_path_test.py index e9f5efc3..cd72b9ef 100644 --- a/grid2op/tests/helper_path_test.py +++ b/grid2op/tests/helper_path_test.py @@ -25,7 +25,7 @@ data_test_dir = os.path.abspath(os.path.join(grid2op_dir, "data_test")) data_dir = os.path.abspath(os.path.join(grid2op_dir, "data")) -# sys.path.insert(0, grid2op_dir) # cause https://github.com/rte-france/Grid2Op/issues/577 +# sys.path.insert(0, grid2op_dir) # cause https://github.com/Grid2Op/grid2op/issues/577 # because the addition of `from grid2op._create_test_suite import create_test_suite` # in grid2op "__init__.py" diff --git a/grid2op/tests/test_Agent.py b/grid2op/tests/test_Agent.py index 007a0fbb..db42395a 100644 --- a/grid2op/tests/test_Agent.py +++ b/grid2op/tests/test_Agent.py @@ -138,7 +138,7 @@ def test_2_busswitch(self): i, cum_reward, all_acts = self._aux_test_agent(agent, i_max=10) assert i == 11, "The powerflow diverged before step 10 for greedy agent" # i have more actions now, so this is not correct (though it should be.. - # yet a proof that https://github.com/rte-france/Grid2Op/issues/86 is grounded + # yet a proof that https://github.com/Grid2Op/grid2op/issues/86 is grounded expected_reward = dt_float(12075.389) expected_reward = dt_float(12277.632) expected_reward = dt_float(12076.35644531 / 12.) diff --git a/grid2op/tests/test_Environment.py b/grid2op/tests/test_Environment.py index 61106baa..7ae835e5 100644 --- a/grid2op/tests/test_Environment.py +++ b/grid2op/tests/test_Environment.py @@ -930,7 +930,7 @@ def test_change_parameters_forecast_fromissue_128(self): It only checks the right parameters are used for the environment (or obs_env) but it do not currently check the observation (with the cooldown for example) - This is the example taken from https://github.com/rte-france/Grid2Op/issues/128 (first remak) + This is the example taken from https://github.com/Grid2Op/grid2op/issues/128 (first remak) """ # modify the parmeters for simulate diff --git a/grid2op/tests/test_gym_asynch_env.py b/grid2op/tests/test_gym_asynch_env.py index c9eb7eb1..85f688fd 100644 --- a/grid2op/tests/test_gym_asynch_env.py +++ b/grid2op/tests/test_gym_asynch_env.py @@ -1,5 +1,5 @@ # Copyright (c) 2024, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_gym_env_renderer.py b/grid2op/tests/test_gym_env_renderer.py index 7a7a68fc..0c64704f 100644 --- a/grid2op/tests/test_gym_env_renderer.py +++ b/grid2op/tests/test_gym_env_renderer.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2023, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_319.py b/grid2op/tests/test_issue_319.py index 109b8d16..f737767b 100644 --- a/grid2op/tests/test_issue_319.py +++ b/grid2op/tests/test_issue_319.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_321.py b/grid2op/tests/test_issue_321.py index 5b169862..109ded46 100644 --- a/grid2op/tests/test_issue_321.py +++ b/grid2op/tests/test_issue_321.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_327.py b/grid2op/tests/test_issue_327.py index 097f618f..e49f32f4 100644 --- a/grid2op/tests/test_issue_327.py +++ b/grid2op/tests/test_issue_327.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_331.py b/grid2op/tests/test_issue_331.py index 04b94723..c78a75b5 100644 --- a/grid2op/tests/test_issue_331.py +++ b/grid2op/tests/test_issue_331.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_340.py b/grid2op/tests/test_issue_340.py index 3fe5b51f..126bcb1b 100644 --- a/grid2op/tests/test_issue_340.py +++ b/grid2op/tests/test_issue_340.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_361.py b/grid2op/tests/test_issue_361.py index 6556ab81..46880584 100644 --- a/grid2op/tests/test_issue_361.py +++ b/grid2op/tests/test_issue_361.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_364.py b/grid2op/tests/test_issue_364.py index a72a9310..88cc92ec 100644 --- a/grid2op/tests/test_issue_364.py +++ b/grid2op/tests/test_issue_364.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_367.py b/grid2op/tests/test_issue_367.py index 417a6b5f..c6b1a019 100644 --- a/grid2op/tests/test_issue_367.py +++ b/grid2op/tests/test_issue_367.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_369.py b/grid2op/tests/test_issue_369.py index 5ee7e27c..e5f14352 100644 --- a/grid2op/tests/test_issue_369.py +++ b/grid2op/tests/test_issue_369.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_374.py b/grid2op/tests/test_issue_374.py index 7b52b17f..5bd731fb 100644 --- a/grid2op/tests/test_issue_374.py +++ b/grid2op/tests/test_issue_374.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_377.py b/grid2op/tests/test_issue_377.py index 17151b8f..76ef2b1b 100644 --- a/grid2op/tests/test_issue_377.py +++ b/grid2op/tests/test_issue_377.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_379.py b/grid2op/tests/test_issue_379.py index 60d0c8e8..ec731f8c 100644 --- a/grid2op/tests/test_issue_379.py +++ b/grid2op/tests/test_issue_379.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_380.py b/grid2op/tests/test_issue_380.py index fe602132..ae2f8d09 100644 --- a/grid2op/tests/test_issue_380.py +++ b/grid2op/tests/test_issue_380.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_389.py b/grid2op/tests/test_issue_389.py index c9a92c2f..69fd2d6f 100644 --- a/grid2op/tests/test_issue_389.py +++ b/grid2op/tests/test_issue_389.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2023, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_396.py b/grid2op/tests/test_issue_396.py index 85c1d24e..cc589c7e 100644 --- a/grid2op/tests/test_issue_396.py +++ b/grid2op/tests/test_issue_396.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2023, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_616.py b/grid2op/tests/test_issue_616.py index 6a779da3..1278d54b 100644 --- a/grid2op/tests/test_issue_616.py +++ b/grid2op/tests/test_issue_616.py @@ -1,5 +1,5 @@ # Copyright (c) 2024, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_617.py b/grid2op/tests/test_issue_617.py index e9072a68..6d8e73f8 100644 --- a/grid2op/tests/test_issue_617.py +++ b/grid2op/tests/test_issue_617.py @@ -1,5 +1,5 @@ # Copyright (c) 2024, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/grid2op/tests/test_issue_sim2real_storage.py b/grid2op/tests/test_issue_sim2real_storage.py index 6cec033f..b93979b7 100644 --- a/grid2op/tests/test_issue_sim2real_storage.py +++ b/grid2op/tests/test_issue_sim2real_storage.py @@ -59,7 +59,7 @@ def get_backend(self): class TestSim2realStorageLSDiffObs(_AuxTestSim2realStorage, unittest.TestCase): - """add this test for https://github.com/rte-france/Grid2Op/issues/518""" + """add this test for https://github.com/Grid2Op/grid2op/issues/518""" def get_backend(self): return LightSimBackend() @@ -68,7 +68,7 @@ def get_name(self): class TestSim2realStoragePPDiffObs(_AuxTestSim2realStorage, unittest.TestCase): - """add this test for https://github.com/rte-france/Grid2Op/issues/518""" + """add this test for https://github.com/Grid2Op/grid2op/issues/518""" def get_backend(self): return PandaPowerBackend() diff --git a/grid2op/tests/test_remove_line_status_from_topo.py b/grid2op/tests/test_remove_line_status_from_topo.py index 0c4d995a..1d585862 100644 --- a/grid2op/tests/test_remove_line_status_from_topo.py +++ b/grid2op/tests/test_remove_line_status_from_topo.py @@ -1,5 +1,5 @@ # Copyright (c) 2019-2022, RTE (https://www.rte-france.com) -# See AUTHORS.txt and https://github.com/rte-france/Grid2Op/pull/319 +# See AUTHORS.txt and https://github.com/Grid2Op/grid2op/pull/319 # This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. # If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, # you can obtain one at http://mozilla.org/MPL/2.0/. From 341db43214aa73464bbe7fcab0552e6e10bc822a Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Tue, 15 Oct 2024 10:49:13 +0200 Subject: [PATCH 15/21] improve consistency and clarity of the changelog and contributing.md [skip ci] Signed-off-by: DONNOT Benjamin --- CHANGELOG.rst | 128 ++++++++++++++++++++--------------- CONTRIBUTING.md | 2 +- grid2op/MakeEnv/Make.py | 2 +- grid2op/MakeEnv/UpdateEnv.py | 4 +- 4 files changed, 78 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 49f356cb..842b26ee 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,90 +1,110 @@ -[TODO] --------------------- -- [???] use some kind of "env.get_state()" when simulating instead of recoding everything "by hand" -- [???] use "backend.get_action_to_set()" in simulate -- [???] model better the voltage, include voltage constraints -- [???] use the prod_p_forecasted and co in the "next_chronics" of simulate -- [???] in deepcopy of env, make tests that the "pointers" are properly propagated in the attributes (for example - `envcpy._game_rules.legal_action` should not be copied when building `envcpy._helper_action_env`) -- [???] add multi agent -- [???] make observation read only / immutable for all its properties (and not just for `prod_p`) -- [???] better logging -- [???] shunts in observation too, for real (but what to do when backend is not shunt compliant to prevent the - stuff to break) -- [???] model agent acting at different time frame -- [???] model delay in observations -- [???] model delay in action -- [???] Code and test the "load from disk" method -- [???] add a "plot action" method -- [???] in MultiEnv, when some converter of the observations are used, have each child process to compute - it in parallel and transfer the resulting data. -- [???] "asynch" multienv -- [???] properly model interconnecting powerlines - -Next few releases +Work "in progress" --------------------------------- General grid2op improvments: - numpy 2 compat (need pandapower for that) -- TODO bug on maintenance starting at midnight (they are not correctly handled in the observation) +- remove pandapower dependency (have a way to install grid2op without pandapower) +- better logging +- have functions that automatically computes topo_vect and switch_state in the backend + (usefull for solver that will never disconnect or reconnect anything) +- bug on maintenance starting at midnight (they are not correctly handled in the observation) => cf script test_issue_616 -- TODO A number of max buses per sub -- TODO in the runner, save multiple times the same scenario -- TODO improve type annotation for all public functions -- TODO add a "_cst_" or something for the `const` members of all the classes -- TODO properly document and type hint all public members of all the public classes -- TODO properly implement the copy and "deepcopy" API -- TODO Make the redispatching data independent from the time step (eg instead of "in MW / step" have it in "MW / h") +- A number of max buses per substation different for each substation +- in the runner, save multiple times the same scenarios +- add a "_cst_" or something for the `const` members of all the classes +- improve type annotation for all public functions +- properly document and type hint all public members of all the public classes +- properly implement the copy and "deepcopy" API +- in deepcopy of env, make tests that the "pointers" are properly propagated in the attributes (for example + `envcpy._game_rules.legal_action` should not be copied when building `envcpy._helper_action_env`) +- Make the redispatching data independent from the time step (eg instead of "in MW / step" have it in "MW / h") and have grid2op convert it to MW / step +- make observation read only / immutable for all its properties (and not just for `prod_p`) +- in parallel distribute the loading of the time series if using a `MultifolderWithCache` +- Code and test the "load from disk" method +- add a "plot action" method Better multi processing support: - automatic read from local dir also on windows ! -- TODO doc for the "new" feature of automatic "experimental_read_from_local_dir" -- TODO extend this feature to work also on windows based OS -- TODO finish the test in automatic_classes - +- doc for the "new" feature of automatic "experimental_read_from_local_dir" +- extend this feature (automatic "experimental_read_from_local_dir") to work also on windows based OS +- finish the test in automatic_classes +- "asynch" multienv +- in MultiEnv, when some converter of the observations are used, have each child process to compute + it in parallel and transfer the resulting data. Features related to gymnasium compatibility: -- TODO put the Grid2opEnvWrapper directly in grid2op as GymEnv -- TODO faster gym_compat (especially for DiscreteActSpace and BoxGymObsSpace) -- TODO Notebook for tf_agents -- TODO Notebook for acme -- TODO Notebook using "keras rl" (see https://keras.io/examples/rl/ppo_cartpole/) -- TODO example for MCTS https://github.com/bwfbowen/muax et https://github.com/google-deepmind/mctx -- TODO done and truncated properly handled in gym_compat module (when game over +- put the `Grid2opEnvWrapper` (of the notebooks) directly in grid2op as GymEnv +- faster gym_compat (especially for DiscreteActSpace and BoxGymObsSpace) +- Notebook for tf_agents +- Notebook for acme +- Notebook using "keras rl" (see https://keras.io/examples/rl/ppo_cartpole/) +- example for MCTS https://github.com/bwfbowen/muax et https://github.com/google-deepmind/mctx +- done and truncated properly handled in gym_compat module (when game over before the end it's probably truncated and not done) -- TODO when reset, have an attribute "reset_infos" with some infos about the +- when reset, have an attribute "reset_infos" with some infos about the way reset was called. -- TODO on CI: test only gym, only gymnasium and keep current test for both gym and gymnasium -- TODO refactor the gym_compat module to have a "legacy" stuff exactly like today +- on CI: test only gym, only gymnasium and keep current test for both gym and gymnasium +- refactor the gym_compat module to have a "legacy" stuff exactly like today and the current class only supporting gymnasium (with possibly improved speed) -- TODO in the gym env, make the action_space and observation_space attribute +- in the gym env, make the action_space and observation_space attribute filled automatically (see ray integration, it's boring to have to copy paste...) -- [???] closer integration with `gymnasium` especially the "register env", being able to +- closer integration with `gymnasium` especially the "register env", being able to create an env from a string etc. Grid2op extended features: -- TODO ForecastEnv in MaskedEnv ! (and obs.simulate there too !) -- TODO in multi-mix increase the reset options with the mix the user wants -- TODO L2RPN scores as reward (sum loads after the game over and have it in the final reward) -- TODO work on the reward class (see https://github.com/Grid2Op/grid2op/issues/584) -- TODO jax everything that can be: create a simple env based on jax for topology manipulation, without +- ForecastEnv in MaskedEnv ! (and obs.simulate there too !) +- in multi-mix increase the reset options with the mix the user wants +- L2RPN scores as reward (sum loads after the game over and have it in the final reward) +- work on the reward class (see https://github.com/Grid2Op/grid2op/issues/584) +- jax everything that can be: create a simple env based on jax for topology manipulation, without redispatching or rules -- TODO backend in jax, maybe ? +- backend in jax, maybe ? + +The "simulate" function : + +- use some kind of "env.get_state()" when simulating instead of recoding everything "by hand" +- use "backend.get_action_to_set()" in simulate +- use the prod_p_forecasted and co in the "next_chronics" of simulate + +Better handling of the voltages: + +- model better the voltage, include voltage constraints +- shunts in observation too, for real (but what to do when backend is not shunt compliant to prevent the + stuff to break) +- model action on "shunts": + - either continuous (by default, if no config file) + - or discrete (more realistic, need a config file) +- model action related to transformer ratio: + - either continuous (by default, if no config file) + - or discrete (more realistic, need a config file) + +Other modeling issues: + +- model agent acting at different time frame +- model delay in observations +- model delay in action +- model action / observation on phase shifters +- model action / observation on HDVC powerlines Native multi agents support: - cf ad-hoc branch (dev-multiagents) +- properly model interconnecting powerlines [1.10.4] - 2024-10-15 ------------------------- - [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 [1.10.4] - 2024-10-14 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46a652d4..d5928bdc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ If you want to contribute but are not sure were to start you can, for example: - tackle an opened issue tagged as `good first issue` - try to solve an opened issue marked with `helps wanted` -- there are also some contribution ideas written in the `[TODO]` and `Next few releases` of the `CHANGELOG.rst` +- there are also some contribution ideas written in the `Work "in progress"` section of the `CHANGELOG.rst` at the top level of the github repo. In any case, if you are not sure about what is written here, feel free to ask in the grid2op [github discussion](https://github.com/orgs/Grid2op/discussions), diff --git a/grid2op/MakeEnv/Make.py b/grid2op/MakeEnv/Make.py index 7d310ba2..11a202e5 100644 --- a/grid2op/MakeEnv/Make.py +++ b/grid2op/MakeEnv/Make.py @@ -67,7 +67,7 @@ ) _LIST_REMOTE_URL = ( - "https://api.github.com/repos/bdonnot/grid2op-datasets/contents/datasets.json" + "https://api.github.com/repos/Grid2Op/grid2op-datasets/contents/datasets.json" ) _LIST_REMOTE_KEY = "download_url" _LIST_REMOTE_INVALID_CONTENT_JSON_ERR = ( diff --git a/grid2op/MakeEnv/UpdateEnv.py b/grid2op/MakeEnv/UpdateEnv.py index 228658ce..2b7674b8 100644 --- a/grid2op/MakeEnv/UpdateEnv.py +++ b/grid2op/MakeEnv/UpdateEnv.py @@ -17,10 +17,10 @@ from grid2op.MakeEnv.Make import _retrieve_github_content _LIST_REMOTE_URL = ( - "https://api.github.com/repos/bdonnot/grid2op-datasets/contents/updates.json" + "https://api.github.com/repos/Grid2Op/grid2op-datasets/contents/updates.json" ) _LIST_REMOTE_ENV_HASH = ( - "https://api.github.com/repos/bdonnot/grid2op-datasets/contents/env_hashes.json" + "https://api.github.com/repos/Grid2Op/grid2op-datasets/contents/env_hashes.json" ) From 17db258fa63009263ed4effc5a1e670addf6baff Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Tue, 15 Oct 2024 11:37:05 +0200 Subject: [PATCH 16/21] fixing links on the notebooks [skip ci] Signed-off-by: DONNOT Benjamin --- examples/backend_integration/readme.md | 2 +- getting_started/00_Introduction.ipynb | 2 +- getting_started/00_SmallExample.ipynb | 2 +- getting_started/01_Grid2opFramework.ipynb | 2 +- getting_started/02_Observation.ipynb | 2 +- getting_started/03_Action.ipynb | 4 ++-- getting_started/04_TrainingAnAgent.ipynb | 4 ++-- getting_started/05_StudyYourAgent.ipynb | 2 +- getting_started/06_Redispatching_Curtailment.ipynb | 2 +- getting_started/07_MultiEnv.ipynb | 2 +- getting_started/08_PlottingCapabilities.ipynb | 6 +++--- getting_started/09_EnvironmentModifications.ipynb | 2 +- getting_started/10_StorageUnits.ipynb | 2 +- .../11_IntegrationWithExistingRLFrameworks.ipynb | 8 ++++---- getting_started/11_ray_integration.ipynb | 2 +- getting_started/11_stable_baselines3_integration.ipynb | 2 +- ...ECE699_20201103_ReinforcementLearningApplication.ipynb | 2 +- getting_started/IEEE BDA Tutorial Series.ipynb | 2 +- grid2op/tests/test_Runner.py | 1 + setup.py | 4 ++-- 20 files changed, 28 insertions(+), 27 deletions(-) diff --git a/examples/backend_integration/readme.md b/examples/backend_integration/readme.md index 8891875c..e56be49f 100644 --- a/examples/backend_integration/readme.md +++ b/examples/backend_integration/readme.md @@ -36,7 +36,7 @@ The way these objects behave and the equations they follow are totally irrelevan Traditionnally, the "Backend" will rely on another tools that carries out the computation, implements the equaitons, solve it etc. In this setting, the "Backend" is some "glue code" that map the representation of your solver to grid2op expected functions. Some example of backend include: - [PandapowerBackend](https://grid2op.readthedocs.io/en/latest/backend.html#grid2op.Backend.PandaPowerBackend): which is the default backend -- [EducPandaPowerBackend](https://github.com/rte-france/Grid2Op/blob/master/grid2op/Backend/EducPandaPowerBackend.py): which is a "simplification" of the previous backend for education purpose. So we highly recommend you to check it out :-) +- [EducPandaPowerBackend](https://github.com/Grid2Op/grid2op/blob/master/grid2op/Backend/EducPandaPowerBackend.py): which is a "simplification" of the previous backend for education purpose. So we highly recommend you to check it out :-) - [lightsim2grid](https://lightsim2grid.readthedocs.io/en/latest/lightsimbackend.html#lightsim2grid.lightSimBackend.LightSimBackend) which is a backend that uses a port of some function of pandapower in c++ for speed. We are also aware that some powerflows such as [Hades2](https://github.com/rte-france/hades2-distribution) and other commercial solvers such as PowerFactory are already connected with grid2op, so not open source at the moment. diff --git a/getting_started/00_Introduction.ipynb b/getting_started/00_Introduction.ipynb index a58f23b7..94aa0f01 100644 --- a/getting_started/00_Introduction.ipynb +++ b/getting_started/00_Introduction.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Introduction\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/00_SmallExample.ipynb b/getting_started/00_SmallExample.ipynb index 4f3a1a6a..6fcee58d 100644 --- a/getting_started/00_SmallExample.ipynb +++ b/getting_started/00_SmallExample.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Some experiments on a 5 substations test case\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/01_Grid2opFramework.ipynb b/getting_started/01_Grid2opFramework.ipynb index 8a6e1745..6ca41119 100644 --- a/getting_started/01_Grid2opFramework.ipynb +++ b/getting_started/01_Grid2opFramework.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# This notebook present the most basic use of Grid2Op\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/02_Observation.ipynb b/getting_started/02_Observation.ipynb index bb2203a4..56fe5d71 100644 --- a/getting_started/02_Observation.ipynb +++ b/getting_started/02_Observation.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# This Notebook will develop how to build an Agent and assess its performance.\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/03_Action.ipynb b/getting_started/03_Action.ipynb index 400bd4fd..3194bed7 100644 --- a/getting_started/03_Action.ipynb +++ b/getting_started/03_Action.ipynb @@ -6,7 +6,7 @@ "source": [ "# This Notebook focuses on the Action class\n", "\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { @@ -978,7 +978,7 @@ "1) the combination of actions can be **illegal** depending on the game rules in place. For example if at any given step you can only do an action on one single powerline, but you combine an action disconnecting two (or more) powerlines. In this case the resulting action will be illegal.\n", "2) the combination of actions might make the resulting action \"**ambiguous**\" (meaning that \"grid2op cannot make sense of what you are trying to do\"). This can happen for example if you mix action on topology and on powerline status. For example, if you decide to affect the \"origin\" side of powerline `i` to bus 1 in an action but you also say to disconnect powerline `i` in a second action. Grid2op currently will not \"chose for you\" what you want to do\\*.\n", "\n", - "\\* Depending on the outcome of issue https://github.com/rte-france/Grid2Op/issues/201 we might chose in this case to have the last action added \"take the priority\" over the previous one. This might \"solve\" this specific problem but will also introduce a really important role in the order on which actions are summed. " + "\\* Depending on the outcome of issue https://github.com/Grid2Op/grid2op/issues/201 we might chose in this case to have the last action added \"take the priority\" over the previous one. This might \"solve\" this specific problem but will also introduce a really important role in the order on which actions are summed. " ] }, { diff --git a/getting_started/04_TrainingAnAgent.ipynb b/getting_started/04_TrainingAnAgent.ipynb index 5627f35a..fb8fc986 100644 --- a/getting_started/04_TrainingAnAgent.ipynb +++ b/getting_started/04_TrainingAnAgent.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Training Agent, action converters and l2rpn_baselines\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { @@ -434,7 +434,7 @@ "from l2rpn_baselines.PP0_SB3 import train\n", "```\n", "\n", - "You can have a look at the \"examples\" section of the l2rpn baselines repository (https://github.com/rte-france/l2rpn-baselines/tree/master/examples)\n", + "You can have a look at the \"examples\" section of the l2rpn baselines repository (https://github.com/grid2op/l2rpn-baselines/tree/master/examples)\n", "\n", "\n", "\n" diff --git a/getting_started/05_StudyYourAgent.ipynb b/getting_started/05_StudyYourAgent.ipynb index 44868f42..87377ed8 100644 --- a/getting_started/05_StudyYourAgent.ipynb +++ b/getting_started/05_StudyYourAgent.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Basic Agent Study\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/06_Redispatching_Curtailment.ipynb b/getting_started/06_Redispatching_Curtailment.ipynb index b9873fb3..d9b36d66 100644 --- a/getting_started/06_Redispatching_Curtailment.ipynb +++ b/getting_started/06_Redispatching_Curtailment.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# In this notebook you will learn about the redispatching and curtailment capabilities offered by grid2op.\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/07_MultiEnv.ipynb b/getting_started/07_MultiEnv.ipynb index 44313f4c..440e6153 100644 --- a/getting_started/07_MultiEnv.ipynb +++ b/getting_started/07_MultiEnv.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Agent, RL and MultiEnvironment\n", - "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { diff --git a/getting_started/08_PlottingCapabilities.ipynb b/getting_started/08_PlottingCapabilities.ipynb index 5c6ccb01..d2a2da9a 100644 --- a/getting_started/08_PlottingCapabilities.ipynb +++ b/getting_started/08_PlottingCapabilities.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# How to see what your agent did ?\n", - "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)" + "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)" ] }, { @@ -447,7 +447,7 @@ "source": [ "import sys\n", "print(\"To install it, either uncomment the cell bellow, or type, in a command prompt:\\n{}\".format(\n", - " (\"\\t{} -m pip install -m pip install -U git+https://github.com/rte-france/grid2viz --user\".format(sys.executable))))" + " (\"\\t{} -m pip install -m pip install -U git+https://github.com/grid2op/grid2viz --user\".format(sys.executable))))" ] }, { @@ -456,7 +456,7 @@ "metadata": {}, "outputs": [], "source": [ - "# !$sys.executable -m pip install -U git+https://github.com/rte-france/grid2viz --user" + "# !$sys.executable -m pip install -U git+https://github.com/grid2op/grid2viz --user" ] }, { diff --git a/getting_started/09_EnvironmentModifications.ipynb b/getting_started/09_EnvironmentModifications.ipynb index b303b381..fbab9824 100644 --- a/getting_started/09_EnvironmentModifications.ipynb +++ b/getting_started/09_EnvironmentModifications.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Some powerline can be disconnected, and there is ~~nothing~~ something you can do about it\n", - "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "\n", "Execute the cell below by removing the # character if you use google colab !\n", diff --git a/getting_started/10_StorageUnits.ipynb b/getting_started/10_StorageUnits.ipynb index 9da62d20..0e6fc6d8 100644 --- a/getting_started/10_StorageUnits.ipynb +++ b/getting_started/10_StorageUnits.ipynb @@ -6,7 +6,7 @@ "source": [ "# In this notebook you will learn about the storage units in grid2op\n", "\n", - "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "Try this notebook out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "**Objectives**\n", "\n", diff --git a/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb b/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb index e4d2c6ec..552383b1 100644 --- a/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb +++ b/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb @@ -6,7 +6,7 @@ "source": [ "# Grid2Op integration with existing frameworks\n", "\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "\n", "**objectives** This notebooks briefly explains how to use grid2op with commonly used RL frameworks. It also explains the main methods / class of the `grid2op.gym_compat` module that ease grid2op integration with these frameworks.\n", @@ -31,7 +31,7 @@ "- https://github.com/PaddlePaddle/PARL/blob/develop/README.md (used by the winner teams of Neurips competitions !) Work in progress.\n", "- https://github.com/deepmind/acme\n", "\n", - "Note also that there is still the possibility to use past codes in the l2rpn-baselines repository: https://github.com/rte-france/l2rpn-baselines . This repository contains code snippets that can be reuse to make really nice agents on the l2rpn competitions. You can try it out :-) \n", + "Note also that there is still the possibility to use past codes in the l2rpn-baselines repository: https://github.com/grid2op/l2rpn-baselines . This repository contains code snippets that can be reuse to make really nice agents on the l2rpn competitions. You can try it out :-) \n", "\n", "\n", "Execute the cell below by removing the `#` characters if you use google colab !\n", @@ -912,9 +912,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If you want to use another RL framework, let us know by filling a github issue template here: https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=\n", + "If you want to use another RL framework, let us know by filling a github issue template here: https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=\n", "\n", - "Even better, if you have used another RL framework, let us know and we will find a way to integrate your developement into this notebook ! You can write an issue https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=documentation&template=documentation.md&title= and explaining which framework you used and a minimal code example we could use" + "Even better, if you have used another RL framework, let us know and we will find a way to integrate your developement into this notebook ! You can write an issue https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=documentation&template=documentation.md&title= and explaining which framework you used and a minimal code example we could use" ] } ], diff --git a/getting_started/11_ray_integration.ipynb b/getting_started/11_ray_integration.ipynb index 7410bdac..928c2cb1 100644 --- a/getting_started/11_ray_integration.ipynb +++ b/getting_started/11_ray_integration.ipynb @@ -6,7 +6,7 @@ "source": [ "# Grid2Op integration with ray / rllib framework\n", "\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "\n", "**objectives** This notebooks briefly explains how to use grid2op with ray (rllib) RL framework. Make sure to read the previous notebook 11_IntegrationWithExistingRLFrameworks.ipynb for a deeper dive into what happens. We only show the working solution here.\n", diff --git a/getting_started/11_stable_baselines3_integration.ipynb b/getting_started/11_stable_baselines3_integration.ipynb index 68576bc8..39173546 100644 --- a/getting_started/11_stable_baselines3_integration.ipynb +++ b/getting_started/11_stable_baselines3_integration.ipynb @@ -7,7 +7,7 @@ "source": [ "# Grid2Op integration with stable baselines3 framework\n", "\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "\n", "**objectives** This notebooks briefly explains how to use grid2op with stable baselines 3 RL framework. Make sure to read the previous notebook [11_IntegrationWithExistingRLFrameworks](./11_IntegrationWithExistingRLFrameworks.ipynb) for a deeper dive into what happens. We only show the working solution here.\n", diff --git a/getting_started/AUB_EECE699_20201103_ReinforcementLearningApplication.ipynb b/getting_started/AUB_EECE699_20201103_ReinforcementLearningApplication.ipynb index ab99c05d..1b60ddca 100644 --- a/getting_started/AUB_EECE699_20201103_ReinforcementLearningApplication.ipynb +++ b/getting_started/AUB_EECE699_20201103_ReinforcementLearningApplication.ipynb @@ -6,7 +6,7 @@ "source": [ "# An RL application: managing the powergrid\n", "\n", - "You can try this notebook interactively with (click on the logo): [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "You can try this notebook interactively with (click on the logo): [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "\n", "During this session we present an application to reinforcement learning in a \"real world\" scenario.\n", diff --git a/getting_started/IEEE BDA Tutorial Series.ipynb b/getting_started/IEEE BDA Tutorial Series.ipynb index dc0cda2a..93e9dfdf 100644 --- a/getting_started/IEEE BDA Tutorial Series.ipynb +++ b/getting_started/IEEE BDA Tutorial Series.ipynb @@ -6,7 +6,7 @@ "source": [ "# Reminder\n", "\n", - "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/rte-france/Grid2Op/master)\n", + "Try me out interactively with: [![Binder](./img/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n", "\n", "## Goals\n", "- Keep the grid safe\n", diff --git a/grid2op/tests/test_Runner.py b/grid2op/tests/test_Runner.py index fbc1cbb6..e1add037 100644 --- a/grid2op/tests/test_Runner.py +++ b/grid2op/tests/test_Runner.py @@ -521,6 +521,7 @@ def test_backward_compatibility(self): "1.10.1", "1.10.2", "1.10.3", + "1.10.4", ] curr_version = "test_version" assert ( diff --git a/setup.py b/setup.py index 34d79b3b..dc880c67 100644 --- a/setup.py +++ b/setup.py @@ -101,13 +101,13 @@ def my_test_suite(): ) ] -setup(description='An gymnasium compatible environment to model sequential decision making for powersystems', +setup(description='An gymnasium compatible environment to model sequential decision making for powersystems', long_description=long_description, long_description_content_type="text/markdown", author='Benjamin DONNOT', author_email='benjamin.donnot@rte-france.com', python_requires='>=3.8', - url="https://github.com/rte-france/Grid2Op", + url="https://github.com/Grid2Op/grid2op", packages=setuptools.find_packages(), include_package_data=True, install_requires=pkgs["required"], From 90f4e392521bdf56ebeb66d5eaebe09f5ec998b9 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Tue, 15 Oct 2024 14:12:36 +0200 Subject: [PATCH 17/21] adapting the script make_release to sign commit Signed-off-by: DONNOT Benjamin --- utils/make_release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/make_release.py b/utils/make_release.py index 171c12ad..4dc4a3af 100644 --- a/utils/make_release.py +++ b/utils/make_release.py @@ -197,7 +197,7 @@ def modify_and_push_docker(version, # grid2op version start_subprocess_print(["git", "add", f'{os.path.join(PATH_PREVIOUS_RUNNER, f"res_agent_{version}")}/*']) # Commit - start_subprocess_print(["git", "commit", "-S", "-m", "Release v{}".format(version)]) + start_subprocess_print(["git", "commit", "-s", "-S", "-m", "Release v{}".format(version)]) if not is_prerelease: # Create a new git tag start_subprocess_print(["git", "tag", "-s", "-a", "v{}".format(version), "-m", "Release v{}".format(version)]) From cd3cb607207ede4437ff5cae2460f136384a2bb1 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Tue, 15 Oct 2024 14:26:53 +0200 Subject: [PATCH 18/21] ready for release version 1.10.5 [skip ci] Signed-off-by: DONNOT Benjamin --- CHANGELOG.rst | 1 - Dockerfile | 2 +- docs/conf.py | 2 +- grid2op/__init__.py | 2 +- .../res_agent_1.10.5/00/_parameters.json | 24 ++ .../res_agent_1.10.5/00/actions.npz | Bin 0 -> 274 bytes .../res_agent_1.10.5/00/agent_exec_times.npz | Bin 0 -> 216 bytes .../00/disc_lines_cascading_failure.npz | Bin 0 -> 214 bytes .../res_agent_1.10.5/00/env_modifications.npz | Bin 0 -> 325 bytes .../res_agent_1.10.5/00/episode_meta.json | 11 + .../res_agent_1.10.5/00/episode_times.json | 12 + .../res_agent_1.10.5/00/grid2op.info | 3 + .../res_agent_1.10.5/00/observations.npz | Bin 0 -> 739 bytes .../res_agent_1.10.5/00/opponent_attack.npz | Bin 0 -> 206 bytes .../res_agent_1.10.5/00/other_rewards.json | 3 + .../res_agent_1.10.5/00/rewards.npz | Bin 0 -> 213 bytes .../res_agent_1.10.5/01/_parameters.json | 24 ++ .../res_agent_1.10.5/01/actions.npz | Bin 0 -> 274 bytes .../res_agent_1.10.5/01/agent_exec_times.npz | Bin 0 -> 216 bytes .../01/disc_lines_cascading_failure.npz | Bin 0 -> 215 bytes .../res_agent_1.10.5/01/env_modifications.npz | Bin 0 -> 325 bytes .../res_agent_1.10.5/01/episode_meta.json | 11 + .../res_agent_1.10.5/01/episode_times.json | 12 + .../res_agent_1.10.5/01/grid2op.info | 3 + .../res_agent_1.10.5/01/observations.npz | Bin 0 -> 742 bytes .../res_agent_1.10.5/01/opponent_attack.npz | Bin 0 -> 206 bytes .../res_agent_1.10.5/01/other_rewards.json | 3 + .../res_agent_1.10.5/01/rewards.npz | Bin 0 -> 213 bytes .../res_agent_1.10.5/dict_action_space.json | 220 ++++++++++++++++++ .../res_agent_1.10.5/dict_attack_space.json | 220 ++++++++++++++++++ .../dict_env_modification_space.json | 220 ++++++++++++++++++ .../dict_observation_space.json | 220 ++++++++++++++++++ grid2op/tests/test_Runner.py | 1 + utils/make_release.py | 14 +- 34 files changed, 1000 insertions(+), 8 deletions(-) create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/_parameters.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/actions.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/agent_exec_times.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/disc_lines_cascading_failure.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/env_modifications.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/episode_meta.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/episode_times.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/grid2op.info create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/observations.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/opponent_attack.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/other_rewards.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/00/rewards.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/_parameters.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/actions.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/agent_exec_times.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/disc_lines_cascading_failure.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/env_modifications.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_meta.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_times.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/grid2op.info create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/observations.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/opponent_attack.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/other_rewards.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/01/rewards.npz create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/dict_action_space.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/dict_attack_space.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/dict_env_modification_space.json create mode 100644 grid2op/data_test/runner_data/res_agent_1.10.5/dict_observation_space.json diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 842b26ee..e99012a1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,7 +3,6 @@ Work "in progress" General grid2op improvments: -- numpy 2 compat (need pandapower for that) - remove pandapower dependency (have a way to install grid2op without pandapower) - better logging - have functions that automatically computes topo_vect and switch_state in the backend diff --git a/Dockerfile b/Dockerfile index ba7adc8d..b15e3813 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ WORKDIR /Grid2Op RUN git pull RUN git remote update RUN git fetch --all --tags -RUN git checkout "tags/v1.10.4" -b "v1.10.4-branch" +RUN git checkout "tags/v1.10.5" -b "v1.10.5-branch" # Install Dependencies RUN pip3 install .[optional,challenge] WORKDIR / diff --git a/docs/conf.py b/docs/conf.py index 2c2e06bd..e3af0441 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Benjamin Donnot' # The full version, including alpha/beta/rc tags -release = '1.10.4' +release = '1.10.5' version = '1.10' diff --git a/grid2op/__init__.py b/grid2op/__init__.py index 61ae763e..c0d928f8 100644 --- a/grid2op/__init__.py +++ b/grid2op/__init__.py @@ -11,7 +11,7 @@ Grid2Op """ -__version__ = '1.10.4' +__version__ = '1.10.5' __all__ = [ "Action", diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/00/_parameters.json b/grid2op/data_test/runner_data/res_agent_1.10.5/00/_parameters.json new file mode 100644 index 00000000..46aaa941 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.5/00/_parameters.json @@ -0,0 +1,24 @@ +{ + "ACTIVATE_STORAGE_LOSS": true, + "ALARM_BEST_TIME": 12, + "ALARM_WINDOW_SIZE": 12, + "ALERT_TIME_WINDOW": 12, + "ALLOW_DISPATCH_GEN_SWITCH_OFF": true, + "ENV_DC": false, + "FORECAST_DC": false, + "HARD_OVERFLOW_THRESHOLD": 2.0, + "IGNORE_INITIAL_STATE_TIME_SERIE": 0, + "IGNORE_MIN_UP_DOWN_TIME": true, + "INIT_STORAGE_CAPACITY": 0.5, + "LIMIT_INFEASIBLE_CURTAILMENT_STORAGE_ACTION": false, + "MAX_LINE_STATUS_CHANGED": 1, + "MAX_SIMULATE_PER_EPISODE": -1, + "MAX_SIMULATE_PER_STEP": -1, + "MAX_SUB_CHANGED": 1, + "NB_TIMESTEP_COOLDOWN_LINE": 0, + "NB_TIMESTEP_COOLDOWN_SUB": 0, + "NB_TIMESTEP_OVERFLOW_ALLOWED": 2, + "NB_TIMESTEP_RECONNECTION": 10, + "NO_OVERFLOW_DISCONNECTION": false, + "SOFT_OVERFLOW_THRESHOLD": 1.0 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/00/actions.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/00/actions.npz new file mode 100644 index 0000000000000000000000000000000000000000..130c78c2760e862c76722570e042b5be30ce824d GIT binary patch literal 274 zcmWIWW@Zs#U|`??Vnv4bjAN^NfGmY*kcbFFN@7W(US2^ZBZB}~3@F6_k_UmeCpL09 zCNi`=OfD7u|1CIufrh8y%@aumFON)gd?6F5^6nt-P7|LqI&II_rvKP?yTWSL8Lg9s zmPb?L^tx{FZrq-A)a1z3brvEw%l2tc`}tZvZMISUzo%BWpP!G-Hj~QCD1Vh{(f)pw zntl1({i@CU_1FF~K`cfi5B&Ya5a7+oB*Ki#9|#Q%j3745R{`FvY#=@(5Sjt$V;~L# E0C=!aJ^%m! literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/00/agent_exec_times.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/00/agent_exec_times.npz new file mode 100644 index 0000000000000000000000000000000000000000..11a94c81b1844767d48b0a5f5b5cbe2d8bb36fe5 GIT binary patch literal 216 zcmWIWW@Zs#U|`??Vnv2aS6*KX0lr9 zVfrc6#>QsFB{s{7Yb#d@lismF11>j4KcKnZj7%cTxZDD<6GS#Jf=HOl0=!w-Kzv3Z LGy~FIAPxfnQk5^~ literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/00/env_modifications.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/00/env_modifications.npz new file mode 100644 index 0000000000000000000000000000000000000000..56924bc9dd7184db119384c1d45fd8e1b952db5d GIT binary patch literal 325 zcmWIWW@Zs#U|`??Vnv1xybWje16d4RAQ2IUl*E!my}W`-Mg{?}7)S~%52W9o*ywdQ zfT8u_?a=r~dEtuAs(h|2laKlq78XoO5Vq==>at5@vi}3++DM4 zt$B5NzRkHuDVt^={rzMAwzhwNHCmn<{h9Lo_R|aXBF^?&pZ~1oc(^fR)^ep6{cGd) t?X?5B5O%L zrFiu0eYtWs^|f>~uRP&8J-se&vh|GF0n6B;w0@^?f*5_fhTn$YZe5( zHNAC*omoHCw(NQPW$okFmV~SQojb>?&UcrcwBPJ`eCjh7`s=Ir9v46E{{HFWFD3bz zj}I$9edoS*YInQ$Q=i9OwNH<0pZ{t*$9Q>urF;F;Yj1_8?%(CFHhJ4WiF7MIlOtE_ zuKo_We)aF6-~E@`?9G?Q-uLybzWrY9y!jnpYi{#NXY#rI)wkEJ<2U!cEjTY{Ew_Bk ze9>>;uC&X>PY+AYTR&HF->>`0lKPML+6xMMKHs`=Z~Ug2(!b|jowxY&@e?(3x;I^& z8~@E^eb&w&cXysU*E6s1=MSTMHoiyNfAsyYJzx0DYW3ckueS%=u|QG=g=CGyf5rfB iMkWzvTnQ6lK?5U*4NIm0-mGjOJ|hsC0qN=BqzV8`T`TPX literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/00/opponent_attack.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/00/opponent_attack.npz new file mode 100644 index 0000000000000000000000000000000000000000..e05f269121334f0cb4e2072ef79bb0768da95322 GIT binary patch literal 206 zcmWIWW@Zs#U|`??Vnv4fx;QTnAgci^BEpc8SdyrhS5V2wAOIEv3NwJ@L16Y9@mJCU zCr<<%3s^gEQq-K7C3#C1c9_Zdw;)-LgM6|p5u zKc(8(*sQqNW?6A< zi4w;jZY=G}{~ow`frjVJn-hCmr>YrmnsBivN9ElEr(zSC#;Hd?uTKB??{%$S*ypFa zrp8RlKGR(leYCJ+@?C{xitkRnib*~08~OBT`ux=PT@~-Y+F6Uf-+lT0*GmR6rI!o1 z_h0qf_s;O|zvuEzLNg$J48&mo E00d}KxBvhE literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/agent_exec_times.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/01/agent_exec_times.npz new file mode 100644 index 0000000000000000000000000000000000000000..2ac17cb62fba2f2ef5baa5e6353af74c0050803d GIT binary patch literal 216 zcmWIWW@Zs#U|`??Vnv4fox6O3fGhzfkcbFFN@7W(US2^ZBZB}~3@F6_k_Um=Z^U0o z3!FR=a4cZ$yh%}WVwU7BU6409ZPB{L3+7FW4+)wwLwtVxlu2Ad<=$sB{aCxi(^bTl zF#VKjV`HDJfvg40AQ2IUl*E!my}W`-Mg{?}7*L7lr9 zVfrc6#>QsFB{s{7Yb#d@lOEf#Km#r}Mm+|G0B=Sn5oTPDfmjM68yG<(%xMAMtZX1Y NBM_Pa>245*0RWzaFf9N8 literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/env_modifications.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/01/env_modifications.npz new file mode 100644 index 0000000000000000000000000000000000000000..e53b2558ea44c59cc952fce624673a00700bfdb6 GIT binary patch literal 325 zcmWIWW@Zs#U|`??VnqfSi5V>Wfh>kDkcbFFN@7W(US2^ZBZB}~3?v1X2hwj(Y}8{3 z6gmEIb!bJ~?bu10VT*2b9Ld=%dr>3AXk+mr0d3<=y&UfsJmM|6*Ps!yr<*-MVqsuV z{r)GXPyW3B=H2@@vN}s$cWG?iX8-C`nqKtAz*R9x_vV(LeferJ$d`J``k;_vLB7^wEuedZJ*z-(S u=dA;|5-(`DZ^szm&B!FejLYi??G20|HY^|lyjj^md`2KN1JXZ190ma6HE7uY literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_meta.json b/grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_meta.json new file mode 100644 index 00000000..f40a89c3 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_meta.json @@ -0,0 +1,11 @@ +{ + "agent_seed": null, + "backend_type": "PandaPowerBackend_rte_case5_example", + "chronics_max_timestep": "100", + "chronics_path": "/home/donnotben/Documents/grid2op_dev/grid2op/data/rte_case5_example/chronics/01", + "cumulative_reward": 0.0, + "env_seed": null, + "env_type": "Environment_rte_case5_example", + "grid_path": "/home/donnotben/Documents/grid2op_dev/grid2op/data/rte_case5_example/grid.json", + "nb_timestep_played": 1 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_times.json b/grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_times.json new file mode 100644 index 00000000..b18938ce --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.5/01/episode_times.json @@ -0,0 +1,12 @@ +{ + "Agent": { + "total": 4.0565002564108e-05 + }, + "Env": { + "apply_act": 0.003459703002590686, + "observation_computation": 0.0, + "powerflow_computation": 0.04799573899799725, + "total": 0.051455442000587936 + }, + "total": 0.05262728900197544 +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/grid2op.info b/grid2op/data_test/runner_data/res_agent_1.10.5/01/grid2op.info new file mode 100644 index 00000000..b7558661 --- /dev/null +++ b/grid2op/data_test/runner_data/res_agent_1.10.5/01/grid2op.info @@ -0,0 +1,3 @@ +{ + "version": "1.10.5" +} \ No newline at end of file diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/observations.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/01/observations.npz new file mode 100644 index 0000000000000000000000000000000000000000..759857b42953470c7200fd15b762c7e50a3cfb2b GIT binary patch literal 742 zcmWIWW@Zs#U|`??Vnv3-Mlsn5ObiS=f)!T#a3*NH_xUL10lKAz{M+U*vyX2zLX5#1>rUa>8DNf#tr)p}Lz0;HwhEaP69 zByM-hE9QmM?h}`K=gu@)G^vG)akF5E2dm=*B@R`_xwj461ciDyV*mX6&|JN*nE$@* z^!Lwot!HgBJI~3-=DvCN=h)p=o289z_O_bd+~u?F!o{8YH-Ei7t?%63pIi2=+`3jf zer5UF+`H4)uL-|W9~D1+W&HlC)YxU##;dQeSgYIdH_eL?m~!Yrs#oH|fD^s8QoZM5 zPN^vS&i^CH;{0(*<;4#dTvGo>R=j(&_SDRM1r;y88{FMpTx>A!y1B%4+2|;_ACDGa zI`LGUH~jW~?)^4(7FAc`c!Ifa^R*vl-uuzq`}y(feldN1cGhBd_ZRNlpLkpU=@tLq z^&0+PXBEA?_n`igTzA-?xjE8#UUfPD)Z=dccE4j`H_aygn}J_!rtY!3v#+~~S6^?d z_M4xzW7D^Q%!6~cecIW6-D~C3<@{6D^~b!CkNsL$zwu|7<-gZHJC}XDZn67$%9K^H z|4T#OhVS+Nx^vgQ+V6!%aknR#{Q2e>R8wXCul#Cr%E|D>g|9Zh6@Rqz_~bjC%CbAZ z@h`sfX`buOBD<4wvm`ToY$G>WnE%|r+&DPR%3gZ2r+;Bp{`8V(%l4;leZG2UbQ>htAU%<}hptR8>*f7<7>iS+x&*7ttSGd@!qHG9_U>%qU|Ac=!Qvcf)& lA;6oFNrV|!+C*5;zzAZ)Qfh!VD;tQ<2!v)pdKNgf0sz=^ExZ5# literal 0 HcmV?d00001 diff --git a/grid2op/data_test/runner_data/res_agent_1.10.5/01/opponent_attack.npz b/grid2op/data_test/runner_data/res_agent_1.10.5/01/opponent_attack.npz new file mode 100644 index 0000000000000000000000000000000000000000..e05f269121334f0cb4e2072ef79bb0768da95322 GIT binary patch literal 206 zcmWIWW@Zs#U|`??Vnv4fx;QTnAgci^BEpc8SdyrhS5V2wAOIEv3NwJ@L16Y9@mJCU zCr<<%3s^gEQq-K7C3#C1c9_Zdw;)-LgM6|p5u zKc(8(*sQqNW?6A< Date: Tue, 22 Oct 2024 14:27:34 +0200 Subject: [PATCH 19/21] fixing conflicts Signed-off-by: DONNOT Benjamin --- CHANGELOG.rst | 12 ++ grid2op/Action/baseAction.py | 25 +++- grid2op/Environment/baseEnv.py | 17 ++- grid2op/Space/GridObjects.py | 184 ++++++++++++++++++++++++++ grid2op/tests/test_get_info_method.py | 181 +++++++++++++++++++++++++ grid2op/typing_variables.py | 1 + 6 files changed, 410 insertions(+), 10 deletions(-) create mode 100644 grid2op/tests/test_get_info_method.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e99012a1..ca823f8b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,7 @@ Work "in progress" General grid2op improvments: +- ill formed docstring in the BaseAction module - remove pandapower dependency (have a way to install grid2op without pandapower) - better logging - have functions that automatically computes topo_vect and switch_state in the backend @@ -23,6 +24,7 @@ General grid2op improvments: - in parallel distribute the loading of the time series if using a `MultifolderWithCache` - Code and test the "load from disk" method - add a "plot action" method +- does not read every data of the backend if not used Better multi processing support: @@ -95,6 +97,16 @@ Native multi agents support: - cf ad-hoc branch (dev-multiagents) - properly model interconnecting powerlines +[1.11.0] - 202x-yy-zz +----------------------- +- [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 + with `gridobj.get_line_info(...)`, `gridobj.get_load_info(...)`, `gridobj.get_gen_info(...)` + or , `gridobj.get_storage_info(...)` +- [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 + [1.10.4] - 2024-10-15 ------------------------- - [FIXED] new pypi link (no change in code) diff --git a/grid2op/Action/baseAction.py b/grid2op/Action/baseAction.py index 50b22d31..1b54e77e 100644 --- a/grid2op/Action/baseAction.py +++ b/grid2op/Action/baseAction.py @@ -1926,7 +1926,26 @@ def _digest_injection(self, dict_): self._modif_inj = True for k in tmp_d: if k in self.attr_list_set: - self._dict_inj[k] = np.array(tmp_d[k]).astype(dt_float) + possible_vals = tmp_d[k] + if isinstance(possible_vals, dict): + if k == "load_p" or k == "load_q": + nb_el = type(self).n_load + el_nms = type(self).name_load + elif k == "prod_p" or k == "prod_v": + nb_el = type(self).n_gen + el_nms = type(self).name_gen + else: + raise AmbiguousAction(f"Impossible modify the injection with the key {k}") + vals = np.full(nb_el, dtype=dt_float, fill_value=np.nan) + for el_nm, el_val in possible_vals.items(): + el_ids = (el_nms == el_nm).nonzero()[0] + if len(el_ids) == 0: + raise AmbiguousAction(f"No element named {el_nm} for key {k} when trying to modify the injection") + elif len(el_ids) >= 2: + raise AmbiguousAction(f"More than one element named {el_nm} for key {k} when trying to modify the injection") + vals[el_ids[0]] = dt_float(el_val) + else: + self._dict_inj[k] = np.array(tmp_d[k]).astype(dt_float) # TODO check the size based on the input data ! else: warn = ( @@ -3949,11 +3968,11 @@ def _aux_affect_object_int( if new_bus < min_val: raise IllegalAction( - f"new_bus should be between {min_val} and {max_val}" + f"new_bus should be between {min_val} and {max_val} found {new_bus}, check element id {el_id}" ) if new_bus > max_val: raise IllegalAction( - f"new_bus should be between {min_val} and {max_val}" + f"new_bus should be between {min_val} and {max_val} found {new_bus}, check element id {el_id}" ) if isinstance(el_id, (float, dt_float, np.float64)): diff --git a/grid2op/Environment/baseEnv.py b/grid2op/Environment/baseEnv.py index f45a733f..5d8e76a2 100644 --- a/grid2op/Environment/baseEnv.py +++ b/grid2op/Environment/baseEnv.py @@ -301,7 +301,7 @@ def foo(manager): #: this are the keys of the dictionnary `options` #: that can be used when calling `env.reset(..., options={})` - KEYS_RESET_OPTIONS = {"time serie id", "init state", "init ts", "max step"} + KEYS_RESET_OPTIONS = {"time serie id", "init state", "init ts", "max step", "thermal limit"} def __init__( self, @@ -1456,7 +1456,10 @@ def reset(self, # change also the reward used in simulate self._observation_space.change_reward(self._reward_helper.template_reward) self.__new_reward_func = None - + + if options is not None and "thermal limit" in options: + self.set_thermal_limit(options["thermal limit"]) + self._last_obs = None if options is not None and "time serie id" in options: @@ -1823,9 +1826,10 @@ def set_thermal_limit(self, thermal_limit): except Exception as exc_: raise Grid2OpException( f"When setting thermal limit with a dictionary, the keys should be " - f"the values of the thermal limit (in amps) you provided something that " - f'cannot be converted to a float. Error was "{exc_}".' - ) + f"the names of the lines and the values the thermal limit (in amps) " + f"you provided something that " + f'cannot be converted to a float {type(val)}' + ) from exc_ tmp[ind_line] = val_fl elif isinstance(thermal_limit, (np.ndarray, list)): @@ -1834,8 +1838,7 @@ def set_thermal_limit(self, thermal_limit): except Exception as exc_: raise Grid2OpException( f"Impossible to convert the vector as input into a 1d numpy float array. " - f"Error was: \n {exc_}" - ) + ) from exc_ if tmp.shape[0] != self.n_line: raise Grid2OpException( "Attempt to set thermal limit on {} powerlines while there are {}" diff --git a/grid2op/Space/GridObjects.py b/grid2op/Space/GridObjects.py index 1e0e28c1..f6c84dd4 100644 --- a/grid2op/Space/GridObjects.py +++ b/grid2op/Space/GridObjects.py @@ -5045,3 +5045,187 @@ class {cls.__name__}({cls._INIT_GRID_CLS.__name__}): """ return res + + @classmethod + def get_line_info(cls, *, line_id : Optional[int]=None, line_name : Optional[str]=None) -> Tuple[int, str, int, int]: + """ + .. versionadded:: 1.11.0 + + This function returns some information about a powerline, either given by its + name (with the kwargs `line_name` or by its id, with the kwargs `line_id`) + + It does not accept any positional argument (only key-word argument) and you need + to specify only one of `line_name` OR `line_id` but not both. + + .. info:: + `line_id` is a python id, so it should be between `0` and `env.n_line - 1` + + Examples + ---------- + + You can use it like this: + + .. code-block:: python + + import grid2op + env_name = "l2rpn_case14_sandbox" + env = grid2op.make(env_name) + + line_id, line_name, subor_id, subex_id = type(env).get_line_info("5_12_9") + line_id, line_name, subor_id, subex_id = type(env).get_line_info(15) + + """ + line_id, line_name = cls._aux_info("line", + cls.name_line, + cls.n_line, + obj_id=line_id, + obj_name=line_name) + sub_or = cls.line_or_to_subid[line_id] + sub_ex = cls.line_ex_to_subid[line_id] + return line_id, line_name, sub_or, sub_ex + + @classmethod + def _aux_info(cls, + el_nm, + cls_name_el, + cls_n_el, + obj_id : Optional[int]=None, + obj_name : Optional[str]=None) -> Tuple[int, str, int]: + if obj_id is None and obj_name is None: + raise RuntimeError(f"You should provide at least `{el_nm}_name` or `{el_nm}_id` key-word argument") + if obj_id is not None and obj_name is not None: + raise RuntimeError(f"You should provide only one of `{el_nm}_name` or `{el_nm}_id` key-word argument, you provided both") + if obj_id is None: + try: + obj_name = str(obj_name) + except TypeError as exc_: + raise RuntimeError(f"`{el_nm}_name` should be convertible to a string, you provided {type(obj_name)}") from exc_ + id_ = (cls_name_el == obj_name).nonzero()[0] + if len(id_) == 0: + raise RuntimeError(f"No {el_nm} named {obj_name} is found on your grid") + if len(id_) >= 2: + raise RuntimeError(f"Multiple {el_nm}s are named {obj_name} on your grid.") + obj_id = int(id_[0]) + if obj_name is None: + try: + obj_id = int(obj_id) + except TypeError as exc_: + raise RuntimeError(f"`{el_nm}_id` should be convertible to an int, you provided {type(obj_id)}") from exc_ + if obj_id < 0: + raise RuntimeError(f"`{el_nm}_id` should be >=0, you provided {obj_id}") + if obj_id >= cls_n_el: + raise RuntimeError(f"`{el_nm}_id` should not exceed {cls_n_el}, the number of {el_nm}s on the grid. " + f"You provided `{el_nm}_id`={obj_id}") + obj_name = cls_name_el[obj_id] + return obj_id, obj_name + + @classmethod + def get_load_info(cls, *, load_id : Optional[int]=None, load_name : Optional[str]=None) -> Tuple[int, str, int]: + """ + .. versionadded:: 1.11.0 + + This function returns some information about a load, either given by its + name (with the kwargs `load_name` or by its id, with the kwargs `load_id`) + + It does not accept any positional argument (only key-word argument) and you need + to specify only one of `load_name` OR `load_id` but not both. + + .. info:: + `load_id` is a python id, so it should be between `0` and `env.n_load - 1` + + Examples + ---------- + + You can use it like this: + + .. code-block:: python + + import grid2op + env_name = "l2rpn_case14_sandbox" + env = grid2op.make(env_name) + + load_id, load_name, sub_id = type(env).get_load_info("load_2_1") + load_id, load_name, sub_id = type(env).get_load_info(3) + + """ + load_id, load_name = cls._aux_info("load", + cls.name_load, + cls.n_load, + obj_id=load_id, + obj_name=load_name) + sub_id = cls.load_to_subid[load_id] + return load_id, load_name, sub_id + + @classmethod + def get_gen_info(cls, *, gen_id : Optional[int]=None, gen_name : Optional[str]=None) -> Tuple[int, str, int]: + """ + .. versionadded:: 1.11.0 + + This function returns some information about a generator, either given by its + name (with the kwargs `gen_name` or by its id, with the kwargs `gen_id`) + + It does not accept any positional argument (only key-word argument) and you need + to specify only one of `gen_name` OR `gen_id` but not both. + + .. info:: + `gen_id` is a python id, so it should be between `0` and `env.n_gen - 1` + + Examples + ---------- + + You can use it like this: + + .. code-block:: python + + import grid2op + env_name = "l2rpn_case14_sandbox" + env = grid2op.make(env_name) + + gen_id, gen_name, sub_id = type(env).get_gen_info("gen_5_2") + gen_id, gen_name, sub_id = type(env).get_gen_info(3) + + """ + gen_id, gen_name = cls._aux_info("gen", + cls.name_gen, + cls.n_gen, + obj_id=gen_id, + obj_name=gen_name) + sub_id = cls.gen_to_subid[gen_id] + return gen_id, gen_name, sub_id + + @classmethod + def get_storage_info(cls, *, storage_id : Optional[int]=None, storage_name : Optional[str]=None) -> Tuple[int, str, int]: + """ + .. versionadded:: 1.11.0 + + This function returns some information about a generator, either given by its + name (with the kwargs `storage_name` or by its id, with the kwargs `storage_id`) + + It does not accept any positional argument (only key-word argument) and you need + to specify only one of `storage_name` OR `storage_id` but not both. + + .. info:: + `storage_id` is a python id, so it should be between `0` and `env.n_storage - 1` + + Examples + ---------- + + You can use it like this: + + .. code-block:: python + + import grid2op + env_name = "educ_case14_storage" + env = grid2op.make(env_name, test=True) + + storage_id, storage_name, sub_id = type(env).get_storage_info("storage_7_1") + storage_id, storage_name, sub_id = type(env).get_storage_info(1) + + """ + storage_id, storage_name = cls._aux_info("storage", + cls.name_storage, + cls.n_storage, + obj_id=storage_id, + obj_name=storage_name) + sub_id = cls.storage_to_subid[storage_id] + return storage_id, storage_name, sub_id diff --git a/grid2op/tests/test_get_info_method.py b/grid2op/tests/test_get_info_method.py new file mode 100644 index 00000000..966b5451 --- /dev/null +++ b/grid2op/tests/test_get_info_method.py @@ -0,0 +1,181 @@ +# Copyright (c) 2019-2020, RTE (https://www.rte-france.com) +# See AUTHORS.txt +# This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0. +# If a copy of the Mozilla Public License, version 2.0 was not distributed with this file, +# you can obtain one at http://mozilla.org/MPL/2.0/. +# SPDX-License-Identifier: MPL-2.0 +# This file is part of Grid2Op, Grid2Op a testbed platform to model sequential decision making in power systems. + +import unittest +import warnings +from pathlib import Path +from grid2op.Environment import Environment, MultiMixEnvironment +from grid2op.tests.helper_path_test import * +import grid2op +import shutil + +import pdb + + +class TestGetInfoMethod(unittest.TestCase): + def setUp(self) -> None: + + with warnings.catch_warnings(): + warnings.filterwarnings("ignore") + self.env = grid2op.make("educ_case14_storage", test=True, _add_to_name=type(self).__name__) + + def tearDown(self) -> None: + self.env.close() + return super().tearDown() + + def test_get_line(self): + env_cls = type(self.env) + # raises error when input ill-formated + with self.assertRaises(RuntimeError): + env_cls.get_line_info() + with self.assertRaises(TypeError): + env_cls.get_line_info("0_1_0") + with self.assertRaises(TypeError): + env_cls.get_line_info(0) + with self.assertRaises(RuntimeError): + env_cls.get_line_info(line_name="0_1_0", line_id=0) + # raises error because of non existing object + with self.assertRaises(RuntimeError): + env_cls.get_line_info(line_name="unknown_line") + with self.assertRaises(RuntimeError): + env_cls.get_line_info(line_id=-1) + with self.assertRaises(RuntimeError): + env_cls.get_line_info(line_id=env_cls.n_line) + + # return correct result + for line_id, line_name, sub_or, sub_ex in zip(range(env_cls.n_line), + env_cls.name_line, + env_cls.line_or_to_subid, + env_cls.line_ex_to_subid): + line_id_res, line_name_res, sub_or_res, sub_ex_res = env_cls.get_line_info(line_id=line_id) + assert line_id == line_id_res, f"{line_id_res} vs {line_id}" + assert line_name == line_name_res, f"{line_name_res} vs {line_name}" + assert sub_or_res == sub_or, f"{sub_or_res} vs {sub_or}" + assert sub_ex_res == sub_ex, f"{sub_ex_res} vs {sub_ex}" + + for line_id, line_name, sub_or, sub_ex in zip(range(env_cls.n_line), + env_cls.name_line, + env_cls.line_or_to_subid, + env_cls.line_ex_to_subid): + line_id_res, line_name_res, sub_or_res, sub_ex_res = env_cls.get_line_info(line_name=line_name) + assert line_id == line_id_res, f"{line_id_res} vs {line_id}" + assert line_name == line_name_res, f"{line_name_res} vs {line_name}" + assert sub_or_res == sub_or, f"{sub_or_res} vs {sub_or}" + assert sub_ex_res == sub_ex, f"{sub_ex_res} vs {sub_ex}" + + def test_get_load(self): + env_cls = type(self.env) + # raises error when input ill-formated + with self.assertRaises(RuntimeError): + env_cls.get_load_info() + with self.assertRaises(TypeError): + env_cls.get_load_info("load_1_0") + with self.assertRaises(TypeError): + env_cls.get_load_info(0) + with self.assertRaises(RuntimeError): + env_cls.get_load_info(load_name="load_1_0", load_id=0) + # raises error because of non existing object + with self.assertRaises(RuntimeError): + env_cls.get_load_info(load_name="unknown_load") + with self.assertRaises(RuntimeError): + env_cls.get_load_info(load_id=-1) + with self.assertRaises(RuntimeError): + env_cls.get_load_info(load_id=env_cls.n_load) + + # return correct result + for el_id, el_name, sub_id in zip(range(env_cls.n_load), + env_cls.name_load, + env_cls.load_to_subid): + el_id_res, el_name_res, sub_res = env_cls.get_load_info(load_id=el_id) + assert el_id == el_id_res, f"{el_id_res} vs {el_id}" + assert el_name == el_name_res, f"{el_name_res} vs {el_name}" + assert sub_res == sub_id, f"{sub_res} vs {sub_id}" + + for el_id, el_name, sub_id in zip(range(env_cls.n_load), + env_cls.name_load, + env_cls.load_to_subid): + el_id_res, el_name_res, sub_res = env_cls.get_load_info(load_name=el_name) + assert el_id == el_id_res, f"{el_id_res} vs {el_id}" + assert el_name == el_name_res, f"{el_name_res} vs {el_name}" + assert sub_res == sub_id, f"{sub_res} vs {sub_id}" + + def test_get_gen(self): + env_cls = type(self.env) + # raises error when input ill-formated + with self.assertRaises(RuntimeError): + env_cls.get_gen_info() + with self.assertRaises(TypeError): + env_cls.get_gen_info("gen_5_2") + with self.assertRaises(TypeError): + env_cls.get_gen_info(0) + with self.assertRaises(RuntimeError): + env_cls.get_gen_info(gen_name="gen_5_2", gen_id=0) + # raises error because of non existing object + with self.assertRaises(RuntimeError): + env_cls.get_gen_info(gen_name="unknown_gen") + with self.assertRaises(RuntimeError): + env_cls.get_gen_info(gen_id=-1) + with self.assertRaises(RuntimeError): + env_cls.get_gen_info(gen_id=env_cls.n_gen) + + # return correct result + for el_id, el_name, sub_id in zip(range(env_cls.n_gen), + env_cls.name_gen, + env_cls.gen_to_subid): + el_id_res, el_name_res, sub_res = env_cls.get_gen_info(gen_id=el_id) + assert el_id == el_id_res, f"{el_id_res} vs {el_id}" + assert el_name == el_name_res, f"{el_name_res} vs {el_name}" + assert sub_res == sub_id, f"{sub_res} vs {sub_id}" + + for el_id, el_name, sub_id in zip(range(env_cls.n_gen), + env_cls.name_gen, + env_cls.gen_to_subid): + el_id_res, el_name_res, sub_res = env_cls.get_gen_info(gen_name=el_name) + assert el_id == el_id_res, f"{el_id_res} vs {el_id}" + assert el_name == el_name_res, f"{el_name_res} vs {el_name}" + assert sub_res == sub_id, f"{sub_res} vs {sub_id}" + + def test_get_storage(self): + env_cls = type(self.env) + # raises error when input ill-formated + with self.assertRaises(RuntimeError): + env_cls.get_storage_info() + with self.assertRaises(TypeError): + env_cls.get_storage_info("storage_5_0") + with self.assertRaises(TypeError): + env_cls.get_storage_info(0) + with self.assertRaises(RuntimeError): + env_cls.get_storage_info(storage_name="storage_5_0", storage_id=0) + # raises error because of non existing object + with self.assertRaises(RuntimeError): + env_cls.get_storage_info(storage_name="unknown_storage") + with self.assertRaises(RuntimeError): + env_cls.get_storage_info(storage_id=-1) + with self.assertRaises(RuntimeError): + env_cls.get_storage_info(storage_id=env_cls.n_storage) + + # return correct result + for el_id, el_name, sub_id in zip(range(env_cls.n_storage), + env_cls.name_storage, + env_cls.storage_to_subid): + el_id_res, el_name_res, sub_res = env_cls.get_storage_info(storage_id=el_id) + assert el_id == el_id_res, f"{el_id_res} vs {el_id}" + assert el_name == el_name_res, f"{el_name_res} vs {el_name}" + assert sub_res == sub_id, f"{sub_res} vs {sub_id}" + + for el_id, el_name, sub_id in zip(range(env_cls.n_storage), + env_cls.name_storage, + env_cls.storage_to_subid): + el_id_res, el_name_res, sub_res = env_cls.get_storage_info(storage_name=el_name) + assert el_id == el_id_res, f"{el_id_res} vs {el_id}" + assert el_name == el_name_res, f"{el_name_res} vs {el_name}" + assert sub_res == sub_id, f"{sub_res} vs {sub_id}" + + +if __name__ == "__main__": + unittest.main() diff --git a/grid2op/typing_variables.py b/grid2op/typing_variables.py index 0d0c0396..856e7a76 100644 --- a/grid2op/typing_variables.py +++ b/grid2op/typing_variables.py @@ -47,6 +47,7 @@ Dict[Literal["init state"], DICT_ACT_TYPING], Dict[Literal["init ts"], int], Dict[Literal["max step"], int], + Dict[Literal["thermal limit"], Union[List[float], Dict[str, float]]], None] #: type hints for a "GridObject" when converted to a dictionary From 3a8d92801b0bd282bf885a94bc2c6976a5c20e5c Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Tue, 22 Oct 2024 15:44:07 +0200 Subject: [PATCH 20/21] upgrade version in files [skip ci] Signed-off-by: DONNOT Benjamin --- docs/conf.py | 4 ++-- grid2op/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e3af0441..0c87c412 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,8 +22,8 @@ author = 'Benjamin Donnot' # The full version, including alpha/beta/rc tags -release = '1.10.5' -version = '1.10' +release = '1.11.1.dev0' +version = '1.11' # -- General configuration --------------------------------------------------- diff --git a/grid2op/__init__.py b/grid2op/__init__.py index c0d928f8..14ab5755 100644 --- a/grid2op/__init__.py +++ b/grid2op/__init__.py @@ -11,7 +11,7 @@ Grid2Op """ -__version__ = '1.10.5' +__version__ = '1.11.0.dev0' __all__ = [ "Action", From 50266c93ff23f8f06a73a52c77f739ceb388655e Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Tue, 22 Oct 2024 15:45:56 +0200 Subject: [PATCH 21/21] fix version in docs/conf.py [skip ci] Signed-off-by: DONNOT Benjamin --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 0c87c412..d25f97a1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Benjamin Donnot' # The full version, including alpha/beta/rc tags -release = '1.11.1.dev0' +release = '1.11.0.dev0' version = '1.11'