Post-toolregistry follow-ups: uxarray 2026.6.0, new ops, science workflows#65
Post-toolregistry follow-ups: uxarray 2026.6.0, new ops, science workflows#65rajeeja wants to merge 4 commits into
Conversation
|
HPC end-to-end tested on the Improv endpoint ( Noted that the two new operations ( |
|
The HPC option is only possible if the user has an account on that HPC system, right? |
|
Ran a full old+new function matrix on the Improv endpoint - 9/9 checks pass: Old functions (remote, New features: The run surfaced a real bug: the remote gradient/curl path was dropping Timing: warm round-trips ~1–7s; cold worker re-spin ~3–4 min (PBS provisioning). |
|
@rljacob requesting your review when you have a moment. Quick orientation: What this does (post-#63 follow-ups):
Verification: 323 tests pass, CI green, and validated end-to-end on the Improv endpoint (real MPAS data; the HPC run caught and fixed a Two judgment calls worth your eye:
|
Right; the HPC option only kicks in once you've set up a Globus Compute endpoint on that system, which requires an account/allocation there to run it. Without a configured endpoint, everything just runs locally with the same tools. |
…flows Dependencies - Bump uxarray floor to >=2026.6.0; regenerate uv.lock (drops fastmcp, pulls toolregistry). New UXarray-backed operations (run_analysis) - zonal_anomaly: per-face deviation from each latitude band's zonal mean. - remap_to_rectilinear: remap an unstructured variable onto a regular lon/lat grid. - gradient/curl gain a scale_by_radius flag (default False preserves the unit-sphere result; True divides by uxgrid.sphere_radius). Guided science workflows (prompt/ tools) - cyclone_structure, eddy_activity, model_evaluation, climatology_anomaly, joining the existing vorticity_analysis workflow. Each composes existing operations around a scientific question and returns an interpretation plan. Docs - Fix stale architecture.html labels (toolregistry, Python 3.12). - CHANGELOG 0.2.0 + 0.1.1 backfill + Unreleased entries. - New docs/serving.md (profiles, transports, OpenAPI/REST, discovery). - tools.md operations table, science-workflow prompts, AGENTS.md counts. Policy tags - Add FILE_SYSTEM to session tools and FILE_SYSTEM+NETWORK to get_execution_mode; fix a stale FastMCP RuntimeError message. Tests - New test_new_uxarray_features.py; workflow-prompt and policy-tag tests; update deferred/prompt counts. Full suite passes (322).
These two operations have no remote (Globus Compute) execution path yet, so they cannot run on HPC-resident files. Note the limitation in the tools reference; uniform HPC routing is tracked as a design item.
The local gradient/curl path passed scale_by_radius through, but the remote dispatch dropped it, so use_remote=True silently ran on the unit sphere while provenance could imply otherwise. Thread scale_by_radius through the agent methods and remote compute functions, applied capability-safely (the worker may run an older UXarray): the result now reports the scale_by_radius actually applied. Add a test that locks in the remote threading. Verified on the Improv endpoint: with an older worker UXarray the remote result correctly reports scale_by_radius=False (fallback), and the full old+new operation matrix passes (9/9).
Make explicit that everything runs locally by default and the remote option only becomes available once a Globus Compute endpoint is configured; running one needs an HPC account/allocation, while a shared/service-account endpoint can accept authorized submitters without their own login. Addresses a reviewer question.
30fe0eb to
f28bb54
Compare
Summary
Follow-up work after the toolregistry-server port (#63). Three themes: refresh
the UXarray dependency to the latest release, expose new UXarray operations, and
grow the guided science-workflow surface beyond the single
vorticity_analysishelper.
No breaking changes to existing tool behavior. The full suite passes (322
tests); pre-commit (ruff + mypy) is clean;
uv lock --checkis consistent.Dependencies
uxarrayfloor to>=2026.6.0(released 2026-06-18) and regenerateuv.lock. The lock now reflects the toolregistry stack (fastmcp fully gone).New
run_analysisoperationszonal_anomaly— per-face deviation from the zonal mean of each latitudeband (
UxDataArray.zonal_anomaly). Natural sibling tocalculate_zonal_mean.remap_to_rectilinear— remap an unstructured variable onto a regularlon/lat grid (
UxDataArray.remap.to_rectilinear).gradient/curlgainscale_by_radius— defaults toFalsetopreserve the historical unit-sphere result; set
Trueto divide byuxgrid.sphere_radiusfor physical units. (UXarray 2026.6.0 changed its owndefault to
True; keepingFalsehere avoids a silent change to existingresults.)
Guided science workflows (
prompt/tools)Previously
vorticity_analysiswas the only domain-science guided workflow.Added four more, each composing existing operations around a scientific question
and returning an interpretation plan (instruction text, no new computation):
cyclone_structure— storm/vortex radial structure (azimuthal_mean+subset_bbox, optionallycurl).eddy_activity— departures from the zonal mean (calculate_zonal_mean+zonal_anomaly+gradient).model_evaluation— verification vs a reference (bias+rmse+pattern_correlation).climatology_anomaly— time-mean state and anomalies (temporal_mean+anomaly, optionallycalculate_zonal_mean).Profiles:
core27 → 31,deferred-full58 → 64.Policy tags
FILE_SYSTEMto the session tools (they persist/read JSON records) andFILE_SYSTEM+NETWORKtoget_execution_mode(reads config; queries theendpoint when configured).
RuntimeErrormessage that referenced the removed FastMCPmcp.tool()registration.Docs
docs/architecture.htmllabels (toolregistry, Python 3.12).CHANGELOG.md:0.2.0section, backfill0.1.1, newUnreleasedentries.docs/serving.md(profiles, transports, OpenAPI/REST, tool discovery,no-AI-client usage).
docs/tools.mdoperations table + science-workflow prompts;AGENTS.mdcounts.Tests
tests/test_new_uxarray_features.pycoveringscale_by_radius,zonal_anomaly, andremap_to_rectilinear(incl. a capability-guard negativetest).
counts.
The 8 warnings are a benign
scale_by_radiusUserWarning from UXarray'sdivergence(which callsgradientinternally) on test grids without asphere_radius; results correctly stay on the unit sphere.Notes
(
>=2026.6.0); defensive capability guards remain so a clear error is raisedif a method is ever absent.
not touch the conda recipe.