Simplify the canonical data loading boundary - #823
Conversation
5c86eff to
e19e931
Compare
e19e931 to
0272d29
Compare
adac072 to
2703fcf
Compare
|
@fomo-bot will you make your best attempt to rebase in the main branch and address all outstanding merge conflicts? |
2703fcf to
f99a0b4
Compare
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
f99a0b4 to
8a39ecb
Compare
|
I fetched Validation completed:
PR #823 is still Debug info
|
|
I have reviewed this change, focusing on the core parts which are data.py and dataset.py. I'm really excited to get it merged. It LGTM. |
|
@codex may I have your review? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a39ecb5a9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex, my agent has attempted to address your concerns from a previous review. Will you please review this PR once again? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3d363ed92
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| for coord in ("time", "lat", "lon"): | ||
| if coord in dataset.coords: | ||
| canonical = canonical.assign_coords({coord: dataset.coords[coord]}) |
There was a problem hiding this comment.
Preserve curvilinear coordinates while expanding levels
When an OM4 source has y/x dimensions with 2-D lat/lon coordinates and grid_type: tripolar, with_lat_lon_coords preserves the real geometry as lat_2d/lon_2d, but this whitelist copies only time, lat, and lon into the new dataset. The resulting CanonicalSource.coordinates() therefore omits the real 2-D coordinates, and the save_zarr path aborts in ZarrWriter._output_coords because tripolar geometry cannot be reconstructed by broadcasting the 1-D axes. Copy the preserved curvilinear coordinates into the canonical dataset.
Useful? React with 👍 / 👎.
b3d363e to
4399ced
Compare
|
@codex, may I have one more review? |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@fomo-bot Do you think this PR is ready to be merged? The GPU CI failures are because we can't request GPUs machines at this time, let's assume they would pass if we could. If you think this is ready, will you approve the PR? |
|
I think this PR is ready to merge under the stated assumption that the GPU jobs would pass if runners could be provisioned. Debug info
|
Summary
DatasetSpec/CanonicalDataset/OceanDataabstractions withDataLayout,CanonicalSource,BatchPreprocessor,HostBatch, andModelBatchOm4DataSourceConfig.canonicalize_datasetsDataLayoutDataLayoutmainThis intentionally does not add an LLC Rust loader. It establishes the narrower
CanonicalReaderseam 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
DataLayoutdescribes 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-filesCUDA_VISIBLE_DEVICES='' uv run pytest -q -m 'not manual and not cuda'