EnerGNN
A Graph Neural Network library based on JAX and Flax, specifically designed for real-life energy networks and large complex industrial infrastructures.
EnerGNN provides:
- A Hyper Heterogeneous Multi Graph (H2MG) data representation.
- A Graph Neural Network (GNN) library robust to structure variations (outages, reconfigurations, etc.).
- A clear interface to apply GNNs to custom use-cases (optimization, simulation, etc.).
Documentation
You can find the full documentation on ReadTheDocs.
Installation
EnerGNN is available on PyPI for Python >= 3.11.
pip install energnn
If you want to install the extra GPU dependencies, use:
pip install energnn[gpu]
The graph plots of energnn.graph.visualization need plotly, provided by the viz extra:
pip install energnn[viz]
Quick Start
This example shows how to train a small GNN to solve a linear system (DC Power Flow) modeled as a graph.
import optax
from energnn.problem.example import LinearSystemProblemLoader
from energnn.model.ready_to_use import TinyRecurrentEquivariantGNN
from energnn.trainer import Trainer
# 1. Load a problem (DC Power Flow linear systems)
problem_loader = LinearSystemProblemLoader(seed=1)
# 2. Initialize a model
model = TinyRecurrentEquivariantGNN(
in_structure=problem_loader.context_structure,
out_structure=problem_loader.decision_structure,
)
# 3. Train the model
trainer = Trainer(model=model, gradient_transformation=optax.adam(1e-3))
trainer.train(train_loader=problem_loader, n_epochs=10)
# 4. Use the model
for problem_batch in problem_loader:
context_batch, _ = problem_batch.get_context()
decision_batch, _ = model.forward_batch(graph=context_batch)
break
Development
To build this package locally from sources, we recommend using uv:
uv sync
# Or for GPU support
uv sync --extra gpu
Supporting Institutions
| RTE | Université de Liège | INRIA |
|---|---|---|
Cite Us
@software{energnn,
author = {{Committers of EnerGNN}},
title = {{EnerGNN: A Graph Neural Network library for real-life Energy networks.}},
url = {https://github.com/energnn},
}
Metadata
Release files for energnn 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| energnn-0.5.0.tar.gz | 1.2 MB | Without provenance | Details for energnn-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| energnn-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for energnn-0.5.0-py3-none-any.whl |
Total release size: 1.3 MB
Release files / energnn-0.5.0.tar.gz
| Download URL | energnn-0.5.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfc3616f2863ed2aa46af4ed3246a922907cf67ef34628c66f10726e58fe63f8
|
|
BLAKE2b-256 checksum How to use checksums |
f4d2d2992f068af4017659ac2de5113116645cbbdf254a707d646c397b04a854
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / energnn-0.5.0-py3-none-any.whl
| Download URL | energnn-0.5.0-py3-none-any.whl |
|---|---|
| Size | 121.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7635a9f11d7dbbe3217e362bcc9319493e25e1797ee720671b3de1e9eab20f18
|
|
BLAKE2b-256 checksum How to use checksums |
2934a5dff8d11f1793ba53a38edb9c336f5956086f02ceba90dfcf31bb0a394f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for energnn 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.