Skip to content

Fixes to partner_if benchmark, required to pass Frontier Eval quality checks - #5007

Merged
marcromeyn merged 17 commits into
NVIDIA-NeMo:mainfrom
katherineh123:katherine/partner-if-cu-ec2
Oct 28, 2026
Merged

marcromeyn merged 17 commits into
NVIDIA-NeMo:mainfrom
katherineh123:katherine/partner-if-cu-ec2

Conversation

@katherineh123

Copy link
Copy Markdown
Contributor

No description provided.

katherineh123 and others added 3 commits October 23, 2026 13:39
partner_if grows to 25 tasks (dataset 2.1.0). pif_024-026 run OpenCode (opencode_agent) in the row's Scale-SWE
sandbox, and swe_app.py grades their instruction following.

- swe_app.py serves an Environment Server session for opencode_agent. A typed seed starts the row's image, runs
  the row's pre_commands and Scale-SWE's setup, and hands the sandbox to the agent as sandbox_access; a failed
  step stops the sandbox and fails the seed. Close, retire and shutdown stop it; per-session locks; one worker.
  Grading reads the actor's system prompt and tool-description additions from the row's contract (new
  GradingContract fields) and refuses a contract without the prompt. grade_if is split from Scale-SWE's native
  verify, which stays a diagnostic, and VERIFIER_FIXTURE covers full, zero and malformed cases.
- benchmarks/partner_if adds the SWE environment and routes. The policy's sampling (temperature 1.0, top_p 1.0,
  no output cap) is pinned on a copy of the policy model, since opencode_agent refuses request-level sampling.
  The SWE agent inherits only opencode_agent's command deny-list: OpenCode 1.17.11 lets a tools map undo every
  permission denial. The SWE sandbox keeps the cluster's S3 mount out. prepare.py pins 2.1.0 (25 rows).
- configs/swe.yaml follows the same wiring; the READMEs and manifest describe the SWE tasks.

Validation: gym env test --resources-server partner_if (477 passed); the prepare and dispatcher tests (26
passed); gym env validate partner_if --kind benchmark (25 rows); pre-commit; a smoke on OpenSandbox with GLM 5.3
(pif_001 and pif_024-026, one rollout each: 4/4 healthy, 0 masked).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
…ol records

Make partner_if pass Frontier Eval's EC-2 check (gym-p0/v1) without changing Gym core.

- TE-8/TE-9: the grading service calls the judge outside the rollout context. With observability on,
  ServerClient prefixed judge calls made during /verify with the rollout ID, so the model server captured
  them under the rollout with no owning invocation (model_call_ownership_unavailable). Outside the
  rollout context the judge call is forwarded without capture; the row keeps the judge request and reply
  as receipts. NVIDIA-NeMo#4630 adds verifier ownership in core; this can go once it lands.
- TE-5: the dispatcher adds the tool executions in simple_agent's reply trajectory to the episode's agent
  observations. In an agent session simple_agent returns only its invocations at close, so the canonical
  ng_trajectory had no tool records. This is the conversion nemo_user_sim already uses; rollout
  collection joins each record's output from the invocation's conversation.

Validation: partner_if tests 467 passed, dispatcher tests 20 passed, pre-commit clean. A full DFW run
(66 rollouts, GLM 5.3 policy and judge, model-call capture on) passes EC-2: text rows with --no-tools
and tool rows with the default scope both exit 0, TE-1 to TE-9 on every rollout; 279/279 tool calls
have canonical records; health 66/66; pass@1[avg-of-3]/all_if_pass 63.64.

Signed-off-by: Katherine Huang <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since the judge call runs outside the rollout context, it no longer appears in the model-call capture. The
README now says that each row keeps the judge's request and reply in judge_request and judge_response, so
the exit check on the judge's calls reads them there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 23, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working labels Oct 23, 2026
katherineh123 and others added 4 commits October 23, 2026 16:03
…nvalid judge reply

In the 25-task exit checks, 15 of 27 SWE rollouts went unscored: 10 judge inputs exceeded the 1,000,000-character
limit, and 5 judge replies were invalid, all on inputs above 800,000 characters.

