Skip to content

feat(gdpval): run Codex on GDPval task sandboxes - #1

Draft
athitten wants to merge 12 commits into
codex/codex-native-sessionsfrom
codex-gdpval-hsg-baseline
Draft

athitten wants to merge 12 commits into
codex/codex-native-sessionsfrom
codex-gdpval-hsg-baseline

Conversation

@athitten

@athitten athitten commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What does this PR do?

Runs the Codex harness on GDPval tasks. This is row 6 of the Nemotron 3.5 Super Harness Benchmark Matrix (Codex × GDPVal-AA-V2). Stacked on NVIDIA-NeMo#3640 (Codex in task sandboxes), so the diff shows only the GDPval side.

The pairing is composition only. There are no Codex code changes and no Codex-specific preset. A run composes the stock codex_agent.yaml, a GDPval sandbox config, and single_agent_turn_legacy, as the harness guide (NVIDIA-NeMo#3917) and the GYMINT-5 runbook ask.

Commits:

  1. From feat(gdpval): prototype Pi sandbox sessions yaoyu-33/Gym#8, unchanged: the GDPval sandbox-session path.
    • Seed creates the task sandbox and stages reference files.
    • The agent borrows the sandbox.
    • Verify exports /workspace/output after the agent closes and grades it.
    • Closing the resources session destroys the sandbox.
  2. From the Pi × GDPval work, unchanged (the Pi branch carries the same commits):
    • the two known Fix docs build failures NVIDIA-NeMo/Gym#8 bugs: seed retry after a failed seed, and JSON-string reference lists;
    • libreoffice_command, for hosts without LibreOffice;
    • a finish_params.json marker on export;
    • cache_sandbox_deliverables, which copies exports into the judge-only ELO layout;
    • export of the top-level regular files, with skipped entries recorded instead of a 503 (export cap raised to 1 GiB);
    • invalid judge verdicts kept as flagged rows instead of a 503, so the policy is not re-run and phase 2 can re-judge them.
  3. New here:
    • fix(gdpval): stage large reference files and bound their download. Two GDPval tasks have 230–690 MB reference files, above the old 128 MiB cap, so their seeds always failed and were retried. The fix adds a separate 1 GiB per-file cap and an idle-read timeout, bounds connection retries (they were unbounded), retries 429/5xx a few times, and returns a terminal 413 for oversize files. The Pi branch carries the same commit.
    • fix(gdpval): report reference download failures with clear statuses. A missing reference or exhausted retries reached EnvironmentServer as a generic 500 (retryable). It now gets 424 (terminal) or 503 (retryable), and the download loop owns the retries, so the worst case is four bounded attempts.
    • resources_servers/gdpval/configs/gdpval_sandbox.yaml: the benchmark side only, with allowed_agents: [codex_agent].
    • A README section with the composition, commands, and deployment notes, plus tests/test_harness_pairings.py.

No separate issue: this is the matrix task. Related: NVIDIA-NeMo#3640, NVIDIA-NeMo#3917, yaoyu-33#8, yaoyu-33#9.

Validation

Local, Linux x86_64, Python 3.13.14, venvs built from uv.lock:

  • pytest responses_api_agents/codex_agent/tests environment_servers/single_agent_turn_legacy/tests environment_servers/single_agent_turn/tests resources_servers/gdpval/tests/test_harness_pairings.py resources_servers/gdpval/tests/test_cache_sandbox_deliverables.py --import-mode=importlib -o addopts='': 263 passed, 3 skipped.

  • GDPval server venv (the one gym env test --resources-server gdpval builds), pytest tests -o addopts='': 628 passed, 3 skipped, 4 failed. The 4 failures are test_judge_panel.py::test_benchmark_panel_reaches_intended_upstream_models_and_credentials[*]. They fail the same way on feat(codex): run Codex in task sandboxes NVIDIA-NeMo/Gym#3640's head (97aff4815), before any commit here.

  • Each new test was checked by breaking the code it guards. The pairing test fails for 9 mutations, including:

    • Codex config: reasoning_effort set, sandbox_mode: workspace-write, num_workers: 4, an unpinned version;
    • a wrong provider reference;
    • an extra request field in prepared rows;
    • the agent stopping the borrowed sandbox;
    • staging or export skipped.

    The download tests fail when the 413, the retries, the 4xx rule, or the connection-retry bound is removed.

  • pre-commit run --all-files: passed.

  • Two independent review rounds (correctness, tests and docs, scale). Their findings in this PR's scope are fixed; the rest are listed under limitations.

Rollouts

Real-model runs on HSG:

  • Code: the smoke ran on an earlier revision of this branch, with the same pairing config but before the download and export fixes. The full run uses 2b0b4fc27 (branch codex-gdpval-baseline-run), which differs from this PR's head only in how failed reference downloads are reported (a54a1176f).
  • Model: N35 Super GA, vLLM 0.29.0, TP4, 262,144 context.
  • Codex: 0.144.4, timeout 3600 s, compaction at 229,376.
  • Sampling: temperature 1.0, top_p 0.95, 32,768 output tokens per call, set by the openai_model server.
  • Sandbox: Apptainer 1.5.4, image gdpval_aa_v2_arm64.sif (sha256 f456983c…058c2a).

Results:

  • 3-task smoke (the same 3 tasks as the Pi smoke; rubric; one GPT-5.5 judge with judge_media_mode: images_and_text):
    • 3/3 graded; rewards 0.56 / 0.78 / 0.82.
    • 98 model calls, all HTTP 200 over the Responses API. Every response reports max_output_tokens 32768, temperature 1.0, top_p 0.95.
    • Codex installed into each sandbox: Debian 13, glibc 2.41, Python 3.13.5; cold install 9 s, about 900 MB in /tmp.
    • Codex ran in /workspace and wrote .xlsx deliverables to /workspace/output. They were exported with finish_params.json after the agent closed.
    • Afterwards no sandboxes, staging directories, or Codex/Apptainer processes were left on the node.
  • First attempt: found that the GPT-5.5 Azure route rejects PDFs sent as image_url (HTTP 400). Those rows were recorded as environment_server_failed, not scored zero. Fixed with judge_media_mode: images_and_text, now in the README.
  • Large-reference check (the 2 tasks with 230–690 MB inputs): both seeded, and Codex ran with all model calls returning HTTP 200.
    • Before the export-layout commit, a941b6d8 failed at export with 503. That is the case the commit fixes.
    • 75401f7c produced a 98 MB showreel. With the final code and the judge panel, the video was routed to gemini-3.5-flash and scored 1.0.
    • The final-code rerun of a941b6d8 was cut short to free the GPU slot for the full run, which includes this task.
  • Evidence (HSG, .../users/athittenaman/runs/codex_gdpval/):
    • evidence/smoke3b.manifest.json (versions, image hash, config hashes, results);
    • smoke3b/{rollouts.jsonl, model_calls/, deliverables/, logs/}.

Baseline: 220 tasks

The 220 tasks ran as two shards of 110, 16 at a time, with one attempt per task. Infrastructure failures are retried; harness or model failures are not. The full judge panel is the official AA-v2 one: GPT-5.5, Gemini 3.1 Pro, Opus 4.8.

Metric Result
GDPVal-AA-V2 multi-stage ELO, with the one missing Codex export counted as a loss (scored the same way as Pi) 1102.5
ELO as reported by the scorer (comparison/eval_elo; skips the missing export) 1104.2 (normalized 0.302)
ELO stage 1 1081.6 (45 tasks, each judged against one of the 18 references)
ELO final stage 1104.2 (216/220 tasks vs glm51_fp8, kimi_k26, nemotron3_ultra, qwen36_35b)
Rubric (re-judged from the same exports) over 218 tasks: the 2 tasks too large for the judges left out, as for Pi, and the missing export as 0 81.2 / 100
Rubric over the 217 judged tasks / over all 220 with the unjudged as 0 81.6 / 80.5

ELO checks:

  • final stage accepted under the coverage policy: 98.2% success, 4 omissions;
  • final_stage_degraded = 0;
  • infeasible is null in both stages' reference reassignment;
  • 0 imputed losses.

The 4 omitted tasks:

  • 3 audio/video deliverables too large for any judge (transport_ineligible);
  • 1 task with no export (skipped).

That task (b9665ca1) has no export. 7 of its calls hit the 32,768-token output cap, the last 4 in a row. The next prompt (229,377 tokens) plus the 32,768-token output budget exceeded the 262,144-token context by 1 token, which Codex reports as an execution error.

Generation numbers:

  • 5,765 model calls, all HTTP 200 except that one context-length 400;
  • 14 calls in 7 episodes hit the output cap; 6 of those episodes recovered and were graded;
  • calls per task: median 17, p90 59;
  • model time per task: median 238 s, p90 710 s.

Coverage policy used for both Pi and Codex:

[{num_tasks: 45, partial_completion: {min_success_fraction: 0.9, min_per_reference_success_fraction: 0.3, min_successful_rows_per_reference: 1}}, {num_tasks: 220, num_models: 4, partial_completion: {min_success_fraction: 0.95, min_per_reference_success_fraction: 0.5, min_successful_rows_per_reference: 1}}]

Evidence on HSG, under runs/codex_gdpval/:

  • evidence/gen220.manifest.json;
  • FAILURES.md, which lists every failure and omission;
  • gen220{a,b}/ and phase2_{elo_v2,rubric}/.

Compatibility and benchmark impact

  • Stirrup and judge-only GDPval runs are unchanged. The sandbox path, including the download fix, runs only when sandbox_provider is set.

  • The smoke rewards are rubric scores from one judge, not the GDPVal-AA-V2 ELO.

  • The baseline plan has two phases:

    • Phase 1: collect all 220 tasks once, rubric-scored by the agreed panel (GPT-5.5 / Gemini 3.5 Flash / Opus 4.8; the Gemini 3.1 Pro key is pending).
    • Phase 2: build the judge-only cache with cache_sandbox_deliverables, then run the multi-stage ELO against the 18 references.

    The references' ELOs were set with the official panel, so this ELO is a baseline, not strictly comparable.

Limitations and follow-ups

  • The ELO uses the official judge panel, but the 18 reference ELOs are anchors from 2026-09-17 (about ±10 ELO drift). Inline rubric scores logged during generation used a temporary panel and are superseded by the rubric re-judge above.
  • Known GDPval sandbox-path issues, shared with Pi:
    • The model's own output-layout mistakes (subdirectories, symlinks, more than 100 files) return 503 and are excluded from the mean. The Pi effort is changing this to export the top-level files and record what was skipped; I'll pick that up.
    • With zero exported files, the rubric judge grades the agent's final message.
    • The sandbox shares the host network.
  • Core (pre-existing on main): rows routed with --agent through an Environment Server skip the benchmark's allowed_agents check. Rows that name the Environment Server are checked. This needs a separate core fix.
  • GDPval's default judge_media_mode: native_pdf fails on GPT judges behind this route. The code comment says it works for GPT.
  • gym env resolve masks max_output_tokens as if it were a secret.
  • Codex reinstalls its runtime in every episode (about 180 MB download, about 900 MB of RAM-backed /tmp). A shared read-only runtime is a planned follow-up.

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).

