Skip to content

fix(scicode): record trajectory and model calls so rollouts are observed - #4468

Merged
wprazuch merged 1 commit into
mainfrom
wprazuch/scicode-observability
Oct 12, 2026
Merged

wprazuch merged 1 commit into
mainfrom
wprazuch/scicode-observability

Conversation

@wprazuch

@wprazuch wprazuch commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What's broken

SciCode rollouts come back "unobserved". The agent makes one model call per sub-step, but it never links those calls to the rollout. So there is no trajectory and no ng_perf, and a health gate that needs observed rollouts cannot pass.

What this does

This carries only the SciCode change from #4239 (original commit by Giulio Lovisotto, cherry-picked unchanged onto current main).

  • Each generated sub-step becomes one trajectory turn that points to its model call (ModelCallRef).
  • The result now carries ng_trajectory, so the collector can build ng_perf (turns, tokens, coverage, latency).
  • Prefilled and skipped sub-steps are not counted as model decisions.
  • It only runs when model-call capture is on and the rollout has an id. Scoring is unchanged.

Testing

  • responses_api_agents/scicode_agent tests, in their own venv: 45 passed. The new test fails on the old code.
  • resources_servers/scicode tests, in their own venv: 19 passed.
  • pre-commit run --all-files: passed.
  • Full SciCode runs (Nano model, 520 rollouts each) on two clusters, on the same code as fix(scicode): enable ng_perf reporting #4239:
    • 520/520 rollouts observed and healthy on both.
    • Scores (problem / sub-step accuracy): 0.106 / 0.407 and 0.127 / 0.422. Before this change: 0.117 / 0.401.

Known limitations (not changed here)

  • Gym now needs Python >= 3.13, which needs scipy>=1.14.1.
  • scipy 1.14 removed scipy.integrate.simps. SciCode test problems 2 and 28 import it, so they always fail now (about 4 of 291 sub-steps).

Signed-off-by: Giulio Lovisotto <[email protected]>
Signed-off-by: Wojciech Prazuch <[email protected]>
@wprazuch

Copy link
Copy Markdown
Contributor Author

/ok to test 611e0ed

@wprazuch
wprazuch enabled auto-merge October 12, 2026 12:21
@wprazuch
wprazuch added this pull request to the merge queue Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38249342430

Merged via the queue into main with commit ed24f83 Oct 12, 2026
43 checks passed
@wprazuch
wprazuch deleted the wprazuch/scicode-observability branch October 12, 2026 12:47

This branch was previously deployed

1 inactive deployment
public — 611e0edc Deployed Oct 12, 2026 by copy-pr-bot[bot] via release / finalize / notify #5025
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.

3 participants