fix(sdk): pin InferenceParams to $shared in stainless config#246
Merged
Conversation
benmccown
force-pushed
the
fix-inference-params-issue/bmccown
branch
from
June 9, 2026 21:41
bf3ea46 to
a9f41a6
Compare
Contributor
|
make update-sdk / make stainless fail on main because the regenerated SDK contains circular imports. Two shared schemas reference types that the mapper homes under feature resources, creating shared -> <resource> -> shared import cycles at SDK load time: 1) InferenceParams: shared/prompt_data references it. PR #228 removed the evaluation resource block from stainless.yaml (including this mapping), so sync-models re-homed it under models: shared/prompt_data -> models/inference_params -> models/__init__ -> model_entity -> shared/prompt_data 2) DatasetMetadataContent: shared/fileset_metadata references it while it was mapped under files: shared/fileset_metadata -> files/dataset_metadata_content -> files/__init__ -> files/fileset -> shared/fileset_metadata The committed SDK only avoided this via a TYPE_CHECKING guard, which the Stainless regen drops, turning it into a real runtime import cycle. Both are genuinely cross-cutting types. Pin them in $shared (alongside PromptData / FilesetMetadata, which already live there) so the generated imports are intra-package (shared -> shared) and acyclic. The *_param variants follow automatically into shared_params. Includes the regenerated SDK from make update-sdk. Verified: - make update-sdk completes end-to-end (stainless + web + cli) - nemo-platform-sdk-tools is-up-to-date passes - the SDK imports with no circular-import error Signed-off-by: Ben McCown <bmccown@nvidia.com>
benmccown
force-pushed
the
fix-inference-params-issue/bmccown
branch
from
June 9, 2026 21:47
a9f41a6 to
025b02b
Compare
benmccown
enabled auto-merge
June 9, 2026 21:51
mikeknep
approved these changes
Jun 9, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 9, 2026
benmccown
enabled auto-merge
June 9, 2026 22:04
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 9, 2026
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.
Summary
Fixes
make update-sdk/make stainless, which are broken onmain. The Stainless regen produced an SDK with circular imports that fails to even import.Root cause
Two cross-cutting schemas were mapped under feature resources, creating
shared → <resource> → sharedimport cycles in the generated SDK:InferenceParams— referenced byshared/prompt_data. PR chore(platform-runner): stop registering legacy evaluator service #228 dropped its stainless mapping, so it got re-homed undermodels:shared/prompt_data → models/inference_params → models/__init__ → model_entity → shared/prompt_dataDatasetMetadataContent— referenced byshared/fileset_metadata, mapped underfiles:shared/fileset_metadata → files/dataset_metadata_content → files/__init__ → files/fileset → shared/fileset_metadata(The committed SDK only hid this with a
TYPE_CHECKINGguard that the regen drops.)Fix
Pin both schemas to
$sharedinsdk/stainless.yaml(wherePromptData/FilesetMetadataalready live). Generated imports become intra-package (shared → shared) and acyclic. The*_paramvariants follow automatically intoshared_params. Includes the regenerated SDK.Verified
make update-sdkcompletes end-to-end (stainless + web + cli)nemo-platform-sdk-tools is-up-to-datepassesBreaking change
Two public import paths move to their correct shared home: