Skip to content

fix: decouple GDPVal and Stirrup - #4178

Merged
oyilmaz-nvidia merged 68 commits into
mainfrom
martas/gdpval-decoupling
Oct 19, 2026
Merged

oyilmaz-nvidia merged 68 commits into
mainfrom
martas/gdpval-decoupling

Conversation

@marta-sd

@marta-sd marta-sd commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Decouples GDPVal from Stirrup so each can be paired with other Gym components. The GDPVal resources server now owns the task sandbox, the task tools (finish, abandon_task_finish, web_search, fetch_web_page), the deliverables and their judging. Stirrup is a plain session agent that runs inside a sandbox it is lent, with the task tools and prompt taken from the request. The same GDPVal tasks can then run with another harness, and Stirrup can run other tasks. Everything is wired through single_agent_turn_legacy.

Validation

  • Unit tests for resources_servers/gdpval, responses_api_agents/stirrup_agent and tests/unit_tests/test_rollout_collection.py pass.
  • Parity run of the certified Super 3.5 recipe on the decoupled stack (OpenSandbox, x86_64).

Rollouts

Final normalized ELO 0.0857, against 0.0866 for the certified run. The run-to-run sd across the 7 certificates is 0.015. 216/220 final-stage tasks were scored (certified: 212).

Compatibility and benchmark impact

Deviations from the certified setup:

  • Sandbox: OpenSandbox replaces Apptainer. Commands inherit the sandbox's environment and limits (nproc, ulimits), and find / can hit the 300 s command limit. Wall time was 2h34m, against 1h30m for the certified run.
  • Stirrup runs only in agent sessions behind an environment server. Its /run and the Ray path are gone.
  • Tavily: TAVILY_API_KEY is required. The fallback to Stirrup's built-in web tools is gone.
  • Reference files: one that cannot be downloaded fails the episode. Before, it was dropped from the prompt. The listing is sorted (39 of 220 prompts change order).
  • Failures:
    • An agent timeout is a masked agent_timeout failure and is retried.
    • A crash in the agent stage is not retried or waived.
    • Invalid judgements are judge_failed (was judge_invalid).
    • retry_invalid_judge_responses is removed from core.
  • Limits: the environment server sets a 18000 s episode deadline and 32 concurrent episodes.
  • Repeat index: it comes from the rollout id, which must be <int>-<int>.

Prepared data must be regenerated, and old outputs should not be resumed. The old mode options now error; replacements are in the README's migration section.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass).
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 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.

marta-sd and others added 29 commits October 13, 2026 11:43
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
…om input

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
…ble episodes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
…-judge contract from core

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
…unning the policy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Marta Stepniewska-Dziubinska <[email protected]>
@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor

/ok to merge 1da71e7

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

Merged via the queue into main with commit 6d1f5d7 Oct 19, 2026
49 of 54 checks passed
@oyilmaz-nvidia
oyilmaz-nvidia deleted the martas/gdpval-decoupling branch October 19, 2026 17:22
yuhezhang-ai added a commit that referenced this pull request Oct 19, 2026
Rebase the final #3302 implementation onto main after #4029 and #4178. Preserve cancellation and timing cleanup, remove retired Stirrup migration paths, forward GDPVal retry progress, and allow selected-source judge recovery into separate output. Verify saved rewards reach the live counter exactly once.

Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai added a commit that referenced this pull request Oct 19, 2026
Rebase the final #3302 implementation onto main after #4029 and #4178. Preserve cancellation and timing cleanup, remove retired Stirrup migration paths, forward GDPVal retry progress, and allow selected-source judge recovery into separate output. Verify saved rewards reach the live counter exactly once.

Signed-off-by: Yuhe Zhang <[email protected]>
mikemikimike pushed a commit to mikemikimike/Gym that referenced this pull request Oct 31, 2026
…A-NeMo#3302)

* feat(eval): persist outcomes and resume unfinished evaluations

Rebase the final NVIDIA-NeMo#3302 implementation onto main after NVIDIA-NeMo#4029 and NVIDIA-NeMo#4178. Preserve cancellation and timing cleanup, remove retired Stirrup migration paths, forward GDPVal retry progress, and allow selected-source judge recovery into separate output. Verify saved rewards reach the live counter exactly once.

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): preserve retry and scoring compatibility

Signed-off-by: Yuhe Zhang <[email protected]>

* test(gdpval): isolate HTTP recovery fixtures from core tests

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): preserve managed recovery through explicit resubmission

Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): align tracing fixtures with managed recovery

Return a valid scored completion from the incoming telemetry fixture. Verify that resuming a completed run neither sends requests nor emits duplicate rollout dispatch traces.

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): align recovery health and retry reporting

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): mark exhausted resume chains incomplete

Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): align recovery checks with saved run policy

Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): accept the health span context in the native-failure health test

Main's NVIDIA-NeMo#5052 passes the dispatch span context to _record_rollout_health as a fourth argument. Give this test's stub the same optional parameter as main's other stubs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): accept typed judge failures and keep failure paths and legacy classes

NVIDIA-NeMo#5072 lets judge_failsafe name the observed cause as its failure_kind (for
example judge_rate_limited) while the routing class stays judge_failed, and
adds a diagnostic _ng_failure_path. Its base Environment Server also fills
in a kind such as provider_unavailable when the producer left it unset.

