Skip to content

fix(sdk): pin InferenceParams to $shared in stainless config#246

Merged
benmccown merged 2 commits into
mainfrom
fix-inference-params-issue/bmccown
Jun 9, 2026
Merged

fix(sdk): pin InferenceParams to $shared in stainless config#246
benmccown merged 2 commits into
mainfrom
fix-inference-params-issue/bmccown

Conversation

@benmccown

@benmccown benmccown commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes make update-sdk / make stainless, which are broken on main. 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> → shared import cycles in the generated SDK:

  1. InferenceParams — referenced by shared/prompt_data. PR chore(platform-runner): stop registering legacy evaluator service #228 dropped its stainless mapping, so it got re-homed under models:
    shared/prompt_data → models/inference_params → models/__init__ → model_entity → shared/prompt_data

  2. DatasetMetadataContent — referenced by shared/fileset_metadata, mapped under files:
    shared/fileset_metadata → files/dataset_metadata_content → files/__init__ → files/fileset → shared/fileset_metadata
    (The committed SDK only hid this with a TYPE_CHECKING guard that the regen drops.)

Fix

Pin both schemas to $shared in sdk/stainless.yaml (where PromptData / FilesetMetadata already live). Generated imports become intra-package (shared → shared) and acyclic. The *_param variants follow automatically into shared_params. Includes the regenerated SDK.

Verified

  • make update-sdk completes end-to-end (stainless + web + cli)
  • nemo-platform-sdk-tools is-up-to-date passes
  • SDK imports with no circular-import error

Breaking change

Two public import paths move to their correct shared home:

- from nemo_platform.types.evaluation import InferenceParams
- from nemo_platform.types.files import DatasetMetadataContent
+ from nemo_platform.types.shared import InferenceParams, DatasetMetadataContent

@benmccown
benmccown requested review from a team as code owners June 9, 2026 21:36
@benmccown
benmccown requested a review from matthewgrossman June 9, 2026 21:37
@benmccown
benmccown force-pushed the fix-inference-params-issue/bmccown branch from bf3ea46 to a9f41a6 Compare June 9, 2026 21:41
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 19065/25122 75.9% 62.5%
Integration Tests 12030/23810 50.5% 25.7%

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
benmccown force-pushed the fix-inference-params-issue/bmccown branch from a9f41a6 to 025b02b Compare June 9, 2026 21:47
@benmccown benmccown self-assigned this Jun 9, 2026
@benmccown
benmccown enabled auto-merge June 9, 2026 21:51
@benmccown
benmccown added this pull request to the merge queue Jun 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 9, 2026
@benmccown
benmccown enabled auto-merge June 9, 2026 22:04
@benmccown
benmccown added this pull request to the merge queue Jun 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 9, 2026
@benmccown
benmccown added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit 40e5d25 Jun 9, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants