Datasets:
Convert dataset to Parquet (part 00026-of-00027) (#27)
Browse files- Convert dataset to Parquet (part 00026-of-00027) (d290475e6597d0cb655f0d0bd5ee7311a1b08dc1)
- Delete loading script (ffab7c362b7d11ef0bc766e82e038b9185d29cf8)
- Delete data file (9a05d0391a16bd257041e0476b2addc5f9f74355)
- Delete data file (93e2a6e0b339d998582bc768fd2ee95f747379f1)
- Delete data file (4d2d825ac6b33eec124ff279751fd4c0f764de47)
- Delete data file (0703e758088b7d829377494ab8db5ff76fc29489)
- Delete data file (aa6493e7fda7069183bde532ae3891e2891fd944)
- Delete data file (5f0b4fc4923a337eefc3496fa75ace34d1bc9df3)
- Delete data file (70e66b58fc571f6d70345649a697c0512a97a3b5)
- Delete data file (03b0aedaa2a31feb1955b7d8b3cc47f3afdbaf2a)
- Delete data file (356a27d9b8e8375553fb5f6e37b06e5ff59fa4ba)
- Delete data file (ef45bfa458e215363cf4cfd9a782ffe98201a5d6)
- Delete data file (fbcd1eed7fcee92721a7e2dd32de10cfc175e6fa)
- Delete data file (34233a2698ff0a97d90da714e2366b5a0560fc64)
- Delete data file (3ff8104f184bdbd93572f2d10115db69036619d5)
- Delete data file (323e5ee9359af25c247eaa5082bf31e1c8333c90)
- Delete data file (9c81f081da3b0ff3e86de81f8399947531949b7b)
- Delete data file (7712c5c5060a71e11802734e735c143ad95ced20)
- Delete data file (2832f79dd0e8a799cbf2a213ba12e52d5ebdc864)
- Delete data file (6af92b189d0da9d80c7b4fc827f204f735b9b2a5)
- Delete data file (80a9661bf9842ad708b3a3e104aa42050526826c)
- Delete data file (d95bdf21af01c1e7712a82590c742d455b9aa6a9)
- Delete data file (6cee58a90865d3f6bc0dd764e9cb67eae2d29f97)
- Delete data file (b0da02237bf60956085e338a4797b51d2dec7782)
- Delete data file (c1a7868b30bf0699393bc9bad6b857c886f72841)
- Delete data file (ddc7332d97ad95494ffe8329a793620aadd9618d)
- Delete data file (bc00ec5a5bcbf86c86aa41a1522eebce857fc876)
- Delete data file (fdfb7ccb89c99cf5c145603b31093f46324d0d4a)
- Delete data file (089317a0fc667211469905147e12ffa682d33bb4)
- Delete data file (3f4211f6a2421c1f5577b33e2ea990c8d1199e7c)
- Delete data file (c6f3ad6d979c6d3dfe53b7aaea16d19798ccddf5)
- Delete data file (e0431a75d334c2f8169f43ad6d3f66e91eab523a)
- Delete data file (472bd55d395699309e95c79358f93ba749e7d129)
- Delete data file (84b844f16ce336bc3b498c1baadf560076d1eb8a)
- infeasible/ACOPF/meta.h5.gz → 300_ieee/test-00229-of-00268.parquet +2 -2
- case.json.gz → 300_ieee/test-00230-of-00268.parquet +2 -2
- infeasible/DCOPF/meta.h5.gz → 300_ieee/test-00231-of-00268.parquet +2 -2
- infeasible/DCOPF/dual.h5.gz → 300_ieee/test-00232-of-00268.parquet +2 -2
- 300_ieee/test-00233-of-00268.parquet +3 -0
- 300_ieee/test-00234-of-00268.parquet +3 -0
- 300_ieee/test-00235-of-00268.parquet +3 -0
- 300_ieee/test-00236-of-00268.parquet +3 -0
- 300_ieee/test-00237-of-00268.parquet +3 -0
- 300_ieee/test-00238-of-00268.parquet +3 -0
- 300_ieee/test-00239-of-00268.parquet +3 -0
- 300_ieee/test-00240-of-00268.parquet +3 -0
- 300_ieee/test-00241-of-00268.parquet +3 -0
- 300_ieee/test-00242-of-00268.parquet +3 -0
- 300_ieee/test-00243-of-00268.parquet +3 -0
- 300_ieee/test-00244-of-00268.parquet +3 -0
- 300_ieee/test-00245-of-00268.parquet +3 -0
- 300_ieee/test-00246-of-00268.parquet +3 -0
- 300_ieee/test-00247-of-00268.parquet +3 -0
- 300_ieee/test-00248-of-00268.parquet +3 -0
- 300_ieee/test-00249-of-00268.parquet +3 -0
- 300_ieee/test-00250-of-00268.parquet +3 -0
- 300_ieee/test-00251-of-00268.parquet +3 -0
- 300_ieee/test-00252-of-00268.parquet +3 -0
- 300_ieee/test-00253-of-00268.parquet +3 -0
- 300_ieee/test-00254-of-00268.parquet +3 -0
- 300_ieee/test-00255-of-00268.parquet +3 -0
- 300_ieee/test-00256-of-00268.parquet +3 -0
- 300_ieee/test-00257-of-00268.parquet +3 -0
- 300_ieee/test-00258-of-00268.parquet +3 -0
- 300_ieee/test-00259-of-00268.parquet +3 -0
- 300_ieee/test-00260-of-00268.parquet +3 -0
- 300_ieee/test-00261-of-00268.parquet +3 -0
- 300_ieee/test-00262-of-00268.parquet +3 -0
- 300_ieee/test-00263-of-00268.parquet +3 -0
- 300_ieee/test-00264-of-00268.parquet +3 -0
- 300_ieee/test-00265-of-00268.parquet +3 -0
- 300_ieee/test-00266-of-00268.parquet +3 -0
- 300_ieee/test-00267-of-00268.parquet +3 -0
- PGLearn-Small-300_ieee.py +0 -397
- README.md +12 -4
- config.toml +0 -42
- infeasible/ACOPF/dual.h5.gz +0 -3
- infeasible/ACOPF/primal.h5.gz +0 -3
- infeasible/DCOPF/primal.h5.gz +0 -3
- infeasible/SOCOPF/dual.h5.gz +0 -3
- infeasible/SOCOPF/meta.h5.gz +0 -3
- infeasible/SOCOPF/primal.h5.gz +0 -3
- infeasible/input.h5.gz +0 -3
- test/ACOPF/dual.h5.gz +0 -3
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e2a6a6c423abdcfe9559c40aee0ecc39a73410b3f9891f0f4ccd15c76f65472e
|
3 |
+
size 85827308
|
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:08e71d39931f5ab5cf7b3e2c54cb74ded858bb2b1b7a76f7e791c79e1eda5d05
|
3 |
+
size 85801123
|
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ffc6bfd2627f147b0f2357bfa73912ec92fc411390ea8e82644ac351ca5396e3
|
3 |
+
size 85697427
|
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0f0a5857d4e7d481d6a5f76bf2506a1117d28b40b334d89f23c771c021a78e22
|
3 |
+
size 85795958
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8a5b385583b5f4b0281549d8b103af3987874884c2a0ded6a9455246c1e712d2
|
3 |
+
size 85714173
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d48044ef25d140a1c17d08c9175cac239cf7f4c2f393db4e0853894e2f9bf3a3
|
3 |
+
size 85790223
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63eaaf452af6fe71324ccd680e56f3a0c356e532a31166d8e379e9b78f8a69cd
|
3 |
+
size 85809830
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e26d1f11a221d350b5cbdd62ea9437138f0e03eb3f299e7ba642d569ef6075fb
|
3 |
+
size 85903448
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:926a8d5bf0a47fb522b9f6ff59df4a162d1019b05fad4b5ab81f94171b1a3033
|
3 |
+
size 85770444
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f28c4520e3e2896e9b4fadb678e2710bc821845c6ace611f8f40cf969872a8a8
|
3 |
+
size 85859818
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:18569b26a745e2c62e89177528fc4a913c0077514d3f30ba213dcb55443ddb02
|
3 |
+
size 85815408
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54c4728f6a5c273152c58d4424d855b08284a8664400bc03010f5ed74d004de4
|
3 |
+
size 85775216
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:77596a9d44e715b9b30a9db68756534d7a9e403f476e534420bf85e3e5185aff
|
3 |
+
size 85750072
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ff79ccb528c7e6be0ac27febb45e5ed37c591d0113e06445865a15b3415f2cdf
|
3 |
+
size 85760735
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d7f07d5caf428b978a7599baf3c4615a570e539c3ddf64f5ff5645583308fa5b
|
3 |
+
size 85784083
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a6c8b7aa6ef3fe8f066a5d57f69911a119db7b0dd842e6eb55878f56cf6f7a17
|
3 |
+
size 85799772
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d681bc7beb46e094132e68a7377fa56a6502e90fce62e510bda5acbd720541a
|
3 |
+
size 85717763
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:026e9c870303708b47f933da07be09db9e3175fc581dd77490ee468f021d93bd
|
3 |
+
size 85759267
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9edbcff07acdc2cc9e3759dccd3abf9aa8579aa935ae349aaca529f92b5129a2
|
3 |
+
size 85815253
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:89b107612cdf05b815a6152bd9de2f4d9756fb8019148432c2686382b6c5e58d
|
3 |
+
size 85740852
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f4879988aa9f5f2ccf11fc63500a64e6a1b0af73bf5e000a5ced9d2acf2514e0
|
3 |
+
size 85835843
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7efc9f310d38e1cab3b6924d45aba68526c527d9e74953743c1495d4fd0caa3c
|
3 |
+
size 85802463
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b564d0a74097acec7f4f99b18dd21c7ac003a1fbfe27d85afedd22ae6fb6e220
|
3 |
+
size 85827191
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ff29c0ca6e914d4e908cfa97aaf809acbaeba259d5ca3a615b8a7e3f68204c4
|
3 |
+
size 85858453
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:168f7c3d6e91f6fe1a7411bfa618151e19c0e29f02032532a66c616e85802cb7
|
3 |
+
size 85728818
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4337369d59393c309b9a30ae43eabc97867991053c017ff2316507ba52ea9fbe
|
3 |
+
size 85827809
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df4681f8e1d08d1114ff97d29660ca75f745ce2d26c5bcadc6dc01ebde532bbc
|
3 |
+
size 85768088
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:489a12ebd8b6c8ef86c7cb361c90b888d8ec319adec7a66840072d0bab4c012b
|
3 |
+
size 85751691
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:721683a2610aa1e21ebd03dc4f0fd993042ddb2e68093bc35ce0e9ae659a6cba
|
3 |
+
size 85801958
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:726cb4a7a0de851a710983372e34b40bd022f66c1f3bdeccff3fd3fab832cc03
|
3 |
+
size 85816529
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5dbe09bd69b2f9ad4d600aab1fdffc7e5f510db3d52fdf2a0b035cc5af000277
|
3 |
+
size 85808179
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:00e3a521d3375f262944e9331108e70739e7d03120f65ce60f66f3616a6f9970
|
3 |
+
size 85764188
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:778f117c8b977839bcae0f7c1ba51fc0bb9094f778bea9d0ce111e5ed2a00c13
|
3 |
+
size 85863027
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e5ae1e12170e4c7dc81112f0bec1c138519d0aeb6dfacaf78278fdf84c5bfa69
|
3 |
+
size 85790786
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:65f6ceaead9888199bce6c69762b3c262fb78211b9bdc0e17b94aaefdb58527c
|
3 |
+
size 85833204
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c35cee9233471af8871215cfea06454ae7ed78de3570dd56328b11647b855294
|
3 |
+
size 85792856
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:242ac9e0fdf6e7e528ab0932c3d8cf1c9c792b5d9a1b3712c4d15386e4895d38
|
3 |
+
size 85900925
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1f0bff634519c07b3334c690fcf623ede284b258c834f51b17d71b0af577f667
|
3 |
+
size 85792727
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3f105b91f0c6c4a8e3843331047a8b565782705b3b31940ebd61811d98f3b60f
|
3 |
+
size 85785308
|
@@ -1,397 +0,0 @@
|
|
1 |
-
from __future__ import annotations
|
2 |
-
from dataclasses import dataclass
|
3 |
-
from pathlib import Path
|
4 |
-
import json
|
5 |
-
import gzip
|
6 |
-
|
7 |
-
import datasets as hfd
|
8 |
-
import h5py
|
9 |
-
import pyarrow as pa
|
10 |
-
|
11 |
-
# ┌──────────────┐
|
12 |
-
# │ Metadata │
|
13 |
-
# └──────────────┘
|
14 |
-
|
15 |
-
@dataclass
|
16 |
-
class CaseSizes:
|
17 |
-
n_bus: int
|
18 |
-
n_load: int
|
19 |
-
n_gen: int
|
20 |
-
n_branch: int
|
21 |
-
|
22 |
-
CASENAME = "300_ieee"
|
23 |
-
SIZES = CaseSizes(n_bus=300, n_load=201, n_gen=69, n_branch=411)
|
24 |
-
NUM_TRAIN = 745687
|
25 |
-
NUM_TEST = 186422
|
26 |
-
NUM_INFEASIBLE = 67891
|
27 |
-
|
28 |
-
URL = "https://huggingface.co/datasets/PGLearn/PGLearn-Small-300_ieee"
|
29 |
-
DESCRIPTION = """\
|
30 |
-
The 300_ieee PGLearn optimal power flow dataset, part of the PGLearn-Small collection. \
|
31 |
-
"""
|
32 |
-
VERSION = hfd.Version("1.0.0")
|
33 |
-
DEFAULT_CONFIG_DESCRIPTION="""\
|
34 |
-
This configuration contains feasible input, metadata, primal solution, and dual solution data \
|
35 |
-
for the ACOPF, DCOPF, and SOCOPF formulations on the {case} system.
|
36 |
-
"""
|
37 |
-
USE_ML4OPF_WARNING = """
|
38 |
-
================================================================================================
|
39 |
-
Loading PGLearn-Small-300_ieee through the `datasets.load_dataset` function may be slow.
|
40 |
-
|
41 |
-
Consider using ML4OPF to directly convert to `torch.Tensor`; for more info see:
|
42 |
-
https://github.com/AI4OPT/ML4OPF?tab=readme-ov-file#manually-loading-data
|
43 |
-
|
44 |
-
Or, use `huggingface_hub.snapshot_download` and an HDF5 reader; for more info see:
|
45 |
-
https://huggingface.co/datasets/PGLearn/PGLearn-Small-300_ieee#downloading-individual-files
|
46 |
-
================================================================================================
|
47 |
-
"""
|
48 |
-
CITATION = """\
|
49 |
-
@article{klamkinpglearn,
|
50 |
-
title={{PGLearn - An Open-Source Learning Toolkit for Optimal Power Flow}},
|
51 |
-
author={Klamkin, Michael and Tanneau, Mathieu and Van Hentenryck, Pascal},
|
52 |
-
year={2025},
|
53 |
-
}\
|
54 |
-
"""
|
55 |
-
|
56 |
-
IS_COMPRESSED = True
|
57 |
-
|
58 |
-
# ┌──────────────────┐
|
59 |
-
# │ Formulations │
|
60 |
-
# └──────────────────┘
|
61 |
-
|
62 |
-
def acopf_features(sizes: CaseSizes, primal: bool, dual: bool, meta: bool):
|
63 |
-
features = {}
|
64 |
-
if primal: features.update(acopf_primal_features(sizes))
|
65 |
-
if dual: features.update(acopf_dual_features(sizes))
|
66 |
-
if meta: features.update({f"ACOPF/{k}": v for k, v in META_FEATURES.items()})
|
67 |
-
return features
|
68 |
-
|
69 |
-
def dcopf_features(sizes: CaseSizes, primal: bool, dual: bool, meta: bool):
|
70 |
-
features = {}
|
71 |
-
if primal: features.update(dcopf_primal_features(sizes))
|
72 |
-
if dual: features.update(dcopf_dual_features(sizes))
|
73 |
-
if meta: features.update({f"DCOPF/{k}": v for k, v in META_FEATURES.items()})
|
74 |
-
return features
|
75 |
-
|
76 |
-
def socopf_features(sizes: CaseSizes, primal: bool, dual: bool, meta: bool):
|
77 |
-
features = {}
|
78 |
-
if primal: features.update(socopf_primal_features(sizes))
|
79 |
-
if dual: features.update(socopf_dual_features(sizes))
|
80 |
-
if meta: features.update({f"SOCOPF/{k}": v for k, v in META_FEATURES.items()})
|
81 |
-
return features
|
82 |
-
|
83 |
-
FORMULATIONS_TO_FEATURES = {
|
84 |
-
"ACOPF": acopf_features,
|
85 |
-
"DCOPF": dcopf_features,
|
86 |
-
"SOCOPF": socopf_features,
|
87 |
-
}
|
88 |
-
|
89 |
-
# ┌───────────────────┐
|
90 |
-
# │ BuilderConfig │
|
91 |
-
# └───────────────────┘
|
92 |
-
|
93 |
-
class PGLearnSmall300_ieeeConfig(hfd.BuilderConfig):
|
94 |
-
"""BuilderConfig for PGLearn-Small-300_ieee.
|
95 |
-
By default, primal solution data, metadata, input, casejson, are included for the train and test splits.
|
96 |
-
|
97 |
-
To modify the default configuration, pass attributes of this class to `datasets.load_dataset`:
|
98 |
-
|
99 |
-
Attributes:
|
100 |
-
formulations (list[str]): The formulation(s) to include, e.g. ["ACOPF", "DCOPF"]
|
101 |
-
primal (bool, optional): Include primal solution data. Defaults to True.
|
102 |
-
dual (bool, optional): Include dual solution data. Defaults to False.
|
103 |
-
meta (bool, optional): Include metadata. Defaults to True.
|
104 |
-
input (bool, optional): Include input data. Defaults to True.
|
105 |
-
casejson (bool, optional): Include case.json data. Defaults to True.
|
106 |
-
train (bool, optional): Include training samples. Defaults to True.
|
107 |
-
test (bool, optional): Include testing samples. Defaults to True.
|
108 |
-
infeasible (bool, optional): Include infeasible samples. Defaults to False.
|
109 |
-
"""
|
110 |
-
def __init__(self,
|
111 |
-
formulations: list[str],
|
112 |
-
primal: bool=True, dual: bool=False, meta: bool=True, input: bool = True, casejson: bool=True,
|
113 |
-
train: bool=True, test: bool=True, infeasible: bool=False,
|
114 |
-
compressed: bool=IS_COMPRESSED, **kwargs
|
115 |
-
):
|
116 |
-
super(PGLearnSmall300_ieeeConfig, self).__init__(version=VERSION, **kwargs)
|
117 |
-
|
118 |
-
self.case = CASENAME
|
119 |
-
self.formulations = formulations
|
120 |
-
|
121 |
-
self.primal = primal
|
122 |
-
self.dual = dual
|
123 |
-
self.meta = meta
|
124 |
-
self.input = input
|
125 |
-
self.casejson = casejson
|
126 |
-
|
127 |
-
self.train = train
|
128 |
-
self.test = test
|
129 |
-
self.infeasible = infeasible
|
130 |
-
|
131 |
-
self.gz_ext = ".gz" if compressed else ""
|
132 |
-
|
133 |
-
@property
|
134 |
-
def size(self):
|
135 |
-
return SIZES
|
136 |
-
|
137 |
-
@property
|
138 |
-
def features(self):
|
139 |
-
features = {}
|
140 |
-
if self.casejson: features.update(case_features())
|
141 |
-
if self.input: features.update(input_features(SIZES))
|
142 |
-
for formulation in self.formulations:
|
143 |
-
features.update(FORMULATIONS_TO_FEATURES[formulation](SIZES, self.primal, self.dual, self.meta))
|
144 |
-
return hfd.Features(features)
|
145 |
-
|
146 |
-
@property
|
147 |
-
def splits(self):
|
148 |
-
splits: dict[hfd.Split, dict[str, str | int]] = {}
|
149 |
-
if self.train:
|
150 |
-
splits[hfd.Split.TRAIN] = {
|
151 |
-
"name": "train",
|
152 |
-
"num_examples": NUM_TRAIN
|
153 |
-
}
|
154 |
-
if self.test:
|
155 |
-
splits[hfd.Split.TEST] = {
|
156 |
-
"name": "test",
|
157 |
-
"num_examples": NUM_TEST
|
158 |
-
}
|
159 |
-
if self.infeasible:
|
160 |
-
splits[hfd.Split("infeasible")] = {
|
161 |
-
"name": "infeasible",
|
162 |
-
"num_examples": NUM_INFEASIBLE
|
163 |
-
}
|
164 |
-
return splits
|
165 |
-
|
166 |
-
@property
|
167 |
-
def urls(self):
|
168 |
-
urls: dict[str, None | str | list] = {
|
169 |
-
"case": None, "train": [], "test": [], "infeasible": [],
|
170 |
-
}
|
171 |
-
|
172 |
-
if self.casejson: urls["case"] = f"case.json" + self.gz_ext
|
173 |
-
|
174 |
-
split_names = []
|
175 |
-
if self.train: split_names.append("train")
|
176 |
-
if self.test: split_names.append("test")
|
177 |
-
if self.infeasible: split_names.append("infeasible")
|
178 |
-
|
179 |
-
for split in split_names:
|
180 |
-
if self.input: urls[split].append(f"{split}/input.h5" + self.gz_ext)
|
181 |
-
for formulation in self.formulations:
|
182 |
-
if self.primal: urls[split].append(f"{split}/{formulation}/primal.h5" + self.gz_ext)
|
183 |
-
if self.dual: urls[split].append(f"{split}/{formulation}/dual.h5" + self.gz_ext)
|
184 |
-
if self.meta: urls[split].append(f"{split}/{formulation}/meta.h5" + self.gz_ext)
|
185 |
-
return urls
|
186 |
-
|
187 |
-
# ┌────────────────────┐
|
188 |
-
# │ DatasetBuilder │
|
189 |
-
# └────────────────────┘
|
190 |
-
|
191 |
-
class PGLearnSmall300_ieee(hfd.ArrowBasedBuilder):
|
192 |
-
"""DatasetBuilder for PGLearn-Small-300_ieee.
|
193 |
-
The main interface is `datasets.load_dataset` with `trust_remote_code=True`, e.g.
|
194 |
-
|
195 |
-
```python
|
196 |
-
from datasets import load_dataset
|
197 |
-
ds = load_dataset("PGLearn/PGLearn-Small-300_ieee", trust_remote_code=True,
|
198 |
-
# modify the default configuration by passing kwargs
|
199 |
-
formulations=["DCOPF"],
|
200 |
-
dual=False,
|
201 |
-
meta=False,
|
202 |
-
)
|
203 |
-
```
|
204 |
-
"""
|
205 |
-
|
206 |
-
DEFAULT_WRITER_BATCH_SIZE = 10000
|
207 |
-
BUILDER_CONFIG_CLASS = PGLearnSmall300_ieeeConfig
|
208 |
-
DEFAULT_CONFIG_NAME=CASENAME
|
209 |
-
BUILDER_CONFIGS = [
|
210 |
-
PGLearnSmall300_ieeeConfig(
|
211 |
-
name=CASENAME, description=DEFAULT_CONFIG_DESCRIPTION.format(case=CASENAME),
|
212 |
-
formulations=list(FORMULATIONS_TO_FEATURES.keys()),
|
213 |
-
primal=True, dual=True, meta=True, input=True, casejson=True,
|
214 |
-
train=True, test=True, infeasible=False,
|
215 |
-
)
|
216 |
-
]
|
217 |
-
|
218 |
-
def _info(self):
|
219 |
-
return hfd.DatasetInfo(
|
220 |
-
features=self.config.features, splits=self.config.splits,
|
221 |
-
description=DESCRIPTION + self.config.description,
|
222 |
-
homepage=URL, citation=CITATION,
|
223 |
-
)
|
224 |
-
|
225 |
-
def _split_generators(self, dl_manager: hfd.DownloadManager):
|
226 |
-
hfd.logging.get_logger().warning(USE_ML4OPF_WARNING)
|
227 |
-
|
228 |
-
filepaths = dl_manager.download_and_extract(self.config.urls)
|
229 |
-
|
230 |
-
splits: list[hfd.SplitGenerator] = []
|
231 |
-
if self.config.train:
|
232 |
-
splits.append(hfd.SplitGenerator(
|
233 |
-
name=hfd.Split.TRAIN,
|
234 |
-
gen_kwargs=dict(case_file=filepaths["case"], data_files=tuple(filepaths["train"]), n_samples=NUM_TRAIN),
|
235 |
-
))
|
236 |
-
if self.config.test:
|
237 |
-
splits.append(hfd.SplitGenerator(
|
238 |
-
name=hfd.Split.TEST,
|
239 |
-
gen_kwargs=dict(case_file=filepaths["case"], data_files=tuple(filepaths["test"]), n_samples=NUM_TEST),
|
240 |
-
))
|
241 |
-
if self.config.infeasible:
|
242 |
-
splits.append(hfd.SplitGenerator(
|
243 |
-
name=hfd.Split("infeasible"),
|
244 |
-
gen_kwargs=dict(case_file=filepaths["case"], data_files=tuple(filepaths["infeasible"]), n_samples=NUM_INFEASIBLE),
|
245 |
-
))
|
246 |
-
return splits
|
247 |
-
|
248 |
-
def _generate_tables(self, case_file: str | None, data_files: tuple[hfd.utils.track.tracked_str], n_samples: int):
|
249 |
-
case_data: str | None = json.dumps(json.load(open_maybe_gzip(case_file))) if case_file is not None else None
|
250 |
-
|
251 |
-
opened_files = [open_maybe_gzip(file) for file in data_files]
|
252 |
-
data = {'/'.join(Path(df.get_origin()).parts[-2:]).split('.')[0]: h5py.File(of) for of, df in zip(opened_files, data_files)}
|
253 |
-
for k in list(data.keys()):
|
254 |
-
if "/input" in k: data[k.split("/", 1)[1]] = data.pop(k)
|
255 |
-
|
256 |
-
batch_size = self._writer_batch_size or self.DEFAULT_WRITER_BATCH_SIZE
|
257 |
-
for i in range(0, n_samples, batch_size):
|
258 |
-
effective_batch_size = min(batch_size, n_samples - i)
|
259 |
-
|
260 |
-
sample_data = {
|
261 |
-
f"{dk}/{k}":
|
262 |
-
hfd.features.features.numpy_to_pyarrow_listarray(v[i:i + effective_batch_size, ...])
|
263 |
-
for dk, d in data.items() for k, v in d.items() if f"{dk}/{k}" in self.config.features
|
264 |
-
}
|
265 |
-
|
266 |
-
if case_data is not None:
|
267 |
-
sample_data["case/json"] = pa.array([case_data] * effective_batch_size)
|
268 |
-
|
269 |
-
yield i, pa.Table.from_pydict(sample_data)
|
270 |
-
|
271 |
-
for f in opened_files:
|
272 |
-
f.close()
|
273 |
-
|
274 |
-
# ┌──────────────┐
|
275 |
-
# │ Features │
|
276 |
-
# └──────────────┘
|
277 |
-
|
278 |
-
FLOAT_TYPE = "float32"
|
279 |
-
INT_TYPE = "int64"
|
280 |
-
BOOL_TYPE = "bool"
|
281 |
-
STRING_TYPE = "string"
|
282 |
-
|
283 |
-
def case_features():
|
284 |
-
# FIXME: better way to share schema of case data -- need to treat jagged arrays
|
285 |
-
return {
|
286 |
-
"case/json": hfd.Value(STRING_TYPE),
|
287 |
-
}
|
288 |
-
|
289 |
-
META_FEATURES = {
|
290 |
-
"meta/seed": hfd.Value(dtype=INT_TYPE),
|
291 |
-
"meta/formulation": hfd.Value(dtype=STRING_TYPE),
|
292 |
-
"meta/primal_objective_value": hfd.Value(dtype=FLOAT_TYPE),
|
293 |
-
"meta/dual_objective_value": hfd.Value(dtype=FLOAT_TYPE),
|
294 |
-
"meta/primal_status": hfd.Value(dtype=STRING_TYPE),
|
295 |
-
"meta/dual_status": hfd.Value(dtype=STRING_TYPE),
|
296 |
-
"meta/termination_status": hfd.Value(dtype=STRING_TYPE),
|
297 |
-
"meta/build_time": hfd.Value(dtype=FLOAT_TYPE),
|
298 |
-
"meta/extract_time": hfd.Value(dtype=FLOAT_TYPE),
|
299 |
-
"meta/solve_time": hfd.Value(dtype=FLOAT_TYPE),
|
300 |
-
}
|
301 |
-
|
302 |
-
def input_features(sizes: CaseSizes):
|
303 |
-
return {
|
304 |
-
"input/pd": hfd.Sequence(length=sizes.n_load, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
305 |
-
"input/qd": hfd.Sequence(length=sizes.n_load, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
306 |
-
"input/gen_status": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=BOOL_TYPE)),
|
307 |
-
"input/branch_status": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=BOOL_TYPE)),
|
308 |
-
"input/seed": hfd.Value(dtype=INT_TYPE),
|
309 |
-
}
|
310 |
-
|
311 |
-
def acopf_primal_features(sizes: CaseSizes):
|
312 |
-
return {
|
313 |
-
"ACOPF/primal/vm": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
314 |
-
"ACOPF/primal/va": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
315 |
-
"ACOPF/primal/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
316 |
-
"ACOPF/primal/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
317 |
-
"ACOPF/primal/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
318 |
-
"ACOPF/primal/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
319 |
-
"ACOPF/primal/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
320 |
-
"ACOPF/primal/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
321 |
-
}
|
322 |
-
def acopf_dual_features(sizes: CaseSizes):
|
323 |
-
return {
|
324 |
-
"ACOPF/dual/kcl_p": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
325 |
-
"ACOPF/dual/kcl_q": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
326 |
-
"ACOPF/dual/vm": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
327 |
-
"ACOPF/dual/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
328 |
-
"ACOPF/dual/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
329 |
-
"ACOPF/dual/ohm_pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
330 |
-
"ACOPF/dual/ohm_pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
331 |
-
"ACOPF/dual/ohm_qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
332 |
-
"ACOPF/dual/ohm_qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
333 |
-
"ACOPF/dual/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
334 |
-
"ACOPF/dual/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
335 |
-
"ACOPF/dual/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
336 |
-
"ACOPF/dual/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
337 |
-
"ACOPF/dual/va_diff": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
338 |
-
"ACOPF/dual/sm_fr": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
339 |
-
"ACOPF/dual/sm_to": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
340 |
-
"ACOPF/dual/slack_bus": hfd.Value(dtype=FLOAT_TYPE),
|
341 |
-
}
|
342 |
-
def dcopf_primal_features(sizes: CaseSizes):
|
343 |
-
return {
|
344 |
-
"DCOPF/primal/va": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
345 |
-
"DCOPF/primal/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
346 |
-
"DCOPF/primal/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
347 |
-
}
|
348 |
-
def dcopf_dual_features(sizes: CaseSizes):
|
349 |
-
return {
|
350 |
-
"DCOPF/dual/kcl_p": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
351 |
-
"DCOPF/dual/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
352 |
-
"DCOPF/dual/ohm_pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
353 |
-
"DCOPF/dual/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
354 |
-
"DCOPF/dual/va_diff": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
355 |
-
"DCOPF/dual/slack_bus": hfd.Value(dtype=FLOAT_TYPE),
|
356 |
-
}
|
357 |
-
def socopf_primal_features(sizes: CaseSizes):
|
358 |
-
return {
|
359 |
-
"SOCOPF/primal/w": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
360 |
-
"SOCOPF/primal/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
361 |
-
"SOCOPF/primal/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
362 |
-
"SOCOPF/primal/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
363 |
-
"SOCOPF/primal/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
364 |
-
"SOCOPF/primal/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
365 |
-
"SOCOPF/primal/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
366 |
-
"SOCOPF/primal/wr": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
367 |
-
"SOCOPF/primal/wi": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
368 |
-
}
|
369 |
-
def socopf_dual_features(sizes: CaseSizes):
|
370 |
-
return {
|
371 |
-
"SOCOPF/dual/kcl_p": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
372 |
-
"SOCOPF/dual/kcl_q": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
373 |
-
"SOCOPF/dual/w": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
374 |
-
"SOCOPF/dual/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
375 |
-
"SOCOPF/dual/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
376 |
-
"SOCOPF/dual/ohm_pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
377 |
-
"SOCOPF/dual/ohm_pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
378 |
-
"SOCOPF/dual/ohm_qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
379 |
-
"SOCOPF/dual/ohm_qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
380 |
-
"SOCOPF/dual/jabr": hfd.Array2D(shape=(sizes.n_branch, 4), dtype=FLOAT_TYPE),
|
381 |
-
"SOCOPF/dual/sm_fr": hfd.Array2D(shape=(sizes.n_branch, 3), dtype=FLOAT_TYPE),
|
382 |
-
"SOCOPF/dual/sm_to": hfd.Array2D(shape=(sizes.n_branch, 3), dtype=FLOAT_TYPE),
|
383 |
-
"SOCOPF/dual/va_diff": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
384 |
-
"SOCOPF/dual/wr": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
385 |
-
"SOCOPF/dual/wi": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
386 |
-
"SOCOPF/dual/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
387 |
-
"SOCOPF/dual/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
388 |
-
"SOCOPF/dual/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
389 |
-
"SOCOPF/dual/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
390 |
-
}
|
391 |
-
|
392 |
-
# ┌───────────────┐
|
393 |
-
# │ Utilities │
|
394 |
-
# └───────────────┘
|
395 |
-
|
396 |
-
def open_maybe_gzip(path):
|
397 |
-
return gzip.open(path, "rb") if path.endswith(".gz") else open(path, "rb")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -285,11 +285,19 @@ dataset_info:
|
|
285 |
dtype: float32
|
286 |
splits:
|
287 |
- name: train
|
288 |
-
num_bytes:
|
289 |
num_examples: 745687
|
290 |
- name: test
|
291 |
-
num_bytes:
|
292 |
num_examples: 186422
|
293 |
-
download_size:
|
294 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
---
|
|
|
285 |
dtype: float32
|
286 |
splits:
|
287 |
- name: train
|
288 |
+
num_bytes: 535052793334
|
289 |
num_examples: 745687
|
290 |
- name: test
|
291 |
+
num_bytes: 133763377716
|
292 |
num_examples: 186422
|
293 |
+
download_size: 115026052618
|
294 |
+
dataset_size: 668816171050
|
295 |
+
configs:
|
296 |
+
- config_name: 300_ieee
|
297 |
+
data_files:
|
298 |
+
- split: train
|
299 |
+
path: 300_ieee/train-*
|
300 |
+
- split: test
|
301 |
+
path: 300_ieee/test-*
|
302 |
+
default: true
|
303 |
---
|
@@ -1,42 +0,0 @@
|
|
1 |
-
# Name of the reference PGLib case. Must be a valid PGLib case name.
|
2 |
-
pglib_case = "pglib_opf_case300_ieee"
|
3 |
-
floating_point_type = "Float32"
|
4 |
-
|
5 |
-
[sampler]
|
6 |
-
# data sampler options
|
7 |
-
[sampler.load]
|
8 |
-
noise_type = "ScaledUniform"
|
9 |
-
l = 0.60 # Lower bound of base load factor
|
10 |
-
u = 1.00 # Upper bound of base load factor
|
11 |
-
sigma = 0.20 # Relative (multiplicative) noise level.
|
12 |
-
|
13 |
-
|
14 |
-
[OPF]
|
15 |
-
|
16 |
-
[OPF.ACOPF]
|
17 |
-
type = "ACOPF"
|
18 |
-
solver.name = "Ipopt"
|
19 |
-
solver.attributes.tol = 1e-6
|
20 |
-
solver.attributes.linear_solver = "ma27"
|
21 |
-
|
22 |
-
[OPF.DCOPF]
|
23 |
-
# Formulation/solver options
|
24 |
-
type = "DCOPF"
|
25 |
-
solver.name = "HiGHS"
|
26 |
-
|
27 |
-
[OPF.SOCOPF]
|
28 |
-
type = "SOCOPF"
|
29 |
-
solver.name = "Clarabel"
|
30 |
-
# Tight tolerances
|
31 |
-
solver.attributes.tol_gap_abs = 1e-6
|
32 |
-
solver.attributes.tol_gap_rel = 1e-6
|
33 |
-
solver.attributes.tol_feas = 1e-6
|
34 |
-
solver.attributes.tol_infeas_rel = 1e-6
|
35 |
-
solver.attributes.tol_ktratio = 1e-6
|
36 |
-
# Reduced accuracy settings
|
37 |
-
solver.attributes.reduced_tol_gap_abs = 1e-6
|
38 |
-
solver.attributes.reduced_tol_gap_rel = 1e-6
|
39 |
-
solver.attributes.reduced_tol_feas = 1e-6
|
40 |
-
solver.attributes.reduced_tol_infeas_abs = 1e-6
|
41 |
-
solver.attributes.reduced_tol_infeas_rel = 1e-6
|
42 |
-
solver.attributes.reduced_tol_ktratio = 1e-6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e548652d67e1384c5b53b9244135f065f83896e634cf099c86d3f37f05fd2b3d
|
3 |
-
size 1429646070
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:2d59d2f200baa9f5720c51d529b1a1d83b83a6454ff057717ad3e1692817e63b
|
3 |
-
size 585732547
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:1eee7d044a2f15bc00a5c2308abd6eb40eb234307b0069ac8c86e9d28c1bf5af
|
3 |
-
size 157083830
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:961f6d3ad847363e7fb8d6018514addf65936824c9e3cdc09b05004e214daf74
|
3 |
-
size 2459836792
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:d5c9b573232629ca3ca7e1feaa3c51bc1cf452edce284930652e2d88d42bbd9b
|
3 |
-
size 2383229
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:5d1bf2dacdf16ee7d198803b61130609a349ff0b47419fdaaa56d51dbade085e
|
3 |
-
size 351145456
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:0292f4c00ff3d43a3467b1c57043d0d67a6d840a9d4ee3440a96c8eef3ac1c1c
|
3 |
-
size 95476927
|
|
|
|
|
|
|
|
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:a67682e704f7f8e412013c8bab5584b0457d8baab3e9b5673498cbda4f3066d2
|
3 |
-
size 3543859596
|
|
|
|
|
|
|
|