Realm

Oa Datasets

Content-addressed dataset packs for OA. Manifests in code, payloads in cache, samples on the GPU.

100 packsRust · Pythonoads v0.5.0
Oa Datasets store at midnight
Oa Datasets

The pack contract

Every loader carries its pack manifest compiled into the binary: name, version, upstream mirrors, exact byte size, and a SHAKE256-256 digest per member, the way tfds keeps checksums in code. Payloads are fetched into the oads cache on first load, verified, and uploaded to oa::Matrix; they are never committed to git.

Fetch

Members download into root/<name>/<version> under OA_DATA_DIR, then ~/.oads, then the platform cache. Downloads resume from *.partial files; a completed partial is verified in place.

Verify

The digest gates publication, so a corrupt or truncated member never reaches the pack directory. A member present at the recorded size is a cache hit.

Decode

Archive members stream through bounded readers instead of full-buffer copies. count-bounded decodes stop the archive walk early.

Load

Loaders implement oa::data::Dataset, so collation, shuffling, and random_split work unchanged. oads produces the data; OA owns the pipeline.

Install and load

The Cargo package is oadsrust, the library namespace is oads, and the Python distribution is oadspython. Both carry the same loader contract: fetch, verify, decode, and upload run in Rust.

Cargo.toml

1[dependencies]
2oadsrust = "0.5"
3
python -m pip install oadspython

Engineless load resolves the calling thread's default engine;*_on variants such as Mnist::load_on(&engine, &config) pin an explicit one.

1use oa::data::collate;
2use oads::{Mnist, MnistConfig};
3
4// Uploads on this thread's default engine (oa::Runtime::current()).
5let dataset = Mnist::load(&MnistConfig::default())?;
6assert_eq!(dataset.images().shape(), &[60_000, 1, 28, 28]);
7
8let batch = collate(&[dataset.get_sample(0)?, dataset.get_sample(1)?])?;
9assert_eq!(batch.x.shape(), &[2, 1, 28, 28]);
10

Detection packs

Voc2007, Voc2012, Kitti, Coco, andWiderFace trade the resident label matrix for a resident [T, 5] box matrix: one [x1, y1, x2, y2, class] F32 row per object plus an [N + 1] offsets vector. Images stay on disk and decode lazily; get_sample(i) returns the[3, H, W] image and a [K, 5] device slice of the shared box storage. Unlabeled splits index with [0, 5] box ranges.

Streaming decode

The corpora are larger than workstation memory by design, so decoders stream archive members rather than materializing them. count-bounded decodes stop the archive walk early.

PackWorkloadBuffered decodeStreaming decode
cfq4.8 GiB memberOOM-killed at ≥9.5 GiB RSS1.0 GiB peak · 262 s
math_dataset~10M rowsthree archive passes8,192 rows in 0.43 s
lm1b1.8 GiB → ~17 GiB F32full materialization OOM100,000 sentences in 0.94 s
xsum226k membersevery member buffered4,096 documents in 1.21 s
trivia_qa438k membersevery member bufferedzero-allocation skips · 137.65 s
November 2026 device tests on Intel Iris Xe with 15 GiB of system RAM. Each time covers the listed workload; limited reads and full archive loads measure different amounts of work. See the benchmark notes in the oads repository.