Skip to content

fix(swe_pivot): stub the nemo_gym.server_runtime package the app imports - #5388

Merged
ananthsub merged 1 commit into
mainfrom
ananthsub/fix-swe-pivot-test-stub
Oct 30, 2026
Merged

ananthsub merged 1 commit into
mainfrom
ananthsub/fix-swe-pivot-test-stub

Conversation

@ananthsub

Copy link
Copy Markdown
Contributor

What changed

The swe_pivot verifier tests replace nemo_gym in sys.modules with a stub so they can import app.py without the server stack. The stub now registers its five dummy base classes on a nemo_gym.server_runtime module, where app.py imports them from.

Why

#5214 moved the resources server base classes into nemo_gym/server_runtime/, and app.py now imports them from the nemo_gym.server_runtime package. The stub put the dummy classes only under nemo_gym.server_runtime.base_resources_server, so importing app.py failed during test collection with ModuleNotFoundError: No module named 'nemo_gym.server_runtime'; 'nemo_gym' is not a package. That fails Unit tests / Server suite (shard 1) on main. No other test in the repository stubs nemo_gym this way.

Part of #5166.

Validation

  • The swe_pivot verifier tests pass with the fix, and fail during collection without it, with the error above.
  • pre-commit run on the changed file.

Rollout evidence: N/A. Test setup only; the server's code does not change.

#5214 moved the resources server base classes into nemo_gym.server_runtime,
and app.py now imports them from that package. The verifier tests replace
nemo_gym in sys.modules with a stub, but registered the dummy classes only
under nemo_gym.server_runtime.base_resources_server, so importing app.py
failed during collection and the server suite failed on main.

Register the stub classes on a nemo_gym.server_runtime module, where the
app looks them up.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@ananthsub ananthsub added bug Something isn't working area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Oct 30, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 30, 2026 21:01

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM — no concerns found. The updated test shim supplies all five names imported by app.py. Checked helper-test preservation and per-server pytest subprocess isolation; production verifier behavior is unchanged.

Static review only; tests were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@ananthsub
ananthsub enabled auto-merge October 30, 2026 21:08
@ananthsub
ananthsub disabled auto-merge October 30, 2026 21:08
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Oct 30, 2026
@ananthsub
ananthsub merged commit 988df75 into main Oct 30, 2026
46 of 49 checks passed
@ananthsub
ananthsub deleted the ananthsub/fix-swe-pivot-test-stub branch October 30, 2026 21:21
@cmunley1

Copy link
Copy Markdown
Contributor

/review

This branch was previously deployed

1 inactive deployment
public — ce978631 Deployed Oct 30, 2026 by copy-pr-bot[bot] via release / finalize / notify #8850
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants