Document the reproduction-branch install and evaluation on main.
Browse files
README.md
CHANGED
|
@@ -15,13 +15,13 @@ GENCO optimal-power-flow checkpoints on OPFData ([paper](https://arxiv.org/abs/2
|
|
| 15 |
|
| 16 |
## Evaluate
|
| 17 |
|
| 18 |
-
Use graphkit branch [genco-paper-repro](https://github.com/gridfm/gridfm-graphkit/tree/genco-paper-repro).
|
| 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
|
| 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
|
|
@@ -52,7 +52,36 @@ gridfm_graphkit evaluate \
|
|
| 52 |
--batch_size 512
|
| 53 |
```
|
| 54 |
|
| 55 |
-
Repeat for the other grids and seeds. Download each dataset into `data/<network>/raw`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
## Files
|
| 58 |
|
|
|
|
| 15 |
|
| 16 |
## Evaluate
|
| 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
|
|
|
|
| 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 |
+
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. The config still reads splits from `scripts/opfdata/splits/` relative to the repository root.
|
| 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 \
|
| 78 |
+
--data_path data \
|
| 79 |
+
--model_path genco-opfdata/case118_ieee/seed42/best_model_state_dict.pt \
|
| 80 |
+
--normalizer_stats genco-opfdata/case118_ieee/seed42/normalizer_stats.pt \
|
| 81 |
+
--batch_size 512
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
Repeat for the other grids and seeds. On IEEE 14, seed 42, this matched the reproduction-branch evaluation.
|
| 85 |
|
| 86 |
## Files
|
| 87 |
|