Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
name: string
system: string
simulator: string
network: string
node_kind: string
node_ids: list<item: string>
child 0, item: string
node_type: list<item: string>
child 0, item: string
value: string
native_unit: string
display_unit: string
display_scale: int64
bins_per_hour: int64
bins_per_day: int64
time_axis: string
onset: string
P: int64
R: int64
input_horizon: int64
window: string
intervention: string
param: string
thresholds: struct<active: double, quiet: double, unit: string, rule: string>
child 0, active: double
child 1, quiet: double
child 2, unit: string
child 3, rule: string
split_rule: string
counts: struct<train: struct<pairs: int64, days: int64>, val: struct<pairs: int64, days: int64>, test: struc (... 29 chars omitted)
child 0, train: struct<pairs: int64, days: int64>
child 0, pairs: int64
child 1, days: int64
child 1, val: struct<pairs: int64, days: int64>
child 0, pairs: int64
child 1, days: int64
child 2, test: struct<pairs: int64, days: int64>
child 0, pairs: int64
child 1, days: int64
adjacency: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
directed_edges: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
xy: list<item: list<item: double>>
child 0, item: list<item: double>
child 0, item: double
sources: list<item: struct<name: string, url: string, licence: string>>
child 0, item: struct<name: string, url: string, licence: string>
child 0, name: string
child 1, url: string
child 2, licence: string
to
{'name': Value('string'), 'system': Value('string'), 'simulator': Value('string'), 'network': Value('string'), 'node_kind': Value('string'), 'node_ids': List(Value('string')), 'value': Value('string'), 'native_unit': Value('string'), 'display_unit': Value('string'), 'display_scale': Value('int64'), 'bins_per_hour': Value('int64'), 'bins_per_day': Value('int64'), 'time_axis': Value('string'), 'onset': Value('string'), 'P': Value('int64'), 'R': Value('int64'), 'input_horizon': Value('int64'), 'window': Value('string'), 'intervention': Value('string'), 'param': Value('string'), 'thresholds': {'active': Value('float64'), 'quiet': Value('float64'), 'unit': Value('string'), 'rule': Value('string')}, 'split_rule': Value('string'), 'counts': {'train': {'pairs': Value('int64'), 'days': Value('int64')}, 'val': {'pairs': Value('int64'), 'days': Value('int64')}, 'test': {'pairs': Value('int64'), 'days': Value('int64')}}, 'adjacency': List(List(Value('int64'))), 'directed_edges': List(List(Value('int64'))), 'xy': List(List(Value('float64'))), 'sources': List({'name': Value('string'), 'url': Value('string'), 'licence': Value('string')})}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, 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 274, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, 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 544, 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 3074, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, 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 577, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, 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 373, 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 2394, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2322, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
name: string
system: string
simulator: string
network: string
node_kind: string
node_ids: list<item: string>
child 0, item: string
node_type: list<item: string>
child 0, item: string
value: string
native_unit: string
display_unit: string
display_scale: int64
bins_per_hour: int64
bins_per_day: int64
time_axis: string
onset: string
P: int64
R: int64
input_horizon: int64
window: string
intervention: string
param: string
thresholds: struct<active: double, quiet: double, unit: string, rule: string>
child 0, active: double
child 1, quiet: double
child 2, unit: string
child 3, rule: string
split_rule: string
counts: struct<train: struct<pairs: int64, days: int64>, val: struct<pairs: int64, days: int64>, test: struc (... 29 chars omitted)
child 0, train: struct<pairs: int64, days: int64>
child 0, pairs: int64
child 1, days: int64
child 1, val: struct<pairs: int64, days: int64>
child 0, pairs: int64
child 1, days: int64
child 2, test: struct<pairs: int64, days: int64>
child 0, pairs: int64
child 1, days: int64
adjacency: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
directed_edges: list<item: list<item: int64>>
child 0, item: list<item: int64>
child 0, item: int64
xy: list<item: list<item: double>>
child 0, item: list<item: double>
child 0, item: double
sources: list<item: struct<name: string, url: string, licence: string>>
child 0, item: struct<name: string, url: string, licence: string>
child 0, name: string
child 1, url: string
child 2, licence: string
to
{'name': Value('string'), 'system': Value('string'), 'simulator': Value('string'), 'network': Value('string'), 'node_kind': Value('string'), 'node_ids': List(Value('string')), 'value': Value('string'), 'native_unit': Value('string'), 'display_unit': Value('string'), 'display_scale': Value('int64'), 'bins_per_hour': Value('int64'), 'bins_per_day': Value('int64'), 'time_axis': Value('string'), 'onset': Value('string'), 'P': Value('int64'), 'R': Value('int64'), 'input_horizon': Value('int64'), 'window': Value('string'), 'intervention': Value('string'), 'param': Value('string'), 'thresholds': {'active': Value('float64'), 'quiet': Value('float64'), 'unit': Value('string'), 'rule': Value('string')}, 'split_rule': Value('string'), 'counts': {'train': {'pairs': Value('int64'), 'days': Value('int64')}, 'val': {'pairs': Value('int64'), 'days': Value('int64')}, 'test': {'pairs': Value('int64'), 'days': Value('int64')}}, 'adjacency': List(List(Value('int64'))), 'directed_edges': List(List(Value('int64'))), 'xy': List(List(Value('float64'))), 'sources': List({'name': Value('string'), 'url': Value('string'), 'licence': Value('string')})}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
PairST
PairST is a collection of six simulated spatio-temporal corpora for forecasting the effect of an intervention on a networked system. Every example is a pair: two futures simulated from the same system state, one without and one with a single intervention at one location (holding a traffic signal, disconnecting a power line or closing a water pipe). The difference between the two futures is the response to the intervention as defined by the simulator; it is not an estimate of a real-world causal effect.
The task the corpora were built for is forecasting the intervened future for interventions at locations that never appear in training: days and intervened locations are disjoint across the train, validation and test splits.
Corpora
| Corpus | Domain | Simulator | Network | Nodes | Step | Native unit | Display unit | Pairs train / val / test | Days train / val / test |
|---|---|---|---|---|---|---|---|---|---|
| PairST-T16 | traffic | CityFlow | Hangzhou 4x4 road network and traffic flow from the CoLight repository | 16 intersections | 5 min | vehicles | vehicles | 10,000 / 600 / 1,200 | 125 / 25 / 50 |
| PairST-T196 | traffic | CityFlow | New York 28x7 road network and traffic flow from the CoLight repository | 196 intersections | 5 min | vehicles | vehicles | 10,240 / 512 / 1,024 | 80 / 16 / 32 |
| PairST-P59 | power | Grid2Op | L2RPN environment l2rpn_neurips_2020_track1_small | 59 lines | 5 min | fraction of thermal limit | % | 9,600 / 639 / 704 | 75 / 20 / 22 |
| PairST-P186 | power | Grid2Op | L2RPN environment l2rpn_wcci_2022, solved with lightsim2grid | 186 lines | 5 min | fraction of thermal limit | % | 10,236 / 512 / 1,024 | 80 / 16 / 32 |
| PairST-W119 | water | WNTR (EPANET) | EPANET example network Net3 (as shipped with WNTR) | 119 links | 15 min | m^3/s | L/s | 10,240 / 512 / 1,024 | 80 / 16 / 32 |
| PairST-W40 | water | WNTR (EPANET) | EPANET example network Net2 (as shipped with WNTR) | 40 links | 15 min | m^3/s | L/s | 9,984 / 480 / 960 | 96 / 20 / 40 |
Values are stored in native units. The display unit is the native value times display_scale in network.json
(power: x100, water: x1000); response thresholds are given in native units.
File format
VERSION v1.0.0
checksums/SHA256SUMS sha256 of every other file ("digest path", sorted)
PairST-<NET>/pairs.npz arrays (numpy, no pickled objects)
PairST-<NET>/network.json metadata of the corpus
pairs.npz holds only the pairs that passed the corpus checks. With D days, n pairs, N nodes, T steps per
day array and the window lengths P (steps before the onset) and R (steps from the onset), recorded in
network.json:
| Array | Shape, type | Meaning |
|---|---|---|
base |
(D, T, N) float32 | the no-intervention trajectory of each day |
intervened |
(n, P+R, N) float32 | the intervened future of each pair over base steps [onset - P, onset + R) |
day |
(n,) int64 | row of base the pair starts from |
target |
(n,) int64 | intervened node |
onset |
(n,) int64 | first intervened step, an index on the time axis of base |
duration |
(n,) int64 | intervention length in steps |
param |
(n,) int64 | held signal phase (traffic); 0 otherwise |
split |
(n,) str | train, val or test |
record_id |
(n,) int64 | identifier of the intervention record (location, onset, duration, parameter) |
day_id |
(D,) | identifier of the simulated day (traffic and water: random seed; power: Grid2Op scenario name) |
day_split |
(D,) str | split of the day |
The no-intervention future of pair k is base[day[k], onset[k]-P : onset[k]+R]; the history before a decision
time t is base[day[k], :t]. Before the onset both futures coincide. In the traffic corpora each base row holds
two consecutive days (day 1, then day 2 without the intervention) and every onset lies on day 2.
network.json records the node ids and kind, units, time grid (bins_per_hour, bins_per_day), P, R, the
input horizon used in the paper, the active and quiet response thresholds, the graph (adjacency, directed_edges
as [source, target] node indices, planar layout xy), a description of the intervention, the split rule and the
sources.
Splits
Days and intervened locations are disjoint across train, validation and test: a test pair intervenes on a node that is never intervened on in training or validation, on a day that appears in no other split. Thresholds and any normalization statistics should be computed from the training split only.
Loading
The reference implementation, ActionST, loads these files directly: https://github.com/yutong-xia/ActionST. A minimal example with numpy:
import json, numpy as np
d = "PairST-T16"
z = np.load(f"{d}/pairs.npz")
info = json.load(open(f"{d}/network.json"))
P, R = info["P"], info["R"]
k = int(np.flatnonzero(z["split"] == "train")[0])
day, t0 = z["day"][k], z["onset"][k]
x0 = z["base"][day, t0 - P:t0 + R] # no-intervention future, (P+R, N)
xi = z["intervened"][k] # intervened future, (P+R, N)
response = (xi - x0) * info["display_scale"] # in info["display_unit"]
Sources
How the pairs were generated is described in the paper.
- Traffic: simulated with CityFlow on the Hangzhou 4x4 and New York 28x7 grid road networks and traffic flows from the CoLight repository.
- Power: simulated with Grid2Op on the L2RPN environments
l2rpn_neurips_2020_track1_smallandl2rpn_wcci_2022, the latter solved with lightsim2grid. - Water: simulated with WNTR and its EPANET engine on the EPANET example networks Net3 and Net2 shipped with WNTR.
License
PairST is released under CC BY 4.0.
Citation
PairST and ActionST are described in Action-Conditioned Spatio-Temporal Forecasting.
@article{xia2026actionconditioned,
title = {Action-Conditioned Spatio-Temporal Forecasting},
author = {Xia, Yutong and Liu, Yangyou and Liang, Yuxuan and Wu, Yuankai and Ng, See-Kiong and Zimmermann, Roger},
journal = {arXiv preprint arXiv:2611.27044},
year = {2026}
}
- Downloads last month
- 44