Repository navigation
Resolve compute references and hydrate task results generically - #408
Draft
amirabbas-jalali-bentley wants to merge 2 commits into
Conversation
Add ReferenceResolver to convert typed geoscience objects, attributes, files, and parameter models into wire references using each task's published schema annotations, with configurable supported_schemas checks. Add TaskResult and ResultNode dict subclasses so output references can be loaded back into typed objects or DataFrames, warn once per unrecognised catalogue annotation in DiscoveryClient, and add payload/behavior parity tests comparing the generic engine against the typed task runners.
This was referenced Nov 14, 2026
amirabbas-jalali-bentley
changed the base branch from
main
to
validate-compute-task-parameters
November 16, 2026 20:11
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.
Description
With discovery (#387), execution (#395), and schema validation (#407) in place,
ComputeClientstill required callers to build wire-level URL strings and JMESPath expressions by hand and returned rawdictpayloads. This PR adds generic input reference resolution and output hydration driven by the task schemas' reference annotations, plus parity suites comparing the generic engine against the existing typed task runners.Changes
ReferenceResolver(evo.compute.resolution, exported fromevo.compute):reference_to: geoscience-object(typedBaseObject,DownloadedObject,ObjectMetadata,ObjectReference, URL, orUUID),reference_to: attribute(typed attribute, JMESPath expression, or bare attribute name placed into the owning object family'sattribute_pathviaattribute_from),reference_to: file(File API URL or handle exposing.url/.metadata.url), andtarget: attribute(create/update specs or typed existing/pending attributes).tasks/common/source_target.pyso generic calls and hand-written runners serialize references identically, and passes already-resolved wire values through unchanged.supported_schemas(check_schemas, defaulting tovalidateand configurable independently onComputeClientor peraruncall), caching metadata lookups per reference and downgrading unloadable objects to a warning.ComputeClient.arun, so deep validation inspects the resolved wire payload.TaskResultandResultNode(evo.compute.outputs, exported fromevo.compute):dictsubclasses that preserve raw dictionary indexing/equality while exposing attribute access andawait node.load()/await node.to_dataframe()onoutput: geoscience-objectandoutput: attributenodes (withattribute_pathcontainer self-healing when a multi-family task writes to a different object family).DiscoveryClient: warns once per unrecognised schema annotation key when a live catalogue moves ahead of the installed SDK, without blocking execution.test_payload_parity.py,test_behavior_parity.py): verify concrete wire-payload and invalid-input parity across declustering, kriging, conditional simulation, and location-wise tasks, pinning intentional differences explicitly.No breaking changes to existing
evo.compute.tasksrunners.ComputeClientruns now returnTaskResult(adictsubclass).Testing
test_resolution.py(42 tests),test_outputs.py(24 tests),test_discovery.py(4 unknown-annotation warning tests),test_payload_parity.py(19 tests), andtest_behavior_parity.py(32 tests).evo-computetests: 722 passed, 1 skipped (132 new).ruff check,ruff format --check, and pre-commit hooks pass.Checklist