Skip to content

Remote execution path for zonal_anomaly + fix remote remap serialization#72

Merged
rajeeja merged 1 commit into
mainfrom
rajeeja/remote-zonal-anomaly
Jul 13, 2026
Merged

Remote execution path for zonal_anomaly + fix remote remap serialization#72
rajeeja merged 1 commit into
mainfrom
rajeeja/remote-zonal-anomaly

Conversation

@rajeeja

@rajeeja rajeeja commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a remote (HPC) execution path for zonal_anomaly — the last compute
operation that was still local-only — so HPC routing is uniform across the whole
tool surface. Addresses the design item in #66.

Also fixes a latent serialization bug in the remote remapping functions
introduced in #71.

What changed

  • remote_calculate_zonal_anomaly — new self-contained worker function
    returning compact summary statistics (not the full per-face field).
  • calculate_zonal_anomaly — now accepts use_remote / endpoint with the
    standard local-fallback semantics; raises a clear error for remote-only paths
    when the endpoint is unavailable.
  • run_analysis — threads use_remote / endpoint for the zonal_anomaly
    operation.
  • Serialization fix: the remote remap functions (remote_remap_variable,
    remote_regrid_dataset, remote_remap_to_rectilinear) called module-level
    _remote_open_* helpers that do not survive AllCodeStrategies
    serialization, so those remote paths raised NameError on the worker. The
    open logic is now inlined (or defined as inner functions) in each remote
    function, and the dead module helpers removed.
  • docs/tools.md: updated to state that all compute + remapping operations —
    including zonal_anomaly — accept use_remote.

Testing

  • uv run pre-commit run — all hooks pass (ruff, isort, format, mypy).
  • uv run pytest tests/ --ignore=tests/test_remote_agent.py336 passed
    (2 new: remote dispatch + clear-error fallback for zonal_anomaly).
  • Live on Chrysalis:
    • zonal_anomaly remote result is bit-identical to the local result
      (execution_venue: hpc:chrysalis, provenance records remote_uxarray_version).
    • remap_variable remote now works end-to-end (previously broken by the
      serialization bug), result matches local.

Notes

The serialization fix also makes the remote remap paths from #71 functional for
the first time — they had never been exercised live because the endpoint was
offline when #71 merged.

Closes the last local-only compute operation so HPC routing is uniform
across the tool surface (#66).

- remote_calculate_zonal_anomaly: self-contained worker function
- calculate_zonal_anomaly: use_remote/endpoint with local fallback
- frontdoor: thread use_remote/endpoint for the zonal_anomaly op
- fix: inline dataset/grid opening in remote remap functions — the
  shared _remote_open_* module helpers did not survive AllCodeStrategies
  serialization, which had left the remote remap paths non-functional
- docs: tools.md now states all compute + remapping ops accept use_remote
- tests: remote dispatch + clear-error fallback for zonal_anomaly

Verified live on Chrysalis: remote zonal_anomaly and remote remap_variable
return results bit-identical to local.
@rajeeja
rajeeja merged commit 71a51c5 into main Jul 13, 2026
7 checks passed
@rajeeja
rajeeja deleted the rajeeja/remote-zonal-anomaly branch July 13, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant