Point evaluation at the reproduction guide, with a short main-branch variant.
Browse files
README.md
CHANGED
|
@@ -9,69 +9,13 @@ tags:
|
|
| 9 |
- opfdata
|
| 10 |
---
|
| 11 |
|
| 12 |
-
Reproduction guide: [GENCO §5.2](https://github.com/gridfm/gridfm-paper-genco/blob/main/repro_instructions/5.2_OPF_on_opfdata.md).
|
| 13 |
-
|
| 14 |
GENCO optimal-power-flow checkpoints on OPFData ([paper](https://arxiv.org/abs/2608.09921)): IEEE 14, 30, 57, and 118, and GOC 500 and 2000, seeds 42, 3, and 17.
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
Use graphkit branch [genco-paper-repro](https://github.com/gridfm/gridfm-graphkit/tree/genco-paper-repro). Graphkit requires Python 3.10, 3.11, or 3.12. The paper numbers come from this branch. [Evaluate on main](#evaluate-on-main) is the same checkpoints on current `main`.
|
| 19 |
-
|
| 20 |
-
```bash
|
| 21 |
-
git clone -b genco-paper-repro https://github.com/gridfm/gridfm-graphkit.git
|
| 22 |
-
cd gridfm-graphkit
|
| 23 |
-
pip install -e .
|
| 24 |
-
pip install huggingface_hub
|
| 25 |
-
TORCH_CUDA_VERSION=$(python -c "import torch; print(torch.__version__ + ('+cpu' if torch.version.cuda is None else ''))")
|
| 26 |
-
pip install torch-scatter -f https://data.pyg.org/whl/torch-${TORCH_CUDA_VERSION}.html
|
| 27 |
-
export MLFLOW_ALLOW_FILE_STORE=true
|
| 28 |
-
```
|
| 29 |
-
|
| 30 |
-
Run the commands below from that repo root. Graphkit loads `{data_path}/{network}/raw/*.parquet`. Configs are in [`scripts/opfdata/configs`](https://github.com/gridfm/gridfm-graphkit/tree/genco-paper-repro/scripts/opfdata/configs). Copy `splits/` to `scripts/opfdata/splits/` before evaluating. Each checkpoint folder has `best_model_state_dict.pt` and `normalizer_stats.pt`.
|
| 31 |
-
|
| 32 |
-
| Grid | Dataset | `network` folder |
|
| 33 |
-
|---|---|---|
|
| 34 |
-
| IEEE 14 | [gridfm/opfdata_case14_ieee](https://huggingface.co/datasets/gridfm/opfdata_case14_ieee) | `case14_ieee` |
|
| 35 |
-
| IEEE 30 | [gridfm/opfdata_case30_ieee](https://huggingface.co/datasets/gridfm/opfdata_case30_ieee) | `case30_ieee` |
|
| 36 |
-
| IEEE 57 | [gridfm/opfdata_case57_ieee](https://huggingface.co/datasets/gridfm/opfdata_case57_ieee) | `case57_ieee` |
|
| 37 |
-
| IEEE 118 | [gridfm/opfdata_case118_ieee](https://huggingface.co/datasets/gridfm/opfdata_case118_ieee) | `case118_ieee` |
|
| 38 |
-
| GOC 500 | [gridfm/opfdata_case500_goc](https://huggingface.co/datasets/gridfm/opfdata_case500_goc) | `case500_goc` |
|
| 39 |
-
| GOC 2000 | [gridfm/opfdata_case2000_goc](https://huggingface.co/datasets/gridfm/opfdata_case2000_goc) | `case2000_goc` |
|
| 40 |
-
|
| 41 |
-
```bash
|
| 42 |
-
mkdir -p data/case118_ieee/raw scripts/opfdata/splits
|
| 43 |
-
hf download gridfm/opfdata_case118_ieee --repo-type dataset --local-dir data/case118_ieee/raw
|
| 44 |
-
hf download gridfm/genco-opfdata --include "case118_ieee/seed42/**" --include "splits/**" --local-dir genco-opfdata
|
| 45 |
-
cp genco-opfdata/splits/*.pt scripts/opfdata/splits/
|
| 46 |
-
|
| 47 |
-
gridfm_graphkit evaluate \
|
| 48 |
-
--config scripts/opfdata/configs/HGNSQ_penalty_11_OPFData_case118_default.yaml \
|
| 49 |
-
--data_path data \
|
| 50 |
-
--model_path genco-opfdata/case118_ieee/seed42/best_model_state_dict.pt \
|
| 51 |
-
--normalizer_stats genco-opfdata/case118_ieee/seed42/normalizer_stats.pt \
|
| 52 |
-
--batch_size 512
|
| 53 |
-
```
|
| 54 |
-
|
| 55 |
-
Repeat for the other grids and seeds. Download each dataset into `data/<network>/raw`. The first `evaluate` writes one graph file per scenario before testing.
|
| 56 |
-
|
| 57 |
-
## Evaluate on main
|
| 58 |
|
| 59 |
-
|
| 60 |
|
| 61 |
```bash
|
| 62 |
-
git clone https://github.com/gridfm/gridfm-graphkit.git
|
| 63 |
-
cd gridfm-graphkit
|
| 64 |
-
pip install -e .
|
| 65 |
-
pip install huggingface_hub
|
| 66 |
-
TORCH_CUDA_VERSION=$(python -c "import torch; print(torch.__version__ + ('+cpu' if torch.version.cuda is None else ''))")
|
| 67 |
-
pip install torch-scatter -f https://data.pyg.org/whl/torch-${TORCH_CUDA_VERSION}.html
|
| 68 |
-
export MLFLOW_ALLOW_FILE_STORE=true
|
| 69 |
-
|
| 70 |
-
mkdir -p data/case118_ieee/raw scripts/opfdata/splits
|
| 71 |
-
hf download gridfm/opfdata_case118_ieee --repo-type dataset --local-dir data/case118_ieee/raw
|
| 72 |
-
hf download gridfm/genco-opfdata --include "case118_ieee/seed42/**" --include "splits/**" --local-dir genco-opfdata
|
| 73 |
-
cp genco-opfdata/splits/*.pt scripts/opfdata/splits/
|
| 74 |
-
|
| 75 |
gridfm_graphkit evaluate \
|
| 76 |
--config_conversion auto_inline \
|
| 77 |
--config genco-opfdata/case118_ieee/seed42/HGNSQ_penalty_11_OPFData_case118_default.yaml \
|
|
@@ -81,18 +25,4 @@ gridfm_graphkit evaluate \
|
|
| 81 |
--batch_size 512
|
| 82 |
```
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
## Files
|
| 87 |
-
|
| 88 |
-
```
|
| 89 |
-
{case14_ieee,case30_ieee,case57_ieee,case118_ieee,case500_goc,case2000_goc}/seed{42,3,17}/
|
| 90 |
-
best_model_state_dict.pt
|
| 91 |
-
normalizer_stats.pt
|
| 92 |
-
metrics.csv
|
| 93 |
-
HGNSQ_penalty_11_OPFData_<case>_<default|3|17>.yaml
|
| 94 |
-
splits/
|
| 95 |
-
train.pt val.pt test.pt shuffled_indices.pt
|
| 96 |
-
mlflow/train/
|
| 97 |
-
mlflow/eval/
|
| 98 |
-
```
|
|
|
|
| 9 |
- opfdata
|
| 10 |
---
|
| 11 |
|
|
|
|
|
|
|
| 12 |
GENCO optimal-power-flow checkpoints on OPFData ([paper](https://arxiv.org/abs/2608.09921)): IEEE 14, 30, 57, and 118, and GOC 500 and 2000, seeds 42, 3, and 17.
|
| 13 |
|
| 14 |
+
Evaluate on the paper branch by following [GENCO §5.2](https://github.com/gridfm/gridfm-paper-genco/blob/main/repro_instructions/5.2_OPF_on_opfdata.md). That guide uses graphkit [genco-paper-repro](https://github.com/gridfm/gridfm-graphkit/tree/genco-paper-repro) and is how the paper numbers were produced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
Or evaluate the same checkpoints on graphkit [main](https://github.com/gridfm/gridfm-graphkit/tree/main). `main` is under development, so the same numbers are not guaranteed. They matched the paper-branch result for IEEE 14, seed 42, at commit [`f104900`](https://github.com/gridfm/gridfm-graphkit/commit/f104900245cba26d1380037eea562cf633a97484) (1 October 2026). Clone `main` instead of `genco-paper-repro`, follow the rest of the install and the downloads in the guide, then run:
|
| 17 |
|
| 18 |
```bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
gridfm_graphkit evaluate \
|
| 20 |
--config_conversion auto_inline \
|
| 21 |
--config genco-opfdata/case118_ieee/seed42/HGNSQ_penalty_11_OPFData_case118_default.yaml \
|
|
|
|
| 25 |
--batch_size 512
|
| 26 |
```
|
| 27 |
|
| 28 |
+
`main` does not ship the paper YAML and rejects it as config version 0. `--config_conversion auto_inline` upgrades that file in memory. The YAML is the one downloaded with the checkpoint. Repeat for the other grids and seeds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|