Point evaluation at the reproduction guide, with a short main-branch variant.
Browse files
README.md
CHANGED
|
@@ -9,67 +9,13 @@ tags:
|
|
| 9 |
- datakit
|
| 10 |
---
|
| 11 |
|
| 12 |
-
Reproduction guide: [GENCO §5.4.2](https://github.com/gridfm/gridfm-paper-genco/blob/main/repro_instructions/5.4.2_PF_on_datakit.md).
|
| 13 |
-
|
| 14 |
GENCO power-flow checkpoints on datakit grids ([paper](https://arxiv.org/abs/2608.09921)). Base, Small, and Tiny (hidden size 48, 24, and 12) on IEEE 14, 30, 57, and 118 and GOC 500. Small and Tiny on GOC 2000 and GOC 10000.
|
| 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/datakit_pf/configs`](https://github.com/gridfm/gridfm-graphkit/tree/genco-paper-repro/scripts/datakit_pf/configs). Pass the weights and `normalizer_stats.pt` from the same folder.
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|---|---|---|
|
| 34 |
-
| IEEE 14 | [gridfm/pf_small_case14_ieee](https://huggingface.co/datasets/gridfm/pf_small_case14_ieee) | `case14_ieee` |
|
| 35 |
-
| IEEE 30 | [gridfm/pf_small_case30_ieee](https://huggingface.co/datasets/gridfm/pf_small_case30_ieee) | `case30_ieee` |
|
| 36 |
-
| IEEE 57 | [gridfm/pf_small_case57_ieee](https://huggingface.co/datasets/gridfm/pf_small_case57_ieee) | `case57_ieee` |
|
| 37 |
-
| IEEE 118 | [gridfm/pf_small_case118_ieee](https://huggingface.co/datasets/gridfm/pf_small_case118_ieee) | `case118_ieee` |
|
| 38 |
-
| GOC 500 | [gridfm/pf_small_case500_goc](https://huggingface.co/datasets/gridfm/pf_small_case500_goc) | `case500_goc` |
|
| 39 |
-
| GOC 2000 | [gridfm/pf_small_case2000_goc](https://huggingface.co/datasets/gridfm/pf_small_case2000_goc) | `case2000_goc` |
|
| 40 |
-
| GOC 10000 | [gridfm/pf_small_case10000_goc](https://huggingface.co/datasets/gridfm/pf_small_case10000_goc) | `case10000_goc` |
|
| 41 |
|
| 42 |
```bash
|
| 43 |
-
mkdir -p data/case118_ieee/raw
|
| 44 |
-
hf download gridfm/pf_small_case118_ieee --repo-type dataset --local-dir data/case118_ieee/raw
|
| 45 |
-
hf download gridfm/genco-pf-datakit --include "case118_ieee/base/seed0/**" --local-dir genco-pf-datakit
|
| 46 |
-
|
| 47 |
-
gridfm_graphkit evaluate \
|
| 48 |
-
--config scripts/datakit_pf/configs/case118_ieee_base_seed0.yaml \
|
| 49 |
-
--data_path data \
|
| 50 |
-
--model_path genco-pf-datakit/case118_ieee/base/seed0/best_model_state_dict.pt \
|
| 51 |
-
--normalizer_stats genco-pf-datakit/case118_ieee/base/seed0/normalizer_stats.pt
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
Repeat for the other grids, sizes, and seeds. Download each dataset into `data/<network>/raw`. For GOC 10000, pass `last.pt` instead of `best_model_state_dict.pt`. The first `evaluate` writes one graph file per scenario before testing.
|
| 55 |
-
|
| 56 |
-
## Evaluate on main
|
| 57 |
-
|
| 58 |
-
The same checkpoints run on current [main](https://github.com/gridfm/gridfm-graphkit/tree/main). This was checked at commit `f104900`. `main` does not ship these YAML files, and it rejects them as config version 0. Use the YAML downloaded with the checkpoint, and pass `--config_conversion auto_inline`. That upgrades the config in memory and leaves the file unchanged.
|
| 59 |
-
|
| 60 |
-
```bash
|
| 61 |
-
git clone https://github.com/gridfm/gridfm-graphkit.git
|
| 62 |
-
cd gridfm-graphkit
|
| 63 |
-
pip install -e .
|
| 64 |
-
pip install huggingface_hub
|
| 65 |
-
TORCH_CUDA_VERSION=$(python -c "import torch; print(torch.__version__ + ('+cpu' if torch.version.cuda is None else ''))")
|
| 66 |
-
pip install torch-scatter -f https://data.pyg.org/whl/torch-${TORCH_CUDA_VERSION}.html
|
| 67 |
-
export MLFLOW_ALLOW_FILE_STORE=true
|
| 68 |
-
|
| 69 |
-
mkdir -p data/case118_ieee/raw
|
| 70 |
-
hf download gridfm/pf_small_case118_ieee --repo-type dataset --local-dir data/case118_ieee/raw
|
| 71 |
-
hf download gridfm/genco-pf-datakit --include "case118_ieee/base/seed0/**" --local-dir genco-pf-datakit
|
| 72 |
-
|
| 73 |
gridfm_graphkit evaluate \
|
| 74 |
--config_conversion auto_inline \
|
| 75 |
--config genco-pf-datakit/case118_ieee/base/seed0/case118_ieee_base_seed0.yaml \
|
|
@@ -78,21 +24,4 @@ gridfm_graphkit evaluate \
|
|
| 78 |
--normalizer_stats genco-pf-datakit/case118_ieee/base/seed0/normalizer_stats.pt
|
| 79 |
```
|
| 80 |
|
| 81 |
-
Repeat for the other grids, sizes, and seeds. For GOC 10000, pass `last.pt` instead of `best_model_state_dict.pt`.
|
| 82 |
-
|
| 83 |
-
## Files
|
| 84 |
-
|
| 85 |
-
```
|
| 86 |
-
{case14,case30,case57,case118}_ieee/{base,small,tiny}/seed{0,1,42}/
|
| 87 |
-
case500_goc/{base,small,tiny}/seed{0,1,42}/
|
| 88 |
-
case2000_goc/{small,tiny}/seed{0,42}/
|
| 89 |
-
case10000_goc/{small,tiny}/seed{0,1}/
|
| 90 |
-
best_model_state_dict.pt
|
| 91 |
-
normalizer_stats.pt
|
| 92 |
-
metrics.csv
|
| 93 |
-
<network>_<size>_seed<seed>.yaml
|
| 94 |
-
case10000_goc/{small,tiny}/seed{0,1}/
|
| 95 |
-
last.pt
|
| 96 |
-
mlflow/eval/
|
| 97 |
-
mlflow/train/
|
| 98 |
-
```
|
|
|
|
| 9 |
- datakit
|
| 10 |
---
|
| 11 |
|
|
|
|
|
|
|
| 12 |
GENCO power-flow checkpoints on datakit grids ([paper](https://arxiv.org/abs/2608.09921)). Base, Small, and Tiny (hidden size 48, 24, and 12) on IEEE 14, 30, 57, and 118 and GOC 500. Small and Tiny on GOC 2000 and GOC 10000.
|
| 13 |
|
| 14 |
+
Evaluate on the paper branch by following [GENCO §5.4.2](https://github.com/gridfm/gridfm-paper-genco/blob/main/repro_instructions/5.4.2_PF_on_datakit.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, Base, seed 0, 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-pf-datakit/case118_ieee/base/seed0/case118_ieee_base_seed0.yaml \
|
|
|
|
| 24 |
--normalizer_stats genco-pf-datakit/case118_ieee/base/seed0/normalizer_stats.pt
|
| 25 |
```
|
| 26 |
|
| 27 |
+
`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, sizes, and seeds. For GOC 10000, pass `last.pt` instead of `best_model_state_dict.pt`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|