The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type int64 to null
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2951, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 547, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2312, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1861, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2152, in cast_array_to_feature
return array_cast(
array,
...<2 lines>...
allow_decimal_to_str=allow_decimal_to_str,
)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2014, in array_cast
raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}")
TypeError: Couldn't cast array of type int64 to nullNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
P-013 grid contingency screening data (IEEE 57-bus)
This is the generated data for the P-013 project: a graph neural network that ranks every single-branch outage on the IEEE 57-bus grid by how dangerous it looks, while the exact AC power flow solver checks the cases that need checking.
Code: GitHub link to be added.
What the data is
All samples are synthetic. Every one is an AC power flow solved with
pandapower (Newton-Raphson) on the
PGLib-OPF version of the IEEE 57-bus case, pglib_opf_case57_ieee.m
(IEEE PES Power Grid Library, v23.07). The grid has 57 buses and 80
branches (lines and transformers). An operating point is a random load
level and pattern with generation scaled to match. No real operating data
is included.
data/train.npz: 20,000 training samples. One operating point and one random branch outage per sample.data/test_sweep.npz: 250 days (operating points), each with the intact grid plus all 80 single-branch outages solved, so 250 x 81 = 20,250 rows.data/practice/test_sweep.npz: 500 more days in the same format (40,500 rows). No day repeats one in the two files above.eval/cache/*.npz: the model's predictions next to the solver's answers for every day and every outage, so the evaluation can be rerun without running the model again. Each.npzhas a.jsonbeside it saying which sweep file and which weights built it (with SHA-256 of both).predictions.npzandpractice_predictions.npz: built with the main model (the weights in the code repo'smodel/folder).score_model.npzandpractice_score_model.npz: built with a second, retrained model variant from a side experiment. Its weights are not in the code repo; rebuilding these two files needs that model retrained first (see below).
Arrays in each sweep or training file: vm_pu, va_degree (bus voltage
magnitude and angle), loading_percent (branch loading), in_service
(which branches are in), load_p_mw, load_q_mvar, gen_p_mw, status
(solver outcome, for example islanded or no solution), operating_point_id,
operating_point_hash, gen_bus, seconds. Load all files with
numpy.load(path); no pickles are needed.
Download
hf download ABDHAM/p013-grid-contingency-screening-data --repo-type dataset --include "data/*" --include "eval/*" --local-dir .
Run it from the root of the code repo. The files land at the same paths the
code expects (data/... and eval/cache/...). The two --include flags keep
this card from being written over the code repo's own README.
Regenerate it from code instead
Fixed seeds, so the data comes out the same. Each step is slow on a laptop
(on a dual-core laptop, as recorded in each file's seconds array: training
set 24.7 min, 250-day sweep 18.7 min, 500-day sweep 56.1 min); run
them one at a time, from the code repo root, after pip install -e .:
python -m p013.generate
python -m p013.generate --only sweep --test-points 500 --seed 20260916 --out data/practice
python experiments/build_cache.py
python experiments/build_cache.py --sweep data/practice/test_sweep.npz --split practice --out eval/cache/practice_predictions.npz
The first command writes data/train.npz and data/test_sweep.npz, the
second the 500 practice days, the last two the main model's caches.
For the two score_model caches, first retrain the variant model (30
epochs, slow on a CPU), export it, then build its caches:
python experiments/train_score.py --data data/train.npz --epochs 30 --seed 20260911 --out model_score
python -m p013.export_weights --weights model_score/weights.pt --out model_score/weights.npz --hidden 64 --rounds 6
python experiments/build_cache.py --weights model_score/weights.npz --out eval/cache/score_model.npz
python experiments/build_cache.py --weights model_score/weights.npz --sweep data/practice/test_sweep.npz --split practice --out eval/cache/practice_score_model.npz
Files
| File | Size (bytes) | SHA-256 |
|---|---|---|
| data/train.npz | 39,591,787 | 26ddde343af0f71606a74d7c1e11cc64bf75383a71a59c4f34619e8c01f2c00d |
| data/test_sweep.npz | 27,176,458 | 91b0ceb5b3bf7cbeb5bf806fa5314626c12bf0df2977ad1446e5fffe4f85935a |
| data/practice/test_sweep.npz | 54,338,776 | 290ad0f2454194988ec82652898b4525bc831f477092ecfcca76fd6d7b70839f |
| eval/cache/predictions.npz | 24,319,494 | 7e4bfd41445676ef42f8de755fcc68eadfe8c65dd10c05ad4ac4b3d0b8098ada |
| eval/cache/predictions.json | 530 | 250d096fddbe8b8d9937e54f5009d2d94ddd8346a46515abaef175df51c2c567 |
| eval/cache/practice_predictions.npz | 48,630,338 | 0023a30297be55305417bf1bb7ee28d0d0a82081d668013e8751c8216468ab03 |
| eval/cache/practice_predictions.json | 661 | 50b6c51a2b2c831ba41e24920ec6fe8fe0ecc5541ac732c7c09a7c1cbbf10910 |
| eval/cache/score_model.npz | 24,270,466 | 215fb3a4a2092be9b3dc8f0eb3c798434f6bcfd0dfb5937b7366275674a755b9 |
| eval/cache/score_model.json | 536 | 04cbec2cc8f74ba961c04058116282ccd48072b342c55d6b305a22de544b1c02 |
| eval/cache/practice_score_model.npz | 48,523,232 | 523faa451665a021de4884ab90852a8fa8c89d04e32574ac7d2a4c0cbd8d2b13 |
| eval/cache/practice_score_model.json | 666 | f82972b6fab0cf34da63f857a8536b519b52f1d476d475ac2d9067195c123d08 |
To check a download: sha256sum (Linux/macOS) or certutil -hashfile <file> SHA256 (Windows).
Licence
CC BY 4.0. The data is derived from pglib_opf_case57_ieee.m from the IEEE
PES Power Grid Library (PGLib-OPF), which is itself released under CC BY 4.0.
Please credit PGLib-OPF as the source of the grid case, and pandapower
(L. Thurner et al., IEEE Transactions on Power Systems,
doi:10.1109/TPWRS.2018.2829021) as the solver.
- Downloads last month
- 48