Repository navigation
Remove explicit-null serializers for tail extrapolation - #392
Open
amirabbas-jalali-bentley wants to merge 2 commits into
Open
amirabbas-jalali-bentley wants to merge 2 commits into
amirabbas-jalali-bentley wants to merge 2 commits into
Conversation
The conditioned simulation and simulation report tasks now treat `distribution.tail_extrapolation` and `tail_extrapolation.lower` as optional, so the SDK no longer needs to force explicit nulls for them. Drop the custom model serializers on `TailExtrapolationParams`, `DistributionParams` and `SimulationReportDistribution`. Unset values are now omitted from the request, like every other optional field. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
amirabbas-jalali-bentley
requested review from
BehrangKousha,
aminabedi-bentley,
diegoraf-bsy and
higordearaujo-bsy
October 29, 2026 17:57
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
#354 made the conditioned-simulator and simulation-report payloads always include two keys, sending
nullwhen they were unset:distribution.tail_extrapolationdistribution.tail_extrapolation.lowerBoth tasks used to require these keys to be present. They now treat both as optional, defaulting to
null, so the workaround is no longer needed. This PR removes it, so unset values are left out of the request like every other optional field.Changes
@model_serializer(mode="wrap")overrides fromTailExtrapolationParams,DistributionParamsandSimulationReportDistribution, along with the imports only they used...._sends_nullto..._omits_key.SimulationReportDistribution.tail_extrapolationkeeps theTailExtrapolationParams | Nonetype from #354, so the simulation report still accepts a real tail extrapolation.No breaking changes. Models, fields and defaults are unchanged. The only difference on the wire is that an unset
tail_extrapolationorloweris now left out instead of being sent asnull.Testing
evo-computetests: 517 passed.ruff checkandruff format --checkare clean.Checklist