-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from rte-france/bd-dev
first modification before version 0.5.0
- Loading branch information
Showing
29 changed files
with
2,908 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
LeapNetEncoded: D3QN on a state encoded by a leap net | ||
====================================================== | ||
|
||
TODO reference the original papers `ESANN Paper <https://hal.archives-ouvertes.fr/hal-02268886>`_ | ||
`Leap Net <https://www.sciencedirect.com/science/article/abs/pii/S0925231220305051>`_ | ||
|
||
That has now be implemented as a github repository `Leap Net Github <https://github.com/BDonnot/leap_net>`_ | ||
|
||
Description | ||
----------- | ||
The Leap is a type of neural network that has showed really good performances on the predictions of flows on | ||
powerlines based on the injection and the topology. | ||
|
||
In this baseline, we use this very same architecture to model encode the powergrid state (at a given | ||
step). | ||
|
||
Then this embedding of the powergrid is used by a neural network (that can be a regular network or | ||
a leap net) that parametrized the Q function. | ||
|
||
An example to train this model is available in the train function :ref:`Example-leapnetenc`. | ||
|
||
Exported class | ||
-------------- | ||
You can use this class with: | ||
|
||
.. code-block:: python | ||
from l2rpn_baselines.LeapNetEncoded import train, evaluate, LeapNetEncoded | ||
.. automodule:: l2rpn_baselines.LeapNetEncoded | ||
:members: | ||
:autosummary: | ||
|
||
Other non exported class | ||
------------------------ | ||
These classes need to be imported, if you want to import them with (non exhaustive list): | ||
|
||
.. code-block:: python | ||
from l2rpn_baselines.LeapNetEncoded.LeapNetEncoded_NN import LeapNetEncoded_NN | ||
from l2rpn_baselines.LeapNetEncoded.LeapNetEncoded_NNParam import LeapNetEncoded_NNParam | ||
.. autoclass:: l2rpn_baselines.LeapNetEncoded.LeapNetEncoded_NN.LeapNetEncoded_NN | ||
:members: | ||
:autosummary: | ||
|
||
.. autoclass:: l2rpn_baselines.LeapNetEncoded.LeapNetEncoded_NNParam.LeapNetEncoded_NNParam | ||
:members: | ||
:autosummary: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
SAC: Soft Actor Critic | ||
========================= | ||
|
||
This baseline comes from the paper: | ||
`Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor <https://arxiv.org/abs/1801.01290>`_ | ||
|
||
|
||
Description | ||
----------- | ||
This module proposes an implementation of the SAC algorithm. | ||
|
||
**This is an old implementation that is probably not correct, it was included out of | ||
backward compatibility with earlier version (< 0.5.0) of this package** | ||
|
||
An example to train this model is available in the train function :ref:`Example-sacold`. | ||
|
||
Exported class | ||
-------------- | ||
You can use this class with: | ||
|
||
.. code-block:: python | ||
from l2rpn_baselines.SACOld import train, evaluate, SACOld | ||
.. automodule:: l2rpn_baselines.SACOld | ||
:members: | ||
:autosummary: | ||
|
||
Other non exported class | ||
------------------------ | ||
These classes need to be imported, if you want to import them with (non exhaustive list): | ||
.. code-block:: python | ||
from l2rpn_baselines.SACOld.SACOld_NN import SACOld_NN | ||
from l2rpn_baselines.SACOld.SACOld_NNParam import SACOld_NNParam | ||
.. autoclass:: l2rpn_baselines.SACOld.SACOld_NN.SACOld_NN | ||
:members: | ||
:autosummary: | ||
|
||
.. autoclass:: l2rpn_baselines.SACOld.SACOld_NNParam.SACOld_NNParam | ||
:members: | ||
:autosummary: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 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 L2RPN Baselines, L2RPN Baselines a repository to host baselines for l2rpn competitions. | ||
|
||
|
||
from l2rpn_baselines.utils import DeepQAgent | ||
|
||
DEFAULT_NAME = "LeapNetEncoded" | ||
|
||
|
||
class LeapNetEncoded(DeepQAgent): | ||
""" | ||
Inheriting from :class:`l2rpn_baselines.DeepQAgent` this class implements the particular agent used for the | ||
Double Duelling Deep Q network baseline, with the particularity that the Q network is encoded with a leap net. | ||
It does nothing in particular. | ||
""" | ||
pass |
Oops, something went wrong.