Add kriging diagnostic outputs to the task SDK client - #348
Open
amirabbas-jalali-bentley wants to merge 2 commits into
Open
Add kriging diagnostic outputs to the task SDK client#348amirabbas-jalali-bentley wants to merge 2 commits into
amirabbas-jalali-bentley wants to merge 2 commits into
Conversation
amirabbas-jalali-bentley
force-pushed
the
add-kriging-diagnostic-outputs
branch
from
September 9, 2026 16:05
e56c503 to
65544d3
Compare
Copilot started reviewing on behalf of
amirabbas-jalali-bentley
September 9, 2026 16:07
View session
There was a problem hiding this comment.
🟡 Changes recommended
Output collisions and cross-object attributes are not validated, and generated documentation links target missing pages.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds typed kriging diagnostic outputs to the compute SDK, including request serialization, result parsing, tests, and examples.
Changes:
- Adds diagnostic selectors, recommended names, and target serialization.
- Exposes returned diagnostic attributes through kriging results.
- Updates exports, tests, notebooks, generated documentation, and dependencies.
File summaries
| File | Description |
|---|---|
uv.lock |
Updates evo-blockmodels lock version. |
packages/evo-compute/tests/test_tasks.py |
Uses the specialized kriging target result. |
packages/evo-compute/tests/geostatistics/test_kriging_tasks.py |
Tests diagnostic inputs, serialization, and results. |
packages/evo-compute/src/evo/compute/tasks/geostatistics/kriging.py |
Implements diagnostic request and result models. |
packages/evo-compute/src/evo/compute/tasks/geostatistics/__init__.py |
Exports KrigingDiagnostics. |
packages/evo-compute/src/evo/compute/tasks/common/source_target.py |
Extracts typed attribute conversion. |
packages/evo-compute/src/evo/compute/tasks/common/__init__.py |
Exports attribute_spec. |
packages/evo-compute/src/evo/compute/tasks/__init__.py |
Adds the top-level diagnostics export. |
packages/evo-compute/docs/examples/kriging.ipynb |
Demonstrates requesting diagnostics. |
mkdocs/site/packages/evo-files/index.html |
Updates generated previous-page navigation. |
mkdocs/site/packages/evo-compute/typed-objects/source-target/UpdateAttribute.html |
Updates generated next-page navigation. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/SimpleKriging.html |
Updates generated navigation. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/OrdinaryKriging.html |
Updates generated navigation. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/KrigingRunner.html |
Updates generated navigation. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/KrigingResultModel.html |
Documents the specialized target result. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/KrigingResult.html |
Documents result diagnostics. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/KrigingParameters.html |
Documents diagnostic parameters. |
mkdocs/site/packages/evo-compute/typed-objects/kriging/KrigingMethod.html |
Updates generated navigation. |
code-samples/geoscience-objects/running-kriging-compute/running-kriging-compute.ipynb |
Extends the walkthrough with diagnostics. |
code-samples/geoscience-objects/running-kriging-compute/README.md |
Lists diagnostics in the walkthrough scope. |
Review details
Suppressed comments (1)
mkdocs/site/packages/evo-compute/typed-objects/kriging/OrdinaryKriging.html:42
RECOMMENDED_DIAGNOSTIC_NAMES.htmlis absent from the checked-in kriging API directory, making this Next link a 404. Regenerate and commit the missing API page.
<a rel="next" href="RECOMMENDED_DIAGNOSTIC_NAMES.html" class="nav-link">
- Files reviewed: 19/20 changed files
- Comments generated: 8
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
amirabbas-jalali-bentley
force-pushed
the
add-kriging-diagnostic-outputs
branch
from
September 9, 2026 17:34
65544d3 to
4e6f6b6
Compare
- Expose the `target.diagnostics` structure of the kriging task, so the 16 optional per-location diagnostics can be requested through the SDK. - `KrigingParameters.diagnostics` takes a `KrigingDiagnostics` and is folded into `target.diagnostics` on the wire, matching how the source and target filters are already handled. Each diagnostic accepts `True` for the recommended attribute name, a string for a custom name, a typed attribute to update an existing one, or an explicit create/update specification. - The result now parses `target.diagnostics`, so `KrigingResult.diagnostics` reports the definitive name and reference of every attribute that was written.
amirabbas-jalali-bentley
force-pushed
the
add-kriging-diagnostic-outputs
branch
from
September 9, 2026 17:41
4e6f6b6 to
c33ef0c
Compare
amirabbas-jalali-bentley
marked this pull request as ready for review
September 9, 2026 17:45
amirabbas-jalali-bentley
requested review from
BehrangKousha,
aminabedi-bentley,
diegoraf-bsy and
higordearaujo-bsy
September 9, 2026 17:45
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
Adds support for the kriging task's diagnostic outputs to the
evo-computeSDK client.The kriging task can write per-location diagnostics onto the target object alongside the estimate — kriging variance, slope of regression, sample counts, search distances, and so on. These live under
target.diagnosticsin the task schema, and were previously not reachable through the SDK.Parameters
KrigingParametersgains adiagnosticsfield taking aKrigingDiagnostics. It is folded intotarget.diagnosticsby the existing model serializer, the same waysource_filterandtarget_filterare already folded intosource.filter/target.filter— so callers keep passing a typed attribute (or aTarget) fortargetand do not have to hand-build the nested object.Every diagnostic accepts:
True— create an attribute using the recommended name (RECOMMENDED_DIAGNOSTIC_NAMES, e.g.KV,SoR,NS)CreateAttribute/UpdateAttributeThe recommended names match the conventions used elsewhere in the product so results are familiar once imported. They are the schema's suggested names rather than server-side defaults, so the SDK always sends an explicit attribute name.
Validation
Two rules the task enforces server-side are checked before the payload is built, so mistakes surface as a
ValidationErroronKrigingParametersrather than a failed job:target.attribute. Create names and update references are compared separately, since they are distinct namespaces.target.object— so an attribute taken from a different object would silently resolve to nothing, or to the wrong attribute. The originating object is now remembered during validation and compared with the target, ignoring any?version=suffix. Attributes that carry no parent object cannot be checked and are left alone.Results
The task returns every diagnostic key, with
nullfor the ones that were not requested. NewKrigingDiagnosticsResultandKrigingTargetResultmodels parse that, andKrigingResult.diagnosticsexposes only the diagnostics that were actually written, keyed by diagnostic name:They are also listed in the result summary. Because diagnostics are written onto the target object,
result.to_dataframe()returns them alongside the estimate.Other changes
attribute_spec()factored out of_validate_target_attributeintasks/common/source_target.pyand shared, so a diagnostic accepts the same typed attributes as a target does.KrigingDiagnosticsexported fromevo.compute.tasksandevo.compute.tasks.geostatistics.tests/test_tasks.pyfixtures build aKrigingTargetResultinstead of a bareTaskTarget, following the retypedKrigingResultModel.target.Backwards compatibility
No breaking change to the SDK's public surface —
diagnosticsis optional and defaults toNone, so existing kriging calls produce an identical payload.Testing
uv run --package evo-compute pytest packages/evo-compute/tests— 440 passed (27 new tests covering the accepted shorthands, the serialized payload, the parsed result, and the two validation rules).ruff checkandruff format --checkclean across the repository.jsonschema(Draft 2020-12) — no errors on either side.Documentation
packages/evo-compute/docs/examples/kriging.ipynb— new "Request Diagnostics" section.code-samples/geoscience-objects/running-kriging-compute/— the walkthrough now requests diagnostics, prints the attributes that were written, and includes them in the results DataFrame; the markdown documents the shorthands and lists all 16 diagnostics with their recommended names.The generated API reference under
mkdocs/is left to the documentation workflow.Checklist