- _episode_record() accepts the judge markers and the path on a result whose
  class is judge_failed and whose kind is a judge kind, not only judge_failed
  itself. Such a result stays a retryable judge failure that
  --judge-failed-only re-judges, instead of a terminal
  environment_protocol_violation (or an aborted run without sidecar routing).
- _sanitize_legacy_result() and the native failure branch of _episode_record()
  keep _ng_failure_path on the saved row as a diagnostic, outside the typed
  record.
- An Environment Server failure with a kind keeps environment_server_failed as
  its legacy class, so count_failure_classes_as_zero and the other class
  selectors still match it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): reply with the dispatched episode identity in the provenance tests

Main's provenance tests answered every row with a fixed or malformed episode id. Collection validates a reply against the episode it dispatched, so answer with that identity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): keep a legacy link's companions when checking health

Health resolved every rollout path to the file it links to, so a legacy run
reached through a file link lost the sidecar and inventory kept beside the
link. Aggregation and the shard glob keep the link's name in that case
(resolve_rollout_path), so a recheck counted less than the aggregation it
checks. Resolve health paths with the same reader rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): align main's aggregation tests with the run-history merge rules

NVIDIA-NeMo#4996's tests assumed main's aggregation, which merges a run onto itself and
into a directory holding a run. This branch refuses both, because merged rows
would replace rows the run's history indexes.

- Merging a run onto itself, directly or through a linked directory, is
  refused before anything is written; merge_shards=false still recomputes its
  metrics in place.
- A fresh run into an aggregated output drops its shard list; a resume finds
  no run history there and stops before writing.
- Aggregating into a run with history is refused and changes nothing.
- A file link's companions are read beside the link when they sit there,
  otherwise beside the file it resolves to, which owns them, as do a linked
  output's shard list and reports.
- A failed publication leaves the original rows and a shard list that names
  contents that never landed, so a recheck refuses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): format the omitted-rollout test parameters

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(arena): also limit final judge-outage failures

With the run history, an outage counts as a final failure once its retries
are used up, so the not-final limit NVIDIA-NeMo#5073 set would stop catching it. Each
Arena benchmark now sets the final-failure limit to the same share.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): accept NVIDIA-NeMo#5072's judge failure report on judge_failed results

NVIDIA-NeMo#5072's judge_failsafe now attaches a failure report instead of a failure
path: `_ng_failure_events`, `_ng_failure_id` and, when events were left out,
`_ng_failure_events_omitted`. NVIDIA-NeMo#3302 rejected those as collector-owned keys,
so a judge outage either aborted collection or became a terminal
environment_protocol_violation that lost the saved answer.

A judge_failed result may now carry those three keys. They stay on the row
as diagnostics, beside the version-1 failure record and not inside it, and
legacy agents keep them too. The unused `_ng_failure_path` handling is
removed, and other collector-owned keys stay forbidden.

The judge fixtures use the row NVIDIA-NeMo#5072's code produces for a judge 429.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* refactor(eval): name the saved failure record RolloutFailureRecord

The failure-boundary design names the saved envelope RolloutFailureRecord:
a run's identity plus the failure data, apart from the runtime exceptions
that report failures. The record, its version and its fields are
unchanged. `RolloutFailure` stays importable as an alias of the same class.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): mark the judge report's event ids for the secrets detector

The event ids are random hex from NVIDIA-NeMo#5072's judge_failsafe output, which detect-secrets reads as high-entropy
strings. Name each once with the repository's allowlist pragma.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): mark incomplete CLI runs as failed in tracking

Preserve the final saved-coverage gate after merging NVIDIA-NeMo#5213, and mark its rejected completions as failed for exporters. Keep SIGTERM and retryable/exhausted exit codes unchanged. Cover both CLI paths and tolerated partial runs with a real local MLflow store.

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): integrate main's health layering and partial-stage checks

Move collection health reporting below the CLI layer and pass shutdown state
from CLI callers. Register the recovery modules in main's import contract,
without adding dependency exceptions, and refresh the import inventory for
three private helpers intentionally replaced by the recovery implementation.

Cover accepted GDPVal partial stages followed by a still-incomplete stage,
including a no-progress resume. Accepted omissions must not be counted twice.
Align the older GDPVal test with the stage-aware partial-acceptance report.

Validation: 2,707 targeted tests and all-files pre-commit passed. The new
GDPVal regression fails under a controlled double-credit mutation.

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(imports): finish recovery compatibility with package moves

Expose the existing ConfigError and ENVIRONMENT_SERVER_FAILED definitions
through the package APIs used by the conformance runner and legacy adapter.
Update the remaining recovery test and conformance import paths. No failure,
scoring, or retry policy changes.

Validation: 3,197 targeted tests and all-files pre-commit passed, including
package interfaces, import layering, recovery, legacy adapter and conformance.

Signed-off-by: Yuhe Zhang <[email protected]>

* test(eval): follow verification and runtime package moves

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(eval): preserve run identity and saved recovery policy

Signed-off-by: Yuhe Zhang <[email protected]>

* test(swe-pivot): align runtime stub with public imports

Signed-off-by: Yuhe Zhang <[email protected]>

---------

Signed-off-by: Yuhe Zhang <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 1da71e71 Deployed Oct 19, 2026 by copy-pr-bot[bot] via release / finalize / notify #5776
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 complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work 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.

4 participants