Skip to content

fix(scicode): enable ng_perf reporting - #4239

Closed
giuliolovisotto wants to merge 1 commit into
mainfrom
codex/scicode-tau-ng-perf
Closed

giuliolovisotto wants to merge 1 commit into
mainfrom
codex/scicode-tau-ng-perf

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

SciCode retained model-call captures without the invocation references and explicit turns needed by the shared ng_perf builder. Reference each returned sub-step generation so collected rollouts contain token totals, decision counts, coverage and duration. Prefilled and skipped sub-steps do not become model decisions.

This PR now contains only the SciCode portion of the earlier combined change. Tau is a separate PR: #4283. Both build independently on main. Implements part of FEA-450; the ng_perf conformance scenario remains outstanding. FEA-435 time-breakdown work is separate.

Shared collection and aggregation, execution, scoring and model configuration are unchanged. Observability must be enabled. Missing capture matches reduce coverage; unavailable metrics are not fabricated.

Validation on 2bb57959bc0479172243bcdbd990a9801299d089 (base main 8908cb24dccb1d97411f32bc1dee541ad5961dce):

  • PYTHONPATH=.:responses_api_agents/scicode_agent python -m pytest responses_api_agents/scicode_agent/tests/test_app.py -q: 45 passed.
  • uvx pre-commit run --all-files: passed.
  • Fresh live GPT-4.1 two-step smoke through the native SciCode agent, subprocess verifier and production collector: 2 turns, 26 completion tokens, coverage 1.0; both sub-steps passed, reward 1.0. This uses a small crafted task, not SciCode benchmark qualification.
  • Saved ng_perf token totals match captured usage; step counts exclude prefilled work. Regression coverage includes missing captures.

@copy-pr-bot

copy-pr-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@giuliolovisotto giuliolovisotto added the area:agent Agent harnesses and Responses API agent behavior label Oct 8, 2026
Base automatically changed from glovisotto/tau-tool-observations to main October 8, 2026 16:00
@giuliolovisotto
giuliolovisotto force-pushed the codex/scicode-tau-ng-perf branch from fa0b7c6 to 2bb5795 Compare October 9, 2026 09:22
@giuliolovisotto giuliolovisotto changed the title fix(agent): enable SciCode and Tau ng_perf reporting fix(scicode): enable ng_perf reporting Oct 9, 2026
ananthsub pushed a commit to ananthsub/Gym that referenced this pull request Oct 12, 2026
…ved (NVIDIA-NeMo#4468)

## 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 NVIDIA-NeMo#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 NVIDIA-NeMo#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]>
Co-authored-by: Giulio Lovisotto <[email protected]>
@giuliolovisotto

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #4468, which merged the identical SciCode patch (verified with matching stable patch IDs). Tau reporting remains separate in #4283; the controlled ng_perf conformance scenario is separate follow-up work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant