Metadata-Version: 2.1
Name: l2rpn_baselines
Version: 0.8.0
Summary: L2RPN Baselines a repository to host baselines for l2rpn competitions.
Home-page: https://github.com/rte-france/L2RPN_Baselines
Author: Benjamin DONNOT
Author-email: benjamin.donnot@rte-france.com
License: MPL
Keywords: ML powergrid optmization RL power-systems
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Description-Content-Type: text/markdown
Provides-Extra: docs
Provides-Extra: optional
Provides-Extra: PPO_RLLIB
Provides-Extra: PPO_SB3
Provides-Extra: CurriculumAgent
License-File: LICENSE
License-File: LICENSE.md
License-File: AUTHORS.txt

# L2RPN_Baselines
Repository hosting reference baselines for the [L2RPN challenge](https://l2rpn.chalearn.org/)

# Install 

## Requirements
`python3 >= 3.6`

## Instal from PyPI
```sh
pip3 install l2rpn_baselines
```
## Install from source
```sh
git clone https://github.com/rte-france/l2rpn-baselines.git
cd l2rpn-baselines
pip3 install -U .
cd ..
rm -rf l2rpn-baselines
```

# Contribute

We welcome contributions: see the [contribute guide](/CONTRIBUTE.md) for details.

# Get started with a baseline

Say you want to know how you compared with the "PPO_SB3" baseline implementation in this repository (for the
sake of this example).

## Train it (optional)
As no weights are provided for this baselines by default (yet), you will first need to train such a baseline:

```python
import grid2op
from l2rpn_baselines.PPO_SB3 import train
env = grid2op.make("l2rpn_case14_sandbox")
res = train(env, save_path="THE/PATH/TO/SAVE/IT", iterations=100)
```

You can have more information about extra argument of the "train" function in the 
[CONTRIBUTE](/CONTRIBUTE.md) file.

## Evaluate it
Once trained, you can reload it and evaluate its performance with the provided "evaluate" function:

```python
import grid2op
from l2rpn_baselines.PPO_SB3 import evaluate
env = grid2op.make("l2rpn_case14_sandbox")
res = evaluate(env, load_path="THE/PATH/TO/LOAD/IT", nb_episode=10)
```

You can have more information about extra argument of the "evaluate" function in the 
[CONTRIBUTE](/CONTRIBUTE.md) file.
