harbor run -t bespokelabs/causalrivers-heldout-station-graph-aurocharbor download bespokelabs/causalrivers-heldout-station-graph-aurocA river gauge network is a directed graph over discharge measuring stations. An edge i -> j
means water measured at station i flows onward to station j, with no gauged station in
between. Given five years of discharge data from five stations at a time, score how likely each
ordered pair is to be such an edge.
/app/output/predict.py defining a function score_edges(series, freq_minutes) -> numpy.ndarray.series: a C-contiguous float32 array of shape (175296, 5), 15-minute samples from
2019-01-01 00:00 to 2023-12-31 23:45, raw discharge in $m^3/s$.NaN (a few per cent overall, ranging from 0% to 66% for an
individual station). A handful of readings are physically impossible negatives.freq_minutes is the int 15.series is a random permutation of the five stations. No identifier,
coordinate, river name, or other ordering hint is passed.(5, 5) array of real numbers. Entry (i, j) scores the hypothesis "column i is
directly upstream of column j" - higher means more likely.numpy, pandas, scipy, scikit-learn, statsmodels, networkx and torch (CPU build) are installed and importable in both the development and the graded environment. No other packages and no network access are available.
/app/data holds two labelled gauge networks. Their stations are disjoint from each other and
from the graded stations, and each region is gauged by a different set of agencies.
| file | contents |
|---|---|
/app/data/dev_a_series.npy |
float32 (175296, 494), same time axis, units and defects as series |
/app/data/dev_a_edges.csv |
cause,effect - column indices of the 490 true directed edges of region a |
/app/data/dev_b_series.npy |
float32 (175296, 259) |
/app/data/dev_b_edges.csv |
the 200 true directed edges of region b |
/app/dev_data.py has loaders./app/output/predict.py once, then calls score_edges once per sample in that group.
Nothing kept in module state or on disk carries across groups.OMP_NUM_THREADS, MKL_NUM_THREADS,
OPENBLAS_NUM_THREADS and NUMEXPR_NUM_THREADS are all 1 in the graded process, and
torch.set_num_threads(1) is called before your module is imported./app/output is the only artifact that
crosses over, so the solution must be self-contained inside it. Nothing else in this
container - files elsewhere, installed state, anything not under /app/output - is available
when grading runs./app/output is copied to a directory the graded process can read but not write, and its
contents must total at most 50 MB.predict.py can be imported and read normally; that
directory is on sys.path. Symbolic links are not carried across the copy.$TMPDIR, which is empty at the start of every
group.predict.py, a missing or
non-callable score_edges, a group process that dies, or an overrun time budget.(5, 5) matrix with finite off-diagonal entries.