Fix tail extrapolation payloads for conditioned simulation and simulation report - #354
Merged
amirabbas-jalali-bentley merged 2 commits intoSep 24, 2026
Conversation
…tion report The conditioned-simulator and simulation-report tasks require the distribution's tail_extrapolation key, and tail_extrapolation's lower key, even though both accept null. TaskRunner serialises parameters with exclude_none=True, so leaving either unset dropped the key and the task rejected the job. DistributionParams, SimulationReportDistribution and TailExtrapolationParams now always emit those keys, as null when unset. SimulationReportDistribution.tail_extrapolation was typed as None, so a real tail extrapolation could not be supplied at all. It now takes the same TailExtrapolationParams as the conditioned simulator.
Copilot started reviewing on behalf of
amirabbas-jalali-bentley
September 23, 2026 17:08
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The reviewed changes have regression coverage and no unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes serialization of required nullable tail-extrapolation fields for conditioned simulation and simulation-report payloads.
Changes:
- Preserves required
nullkeys during serialization. - Enables tail-extrapolation parameters in simulation reports.
- Adds regression tests and updates generated artifacts.
| File | Description |
|---|---|
uv.lock |
Synchronizes the evo-objects workspace version. |
packages/evo-compute/tests/geostatistics/test_simulation_report_tasks.py |
Tests simulation-report tail serialization. |
packages/evo-compute/tests/geostatistics/test_conditioned_simulator_tasks.py |
Tests nullable and populated tail payloads. |
packages/evo-compute/src/evo/compute/tasks/geostatistics/simulation_report.py |
Adds tail-extrapolation support and null-preserving serialization. |
packages/evo-compute/src/evo/compute/tasks/geostatistics/conditioned_simulator.py |
Preserves required nullable distribution fields. |
mkdocs/site/packages/evo-compute/typed-objects/simulation-report/SimulationReportDistribution.html |
Updates generated API documentation. |
💡 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
fix-tail-extrapolation-payloads
branch
from
September 23, 2026 18:53
41ad744 to
c4c506f
Compare
amirabbas-jalali-bentley
marked this pull request as ready for review
September 23, 2026 18:59
amirabbas-jalali-bentley
requested review from
aminabedi-bentley,
diegoraf-bsy,
higordearaujo-bsy and
jasonatbentley
September 23, 2026 18:59
higordearaujo-bsy
approved these changes
Sep 24, 2026
GriffinBaxterSeequent
approved these changes
Sep 24, 2026
GriffinBaxterSeequent
left a comment
Member
There was a problem hiding this comment.
All good from a evo-python-sdk-maintainers perspective!
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
The conditioned-simulator and simulation-report tasks declare two fields in their
distributionparameter as required but nullable, with no default:distribution.tail_extrapolationdistribution.tail_extrapolation.lowerSo the key has to be present, but
nullis a valid value for it.TaskRunnerserialises parameters withexclude_none=True, so whenever either field was left unset the key was dropped and the task rejected the job:'tail_extrapolation' is a required property'lower' is a required propertyThere was no way around it from the calling side, since passing
Noneexplicitly makes no difference toexclude_none.Changes
DistributionParams,SimulationReportDistributionandTailExtrapolationParamsnow always emit these keys, asnullwhen unset. This is the same@model_serializer(mode="wrap")approachDeclusteringParametersalready uses to keeppower: null. Every other field is still omitted when it'sNone, and no other task is affected.SimulationReportDistribution.tail_extrapolationwas annotated asNone, so a real tail extrapolation couldn't be passed to the simulation report at all. It now takes the sameTailExtrapolationParamsas the conditioned simulator, since both tasks accept the same shape.I considered switching
TaskRunnertoexclude_unset=Trueinstead, but it doesn't help on its own (a field the caller never set is still dropped), and it would stop sending the client-side defaults several tasks rely on, such as the krigingmethodand the conditioned simulator's defaults.No breaking changes. Payloads that were already accepted are unchanged; only the ones that used to be rejected now carry the extra
nullkeys.lowerstays optional.Testing
nulls on the wire for both tasks, check that a reallowerisn't overwritten, and check that the simulation report takes a real tail extrapolation. Four of the five fail without the fix.evo-computetests: 418 passed.ruff checkandruff format --checkare clean.Checklist