yaoyu-33 and others added 12 commits October 5, 2026 16:36
Two GDPVal tasks have 220-660 MiB reference files, above the 128 MiB cap, so their seeds always failed and were retried as transient errors. Use a separate 1 GiB per-file cap and an idle-read timeout, bound connection retries, retry 429/5xx a few times, and return a terminal 413 for oversize files.

Signed-off-by: Abhishree <[email protected]>
A subdirectory, link, unsafe name, or more than 100 files in /workspace/output made the export return 503, which counts as a retryable infra failure, so the task was dropped from the score and re-run on resume. Judges read only top-level regular files, so export those, record skipped entries in finish_params.json, and raise the export cap to 1 GiB (two gold deliverables exceed 128 MiB).

Signed-off-by: Abhishree <[email protected]>
Raising 503 on an invalid judge verdict sent the row to the failure sidecar without its export, so judge-only ELO could not score it and a resume re-ran the agent while the seeded judge choice repeated. Return the verdict: rubric aggregation already excludes invalid rows and reports them.

Signed-off-by: Abhishree <[email protected]>
A missing reference or exhausted retries surfaced as a bare aiohttp error, which the middleware turns into a generic 500, so EnvironmentServer re-ran the episode. Return 424 for a non-retryable HTTP status and 503 after the last attempt, and let the download loop own retries (one try per request() call), so the worst case is four bounded attempts.

Signed-off-by: Abhishree <[email protected]>
Compose the stock Codex harness with the benchmark config and run one task through both sides' real session code. Document the sandbox path and its Codex composition.

Signed-off-by: Abhishree <[email protected]>
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.

2 participants