Repository navigation
feat(gdpval): run Pi in place of Stirrup - #4589
Conversation
fd1cb9e to
53c4a64
Compare
17c8cf3 to
6392c88
Compare
6392c88 to
9b32b23
Compare
e6432c7 to
c40a782
Compare
|
/ok to test c40a782 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no reliability concerns.
Reviewed all six changed files and traced the Pi preset through dataset preparation, prompt materialization, sandbox/MCP execution, verification, and multi-stage deliverable reuse. No actionable findings. The shared writer preserves Stirrup’s row output while omitting request tools for Pi.
Validation was source-only; tests and rollouts were not executed in this read-only review.
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.
c40a782 to
fc87770
Compare
|
/ok to test fc87770 |
|
/review reset=true |
yaoyu-33
left a comment
There was a problem hiding this comment.
Thanks for the Pi preset and the harness-neutral rows. Reviewed at 9eeb8a0.
pi.yamlresolves cleanly (gym env resolvewith the README'svllm_modeloverrides): Stirrup is removed, the environment server points atgdpval_pi_agentover MCP, and every Pi key is aPiAgentConfigfield onmain.prepare.pywrites byte-identical output after thewrite_benchmarkrefactor, and the harness-neutral rows equal those rows without the tool list.- The judges, references and
/verifypath are the same as Stirrup's, so score differences come from the harness settings. The two inline comments are about where those differ.
| # Per model call. | ||
| max_output_tokens: 32768 | ||
| # The Pi process, inside the environment server's default_episode_timeout_seconds. | ||
| timeout: 10800 |
There was a problem hiding this comment.
When Pi reaches this timeout before calling finish, its response is incomplete without stop_reason: wall_time. GDPVal's verify masks and retries a run only on that stop reason (resources_servers/gdpval/app.py:972), so a Pi timeout is judged as an empty submission, while a Stirrup timeout is retried. That lowers Pi's score relative to Stirrup's. The PR body mentions it, but the README does not. Could you add a line to the "Run another harness" section? The lasting fix is for Pi to set stop_reason: wall_time on a confirmed timeout, maybe as a follow-up. Masking on the agent-timeout key would not work, because Pi's metadata always carries that budget.
There was a problem hiding this comment.
Fixed in benchmarks/gdpval/README.md:448-450: "Run another harness" now says that a Pi run that times out before a successful finish is judged as an empty submission and not retried, while a Stirrup timeout is masked and rerun on --resume. Having Pi set stop_reason: wall_time on a confirmed timeout will come in a follow-up PR on the Pi agent.
There was a problem hiding this comment.
Verified at f0c065e; the README note matches the code. Thanks.
| - Deliverables are stored by task and repeat only, so give each run its own `PERSIST_DELIVERABLES_DIR`, for example | ||
| by changing `gdpval_pi` in the export above. A run into another run's directory replaces that run's files, and | ||
| re-judging the earlier run then judges the later one's. | ||
| - The prompt and the harness differ from the certified Stirrup setup, so these are not AA v2 scores. |
There was a problem hiding this comment.
benchmarks/gdpval/README.md:448
Could you share a reference point for these settings? The 220-task numbers in the PR body come from a different setup than this preset: openai_model, concurrency 16, a 3,600 s timeout, an earlier #4587 revision, and a placeholder Tavily key (web_search returned 401 on 140 calls across 54 tasks). The only comparison is with an earlier Pi run. One Stirrup run on the same checkpoint, judge panel and references (ELO and rubric over the same tasks) would show whether Pi is a fair stand-in. A Pi rerun of this pi.yaml with a real Tavily key would also help.
Signed-off-by: Abhishree <[email protected]>
|
/ok to test f0c065e |
yaoyu-33
left a comment
There was a problem hiding this comment.
Re-reviewed at f0c065e. The new README note on timeouts is accurate: Pi still sets no stop_reason, and GDPVal masks only wall_time. Thanks.
The baseline question in the README thread is still open: one Stirrup run on the same checkpoint, judge panel and references, or a note that none exists, would settle it.
| OUTPUT_FPATH = DATA_DIR / "gdpval_benchmark_harness_neutral.jsonl" | ||
|
|
||
|
|
||
| def prepare() -> Path: |
There was a problem hiding this comment.
benchmarks/gdpval/prepare_harness_neutral.py:20
Non-blocking: this script is fine, but a reader who finds two GDPVal prepare scripts has to work out why. Could you say so where people look first?
- In the README's "Run another harness" section and in
prepare.py's docstring:gdpval/pi(and latergdpval/codex) useprepare_harness_neutral.py, which writes the same rows without the tool list. Stirrup takes its tools from the request, while Pi and Codex get them over the MCP grant and reject a tool list in the request. - Why it is a separate script:
gym eval preparecalls the benchmark'sprepare_scriptwith no arguments (prepare_script_argscan only be set on the command line), and the output path must matchjsonl_fpath. One sentence is enough.
As a follow-up, not for this PR: if a benchmark YAML could set prepare_script_args per dataset, GDPVal could keep a single prepare.py with a tools flag.
There was a problem hiding this comment.
Thanks @yaoyu-33 will add in the follow-up PR. I have a list of follow-up items for GDPVal, Pi and Codex, added this to that.
There was a problem hiding this comment.
Also the Stirrup and pi runs are still queued, will share the numbers once available
There was a problem hiding this comment.
Addressed in #5076: README.md:435-440 and prepare.py:22-26. One correction to the reason: a benchmark YAML can set prepare_script_args (birdbench does), but gym eval prepare gives that same mapping to every dataset, so a dataset cannot pass its own arguments.
yaoyu-33
left a comment
There was a problem hiding this comment.
Approving at f0c065e. The Pi preset resolves and validates, prepare.py's output is unchanged, and the README now says how Pi timeouts are scored. The baseline question and the prepare-script note are non-blocking follow-ups.
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39887916130 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39902758570 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39904367844 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39949343129 |
What does this PR do?
Adds
benchmarks/gdpval/pi.yaml, which runs GDPVal with Pi in place of Stirrup, using the same resources server, judges and multi-stage driver:/rootas its working directory.finish,abandon_task_finish,web_searchandfetch_web_pageover MCP:expose_tools_over_mcp: trueon the resources server andresources_tool_transports: [mcp]on the environment server.finish_tool_names: [finish, abandon_task_finish]: a turn whose tool calls are all successful finish calls ends Pi's run.pi.yamlincludesconfig.yaml, removes the Stirrup agent withgdpval_stirrup_agent: nulland pointsgdpval_environment_serverat Pi. (_delete_keywould leave an emptygdpval_stirrup_agent: {}, whichgym env startandgym env prefetchfail on.)concurrency: 32matches Stirrup's and the environment server'smax_concurrent_episodes;timeout: 10800fits inside the environment server's 18,000 s episode timeout;max_output_tokens: 32768per model call.pi.yaml:vllm_modelreturns an empty completion instead, and the episode ends without a submission;Also:
prepare_harness_neutral.pywrites the same rows asprepare.pywithout theresponses_create_params.toolslist, because Pi, Codex and Hermes sessions reject a request tool list. The rows use fix: decouple GDPVal and Stirrup #4178'sprompts/harness-neutral.yaml. Both scripts callprepare.py's row writer, nowwrite_benchmark(output_fpath, *, tools);prepare.py's output is unchanged.test_harness_configs.pychecks the harness configs, listed by name (herepi.yaml), so other configs inbenchmarks/gdpval/, such asnooa.yamlfrom feat(nooa): add a canonical GDPval recipe #4821, are left out. For each one it checks:timeoutis shorter than the episode timeout;openai_modelequivalents, and thegym eval runflags Pi rejects (--temperature,--top-p,--max-output-tokens). It also asks for a separatePERSIST_DELIVERABLES_DIRper run: deliverables are stored by task and repeat only, so a run into another run's directory replaces its files. And it notes that a Pi run that times out beforefinishis judged as an empty submission and not retried (see Compatibility).#4591 (Codex in place of Stirrup) is stacked on this PR and #4590.
No issue: this follows #4178. It builds on #4587, now on
main, which lets Pi sandbox sessions use MCP tool grants and finish tools; this diff has only the GDPVal side. It also relies on #3902, also onmain, which keeps the task's HOME, so files saved under~survive until/verify. Related: #4549 tracks harness validation across benchmarks, GDPVal included; #4546 (draft) adds GDPVal configs for Pi and other sandbox harnesses on the layout before #4178.Port of athitten#2 (Pi × GDPval on the yaoyu-33#8 prototype) to #4178's design. Most of that PR's fixes are not needed here:
gym eval reverify.Its configurable LibreOffice command is ported in #4586.
Validation
At f0c065e, on
main4c66403, which includes #4178 and #4587. The PR has two commits: 9eeb8a0, and f0c065e, which adds only the README's timeout note. 9eeb8a0 changes onlytest_harness_configs.pyfrom fc87770, where the checks below that run Pi or Gym were done. It merges cleanly withmain9240708, which includes #4787 (it madePERSIST_DELIVERABLES_DIRrequired); on that merge, the GDPVal tests give 863 passed, 1 skipped.pytest resources_servers/gdpval/tests: 853 passed, 2 of them new; 1 skipped (it needs Stirrup installed). Locked packages matchuv.lock.direct_httptransport;expose_tools_over_mcp: false; the Stirrup prompt; and a harness config that changes the reward mode, the judge panel, the judge config or the episode timeout, or sets atimeoutpast the episode timeout, or misspells a Pi setting.pytest tests/unit_tests/test_benchmarks.py tests/unit_tests/test_discovery.py tests/unit_tests/test_registry.py tests/unit_tests/test_cli.py: 285 passed.gym env resolvewith the README's overrides, andgym list benchmarks:gdpval/piresolves togdpval_pi_agentwith the harness-neutral rows and prompt, 8 servers, no Stirrup agent and the twovllm_modelsettings, and is listed with its description.gym env prefetch --benchmark gdpval/pi --model-type vllm_model: completed without errors.pi.yaml's Pi settings,main's GDPVal resources server over MCP, Gym'slocalsandbox provider in a scratch directory in place of OpenSandbox, and a scripted model: the model saw the four tools asgdpval_resources_server_<tool>;finishandabandon_task_finisheach ended the run, and/verifysaved the files; a turn that mixedfinishwith another tool did not end it.gym eval run's argument handling, givesvllm_modelthe model URL, key and name from the flags, and both settings. With real Pi 0.80.2, the realvllm_modelserver and a scripted engine, every request carried temperature 1.0 and top_p 0.95, and a context-length error made Pi compact and finish. Without the two overrides, the run stopped with no submission.pre-commit run --all-files: passed, with no changes.mainwith feat(pi): use MCP tool grants in sandbox sessions #4587 (runtime wiring, tests and CI, docs and compatibility, and Pi integration and scale; then the fixes, a fresh full pass and PDF reading in the judges; then the fixes again and a maintainer pass), a pass after that rebase, whose fixes are included, a pass of fc87770, a pass of the test change, whose two suggestions are included, and a pass of the README's timeout note, whose wording fix is included.Rollouts
Smoke of fc87770 on
main4c66403, on a GPU cluster with the same model as the runs below. It ran from #4591's head ff00cd9, which adds #4590 and the Codex config; neither changes the Pi path. It used the README'sgym eval prepareandgym eval runcommands with the placeholders filled in,--limit 3, and its own output, log and deliverables paths. The cluster has no OpenSandbox, LibreOffice or Tavily key, so a localenv.yamlran the task sandboxes under Apptainer with the GDPVal image and turned judging off, andTAVILY_API_KEYwas a placeholder (no run calledweb_search).finish, and/verifysaved the files andfinish_params.jsonundertask_<id>/repeat_0/. In one of them, Pi's argument check rejected the firstfinishcall (resultin place ofreason), and the model called it again correctly. No model call followed a successfulfinish.The earlier smoke and the 220-task run below used #4178 before it merged, when the Tavily key defaulted to a placeholder (
dummy). So everyweb_searchcall failed with a 401: 140 calls in 54 of the 220 tasks, none in the earlier smoke.mainnow refuses to start withoutTAVILY_API_KEY.Smoke on #4178 at bf9f8db, merged with
main, #4587, #4588 and #4586, 3 tasks with the same model, sandbox and overrides as the full run below:finish, and/verifysaved the files,finish_params.jsonand the reference files undertask_<id>/repeat_0/, the folder fix: decouple GDPVal and Stirrup #4178 now takes from the rollout id.finish. In 1 run, Pi's argument check rejected the firstfinishcall (noreason), and the model called it again correctly.220 GDPVal tasks with Pi 0.80.2, from #4178 at fd1cb9e merged with
mainplus #4587 (an earlier revision, without its later refusal of afinishcall from a reply cut off at the output limit; none of the run's 208finishcalls came from such a reply), the HOME change from #3902, and #4586:openai_modelwithpropagate_upstream_http_status_codes: [400], so context-length errors reached Pi, and with temperature 1.0 and top_p 0.95 in itsextra_body./tmpper sandbox (--containall). The OpenSandbox path the README describes has not been run with Pi.judge_deliverables: false, then the GPT-5.5 / Gemini 3.1 Pro / Opus 4.8 panel, with:gym eval reverify.Scores, compared with the earlier Pi run (athitten#2) counted the same way:
comparison/eval_elo)finish. In 4, Pi's argument check rejected the first call and the model called it again.finishsubmits nothing. That is why the rubric is lower even though the other tasks score higher.web_searchcall worked (placeholder key, see above).fetch_web_pageworked.The setup is not identical to the earlier run: harness-neutral prompt,
finishover MCP, a page-fetch tool. So the differences are not from code alone.Compatibility and benchmark impact
gdpval):config.yaml, theprepare.pyoutput and the Stirrup prompt are unchanged.timeoutbefore a successfulfinishis judged with no submission and is not retried. Stirrup reports the same event withstop_reason: wall_time, which GDPVal masks asagent_timeout, and--resumereruns it. Pi does not set it yet; a follow-up PR on the Pi agent will. The README says so in "Run another harness". None of the runs above timed out.--resumereruns it. None of the runs above hit this: all 4 context-length errors recovered after one compaction.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).