Add deterministic batch runtime and harden GFS caching#979
Conversation
Greptile SummaryThis PR adds a
|
| Filename | Overview |
|---|---|
| earth2studio/data/gfs.py | Significant cache hardening with new hash, atomic writes, and loop-safe coalescing. Exception handling in _cache_file_is_valid is too narrow and old-scheme cache files accumulate. |
| earth2studio/batched_workflows.py | New deterministic batch runtime with clean injection points, atomic staging promotion, per-request failure isolation, and correct partial-state rollback. |
| test/data/test_gfs.py | Comprehensive unit tests for all new GFS cache behaviors. |
| test/test_batched_workflows.py | Good coverage of batch runtime resource reuse, failure isolation, and partial-state rollback. |
| docs/superpowers/specs/2026-07-15-gfs-cache-integrity-design.md | Internal design spec committed under docs/; unusual artifact for a public OSS repository. |
| docs/modules/workflows.rst | Sphinx registration for the new batched_workflows module looks correct. |
| CHANGELOG.md | Changelog entries added correctly for both the new batching API and GFS cache fixes. |
Comments Outside Diff (1)
-
docs/superpowers/specs/2026-07-15-gfs-cache-integrity-design.md, line 1-74 (link)Internal design spec committed to the public repo
docs/superpowers/specs/looks like an internal AI-assisted design artifact rather than user-facing documentation. Committing it to a public OSS repo underdocs/may confuse external contributors. If useful as a record of intent, adev/ordocs/dev/directory would be a more appropriate home.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (1): Last reviewed commit: "remove design doc" | Re-trigger Greptile
|
You're right on all three points. Looking at the code:
My original comment assumed GFS downloads could fail during |
Signed-off-by: Kiran Karnam <kkarnam@nvidia.com>
Signed-off-by: Kiran Karnam <kkarnam@nvidia.com>
Consolidating both the write and the rename into a single helper passed to one asyncio.to_thread Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Earth2Studio Pull Request
Description
Adds a deterministic batching API for executing compatible forecast requests sequentially while reusing model and data-source resources. The runtime supports injected model loaders for callers such as PhysicsNeMo-Serve, preserves per request results, continues after individual failures, and publishes successful Zarr outputs atomically.
Also hardens GFS caching by:
Adds unit tests, API documentation, Sphinx registration, and changelog entries.
Checklist
Dependencies