- SWE evidence: a tool output longer than 500 characters keeps its first and last 250, with a
  `[… N characters omitted …]` marker between them. Every agent message and tool call stays whole, in order. The
  answer is the agent's final message instead of every message joined, which the trajectory already holds. None of
  the SWE rubrics grades tool output. On the 27 exit-check rollouts the largest judge input goes from 1,464,448 to
  841,649 characters, and the formerly invalid ones from 0.81-1.00M to 0.47-0.59M.
- Judge replies: a reply that fails validation is asked for again once with the same request, and the second reply
  decides. Two invalid replies are masked as judge_unparseable as before. The row keeps the rejected reply with its
  reason in judge_rejected_responses.
- The READMEs say what the judge sees for SWE rows and describe the retry.

Validation: gym env test --resources-server partner_if (483 passed); the dispatcher and prepare tests (27 passed);
pre-commit. Offline, on all 27 SWE rollouts of the three exit-check runs with a stand-in judge: every judge input
fits (largest 841,649), each rollout sends every judged rubric ID in one request, and all 27 are scored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
The exit checks on dataset 2.1.0 (25 tasks) pass with GLM 5.3 as policy and judge: reference
pass@1[avg-of-3]/all_if_pass 61.33, tolerance 8.5 points (95%), from three runs of 75 rollouts (the other two
scored 58.67 and 57.33). It replaces 2.0.0's 62.12, measured on 22 tasks with a 16,384-token cap. The README
also says that an endpoint which ends long requests needs a longer per-request timeout, as the runs set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
@cmunley1

Copy link
Copy Markdown
Contributor

/review

Comment thread benchmarks/partner_if/README.md Resolved
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 7297967

@katherineh123
katherineh123 marked this pull request as ready for review October 24, 2026 00:23
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 24, 2026 00:23
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Oct 24, 2026
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 4bf589d

…rk README

The benchmark's rows are internal. Point readers at the resources server's synthetic
rows, which use the same format and come with recorded rollouts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
@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/40518593559

@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/40521488342

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@marcromeyn

Copy link
Copy Markdown
Contributor

@katherineh123 #5007 was removed from the merge queue: with current main merged in, resources_servers/partner_if/tests/test_swe_evidence.py::test_the_session_lifecycle_meets_gyms_close_contract fails ("a close of session-one that names another episode must get 409, got 200"). It passes on the branch alone (67 commits behind), so a recent main change to session handling likely interacts with swe_app.py's close path. Could you merge main, fix the close handling and push? Both approvals should carry over; I'll re-authorize CI and re-enable auto-merge.

katherineh123 and others added 2 commits October 27, 2026 11:25
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
Main's session contract (NVIDIA-NeMo#4679) refuses, with 409, a close that names another episode after the session
closed, and the mock-tool server already records the closing episode. The SWE server recorded only that a
session closed, so such a close got 200. It now records the episode that closed the session (the seed's
episode when a retired attempt cleared it) and refuses a close for any other. A verify that arrives after the
close is masked as `session_lost`, since the session's sandbox, and with it the patch, is gone.

The contract test now also checks that a close without the cookie releases the sandbox and that the late
verify is masked, and two tests mirror the mock-tool server's: a closed or retired session keeps its episode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Katherine Huang <[email protected]>
@katherineh123
katherineh123 dismissed stale reviews from cmunley1 and yaoyu-33 via d652a97 October 27, 2026 15:31
@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test d652a97

@yaoyu-33 yaoyu-33 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.

Re-approved at d652a97. The SWE close path retains episode ownership, rejects mismatched closes, and masks late verification as session_lost. The regression coverage addresses the merge-queue failure, and unit/server CI passes.

@yaoyu-33 yaoyu-33 added ready-to-merge PR is approved, current, and waiting for final CI or merge and removed waiting-on-customer Waiting on the original author to respond labels Oct 28, 2026
@marcromeyn
marcromeyn added this pull request to the merge queue Oct 28, 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/40710799654

Merged via the queue into NVIDIA-NeMo:main with commit c87647b Oct 28, 2026
54 of 58 checks passed

This branch was previously deployed

1 inactive deployment
public — d652a974 Deployed Oct 28, 2026 by copy-pr-bot[bot] via release / finalize / notify #7789
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 community-request Issue reported or requested by someone from the community ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants