Skip to main content

oads — dataset packs for OA

oads

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

oads keeps versioned dataset manifests — name, version, license, upstream mirrors, byte sizes, and shake256 digests — compiled into the loaders themselves, the way tfds keeps checksums in code. Payloads are fetched from upstream into the oads cache on first load, verified, and uploaded to oa::Matrix; they are never committed to git. The Cargo package is oadsrust; the library and Python import namespace are oads.

Release CI Crates.io PyPI License

Realm · OA · Developer guide

Install

[dependencies]
oadsrust = "0.2"
python -m pip install oadspython

Rust code uses use oads::...; Python uses import oads. Both carry the same loader contract — fetch, verify, decode, and upload run in Rust through oads._native.

A few lines of MNIST

use oa::data::collate;
use oads::{Mnist, MnistConfig};

// Uploads on this thread's default engine (oa::Engine::current()).
let dataset = Mnist::load(&MnistConfig::default())?;
assert_eq!(dataset.images().shape(), &[60_000, 1, 28, 28]);

let batch = collate(&[dataset.get_sample(0)?, dataset.get_sample(1)?])?;
assert_eq!(batch.x.shape(), &[2, 1, 28, 28]);
# Ok::<(), oa::Error>(())
import oads

dataset = oads.Mnist.load()  # engine=None resolves oa.Engine.current()
assert dataset.images.shape == [60000, 1, 28, 28]

x, y = dataset.get_sample(0)
assert x.shape == [1, 28, 28]

Every loader follows the OA engine convention: the engineless load / load_with_progress resolve the calling thread's default engine, and the *_on variants — Mnist::load_on(&engine, &config), Mnist::load_with_progress_on(&engine, &config, &mut cb) — pin an explicit one. Install a default once with oa::Engine::set_default / oa.Engine.set_default and every subsequent load targets it.

Loaders implement oa::data::Dataset, so oa.data collation, shuffling, and random_split work unchanged — oads produces the data; OA owns the pipeline, the same way tfds produces tf.data.Dataset without living inside TensorFlow.

Datasets

A selection of the most-used loaders — the full catalog lives in docs/datasets.md:

Domain Loader Samples Shape Upstream license
image Mnist 60,000 train / 10,000 test [N, 1, 28, 28] F32 CC BY-SA 3.0
image FashionMnist 60,000 train / 10,000 test [N, 1, 28, 28] F32 MIT
image Cifar10 50,000 train / 10,000 test [N, 3, 32, 32] F32 NCHW unspecified
image Cifar100 50,000 train / 10,000 test [N, 3, 32, 32] F32 NCHW unspecified
audio SpeechCommands 84,843 train / 9,981 validation / 11,005 test [N, 1, 16000] F32 PCM CC BY 4.0
text Imdb 25,000 train / 25,000 test [N, 512] F32 byte windows unspecified
text AgNews 120,000 train / 7,600 test [N, 512] F32 byte windows unspecified
text YelpPolarity 560,000 train / 38,000 test [N, 512] F32 byte windows unspecified
text TinyShakespeare 1,115,394 bytes [seq_len] token windows public domain
video MovingMnist 10,000 sequences [T, 1, 64, 64] per sample CC BY-SA 3.0 (mnist derivative)

Also in the catalog: KMnist, Emnist (six variants), Stl10, MiniSpeechCommands, Groove, LjSpeech, CremaD, Vctk, Maestro (note events, non-commercial license), Iris, Titanic, Movielens100k, and Movielens1m.

Images and labels are F32 — oa::matrix::slice is F32-only — with pixels scaled into [0, 1] unless normalize=false. MovingMnist stores frames flat as [N*T, 1, 64, 64] and returns input/target sequences shifted one frame apart for next-frame prediction; TinyShakespeare returns byte-token windows and the window shifted one byte ahead. Maestro stores one [E, 3] (pitch, step, duration) event matrix and returns fixed [seq_len, 3] device slices paired with the one-event-shifted target — the next-event prediction contract.

Pack transport

Every manifest member records its exact byte size, SHAKE256-256 digest, and mirror list. ensure_pack materializes root/<name>/<version> under the cache root — OA_DATA_DIR, then ~/.oads, then the platform cache:

  • A member present at the recorded size is a cache hit; nothing is rehashed or refetched.
  • Downloads write *.partial members and resume from the recorded byte length (curl -C -), so an interrupted fetch continues where it stopped. A completed-but-unpublished partial is verified in place.
  • Progress flows to a callback — oads::TerminalProgress renders the bar, percentage, byte counts, speed, elapsed, and ETA in Rust; oads._progress.FetchProgress renders the same line in Python and is the default on load(progress=...).
  • A callback abort keeps the partial; the digest gates publication, so a corrupt or truncated member never reaches the pack directory.

Repository layout

src/rs/    oadsrust crate — pack transport and typed loaders by domain
src/py/    oads-python pyo3 crate (oads._native) + thin oads package
test/rs/   host pack tests and Vulkan-gated loader tests, same domains
test/py/   pytest mirrors of the loader contracts
license/   upstream dataset license texts and provenance

Verification

cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --test pack                            # host pack tests
cargo test --test image|text|video -- --ignored   # Vulkan device loaders
python3 -m pytest test/py                         # Python mirrors

Device tests fetch packs once into the cache and exercise the real upload, slice, and collate path; host tests cover digest verification, resume, cancellation, and progress without a device.

License

The repository is MIT-licensed; see LICENSE. Each dataset carries its own upstream license — recorded in the manifest and carried in license/ — and the loader design is adapted from tensorflow/datasets (Apache-2.0), credited in the same index.

Realm ASCII identity

Metadata

Release files for oadspython 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for oadspython 0.3.0
File Interpreter ABI Platform Actions
oadspython-0.3.0-cp310-abi3-manylinux_2_39_x86_64.whl CPython 3.10 abi3 Linux glibc 2.39+ x86-64 Details for oadspython-0.3.0-cp310-abi3-manylinux_2_39_x86_64.whl

Release files / oadspython-0.3.0-cp310-abi3-manylinux_2_39_x86_64.whl

Download URL oadspython-0.3.0-cp310-abi3-manylinux_2_39_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
6dfa9f6def219a2a562bf3dc33de627d80f5641fd9718a01208e67f00c4dcae9
BLAKE2b-256 checksum
How to use checksums
4db127f9e82b74f7bfe767738cdf3cfad4a0259452f2f1ed8890efae38d506c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for oadspython 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for oadspython-0.3.0-cp310-abi3-manylinux_2_39_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page