Skip to content

Commit

Permalink
Merge pull request #650 from BDonnot/bd_dev
Browse files Browse the repository at this point in the history
Fix links to match grid2op/grid2op.git and not rte-france/grid2op.git
  • Loading branch information
BDonnot authored Oct 15, 2024
2 parents 9bb03c8 + cd3cb60 commit e7422c6
Show file tree
Hide file tree
Showing 111 changed files with 1,382 additions and 340 deletions.
442 changes: 241 additions & 201 deletions CHANGELOG.rst

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `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),
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.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
Expand Down
49 changes: 24 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ..
Expand All @@ -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]
Expand Down Expand Up @@ -136,74 +136,74 @@ 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
manipulate this concept in grid2op. Redispatching (and curtailment) allows you to perform **continuous**
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)

Expand All @@ -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}},
}
```

Expand Down Expand Up @@ -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 <https://github.com/rte-france/Grid2Op>
1. fork the repository located at <https://github.com/Grid2Op/grid2op>
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
Expand Down
7 changes: 2 additions & 5 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ dependencies:
- keras
- pip
- pip:
- grid2op[challenge]
- l2rpn-baselines
- grid2op
- jyquickhelper
- numpy
- numba
- keras
- seaborn
- plotly
- imageio
- ray[rllib, default]
- imageio
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Benjamin Donnot'

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


Expand Down
2 changes: 1 addition & 1 deletion docs/developer/create_an_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/createbackend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion docs/final.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rte-france/Grid2Op/issues/new?assignees=&labels=documentation&template=documentation.md&title=>`_
link: `Documentation issue template <https://github.com/Grid2Op/grid2op/issues/new?assignees=&labels=documentation&template=documentation.md&title=>`_
4 changes: 2 additions & 2 deletions docs/grid2op.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rte-france/Grid2Op>`_
`Grid2Op <https://github.com/Grid2Op/grid2op>`_

.. note::
Grid2op do not model any object on the powergrid. It has no internal modeling of the equations of the
Expand Down Expand Up @@ -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 <https://mybinder.org/v2/gh/rte-france/Grid2Op/master>`_ . Feel free to visit the "getting_started" page for
`Binder <https://mybinder.org/v2/gh/Grid2Op/grid2op/master>`_ . Feel free to visit the "getting_started" page for
more information and a detailed tour about the issue that grid2op tries to address.

.. note::
Expand Down
4 changes: 2 additions & 2 deletions docs/grid_graph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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::

Expand Down
2 changes: 1 addition & 1 deletion docs/makeenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/rte-france/Grid2Op>`_
an issue in the official grid2op repository: `Grid2Op <https://github.com/Grid2Op/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
Expand Down
4 changes: 2 additions & 2 deletions docs/model_based.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <https://mybinder.org/v2/gh/rte-france/Grid2Op/master>`_ . Feel free to visit the "getting_started" page for
`Binder <https://mybinder.org/v2/gh/Grid2Op/grid2op/master>`_ . 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:
Expand Down
Loading

0 comments on commit e7422c6

Please sign in to comment.