Add opt-in Rust OM4 data loader - #800
Draft
jder wants to merge 12 commits into
Draft
Conversation
oa-jder-bot
force-pushed
the
u/jder/rust-loader
branch
5 times, most recently
from
July 17, 2026 19:58
6736b0b to
ffac83a
Compare
This was referenced Jul 20, 2026
Open
oa-jder-bot
force-pushed
the
u/jder/rust-loader
branch
from
July 24, 2026 21:00
17a4673 to
10bb945
Compare
Member
Author
|
Oh, one other thing about this: it's probably worth refreshing the torch docs in repo after this lands to reflect the (new, much smaller) resource requirements and resulting torch flexibility in general (e.g. preemptible compute is much more available with smaller requests) |
fomo-bot
force-pushed
the
codex/canonical-reader-llc
branch
from
August 31, 2026 23:20
2703fcf to
f99a0b4
Compare
alxmrs
force-pushed
the
codex/canonical-reader-llc
branch
2 times, most recently
from
September 1, 2026 22:31
b3d363e to
4399ced
Compare
alxmrs
added a commit
that referenced
this pull request
Sep 1, 2026
## Summary - rebase the canonical-reader refactor needed by #800 onto the LLC support landed in #670 - replace the overlapping `DatasetSpec` / `CanonicalDataset` / `OceanData` abstractions with `DataLayout`, `CanonicalSource`, `BatchPreprocessor`, `HostBatch`, and `ModelBatch` - make the storage-independent reader accept explicit time indices and canonical channel names - push prognostic-versus-boundary selection into read requests instead of maintaining sliced source objects - move OM4-specific canonicalization into `Om4DataSourceConfig.canonicalize_datasets` - make OM4 and LLC canonicalizers derive their channel selections from variable keys and return the resulting `DataLayout` - keep raw source conventions such as LLC staggered masks and OM4 mask names out of `DataLayout` - preserve the grid-geometry, analysis-ready writer output, and training-progress changes currently on `main` This intentionally does not add an LLC Rust loader. It establishes the narrower `CanonicalReader` seam that the Rust loader can implement later without exposing xarray or source-specific naming to the training pipeline. ## Impact Callers now request ordered canonical channels directly. Canonicalization owns source-specific naming, dimension, mask, and variable-selection rules, while `DataLayout` describes only the canonical/model-facing result. This removes repeated variable filtering and normalization wrappers from the hot data-loading path. ## Validation - `uvx pre-commit run --all-files` - `CUDA_VISIBLE_DEVICES='' uv run pytest -q -m 'not manual and not cuda'` - 323 passed, 2 skipped, 10 xfailed --------- Co-authored-by: OA jder bot <jesse+bot@openathena.ai> Co-authored-by: Alexander Merose <alex@openathena.ai>
alxmrs
force-pushed
the
u/jder/rust-loader
branch
from
September 1, 2026 22:57
10bb945 to
f22b414
Compare
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Isolate sampler and DataLoader worker RNGs so loader backends share epoch schedules without consuming process-global randomness.
alxmrs
force-pushed
the
u/jder/rust-loader
branch
from
September 2, 2026 19:05
f22b414 to
5d519f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
data.loading.type: rustpath for flat and compact OM4 Zarr stores behind the newCanonicalDataset/TrainingShardboundaries.Why
The current CPU loader can spend minutes in xarray/Python data-loading cold paths and shows large periodic data-wait stalls during realistic quarter-degree training. The Rust path keeps local Zarr readers open, loads each unique time/channel plane once, reuses pinned host buffers, and overlaps host reads plus CUDA batch preparation with model execution without changing sampler or
dataset_idsemantics.Scope
This is opt-in and local-filesystem only. It supports training and validation for flat OM4 and OM4-compact. S3, LLC-specific canonicalization, inference, derived seasonal-climatology/anomaly channels, and changing heterogeneous batch semantics remain out of scope.
Quarter-degree two-GPU speed check
gr101, batch size 1, gradient accumulation 4, rollout steps[4], boundary varstauuo,tauvo,hfds.14115987; the attempted two-epoch CPU/Rust job was stopped because CPU validation and epoch-2 cold loading would not leave time for the Rust half in the one-hour allocation.14117615, submitted immediately afterward on the same node with the same container andNCCL_P2P_DISABLE=1.This is a 5.4x train-epoch improvement and 139x validation improvement for this one-epoch qdeg run. The non-stall training number is 1.3x faster, so the main win is removing CPU-loader cold loads and periodic stalls rather than changing steady GPU compute.
Validation
libcudart.so.12environment issue.Notes for review
dataset_idsemantics.TorchTrainDatasetcompatibility adapter solely to delete it in the next commit.