Repository navigation
feat(gdp-pdf): add OpenCode environment and benchmark - #5635
Merged
Merged
Conversation
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
7 tasks done
7 tasks done
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
dylanelu
marked this pull request as ready for review
November 5, 2026 23:12
Signed-off-by: Dylan Lu <[email protected]>
Replace the server's own per-session sandbox bookkeeping with LentSandboxes from #5719. The server keeps what is specific to GDP.pdf: the source_pdf containment check, the isolation check, session locks and fences, and the scoring rule. A session's seed is recorded before its sandbox starts, so shutdown waits for a first seed in progress and stops the sandbox it started. Tests cover a cancelled seed, a failed seed whose sandbox is stopped by a later close, retirement or shutdown, and shutdown during a first seed blocked in network inspection or sandbox start. Signed-off-by: Dylan Lu <[email protected]> Co-Authored-By: Claude <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Signed-off-by: Dylan Lu <[email protected]>
Contributor
|
/ok to test a3e918e |
yaoyu-33
approved these changes
Nov 10, 2026
yaoyu-33
left a comment
Contributor
There was a problem hiding this comment.
Re-reviewed at a3e918e. Every item from my last review is fixed, and I found nothing new that blocks merge. Approving.
Fixed since 6abd032
- Image flag: the config uses main's
image_input: true(opencode.yaml L40), andopencode_agentis no longer touched. - Only completed answers are judged:
failedandincompleteboth score zero with no judge call (sandbox_app.py L103-L113). The test coversfailed,incomplete, a trailing tool call andincomplete_details. - Isolation fails closed: the seed rejects the session before any sandbox starts unless the provider is Docker on a network that
docker network inspectreports as internal, with no extra mounts or run flags (sandbox_app.py L115-L140).allow_unisolated_sandboxis the only way past it, and every verification result records it. The Docker provider calls the same localdockerbinary, so the check inspects the daemon that runs the sandbox.LentSandboxes'network_accesssupports only OpenSandbox, so a separate Docker check is the right choice here. - Lifecycle on
LentSandboxes: what remains in this server is GDP-specific: the source-PDF check, the isolation check, and seed, close and fence bookkeeping. The containment test now uses an existing PDF outside the root and a symlink that points out. - Notes: the
source_pdf/document_manifestschema text, the benchmark README section, and the issue line in the body are all done. The score table now says which provider and network produced each row.
Not blocking
- The full CI suite hasn't run on this head yet. I've posted
/ok to testfor it. - The
2f7377ac2row is the only isolated full run. If the 100-task numbers are going into a report, rerun them at the merged head withimage_input.
Contributor
Author
|
/ok to test 46b2986 |
dylanelu
enabled auto-merge
November 12, 2026 02:10
dylanelu
disabled auto-merge
November 12, 2026 02:15
Contributor
Author
|
/ok to test b664875 |
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43324903112 |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add GDP.pdf evaluation with the existing OpenCode agent. Each task's raw PDF is placed in a sandbox, where OpenCode can read text, render pages and run Python. The existing GDP.pdf rubric grader scores the final answer. Rubrics and reference answers never enter the sandbox.
Adds a sandbox resources server, a benchmark config with its preparation script, and a small tools image. There are no shared code changes:
opencode_agentis untouched.Issue: none filed. This is the OpenCode follow-up to #3309.
Benchmark runs
100 tasks × one attempt, OpenCode 1.17.11, incomplete attempts scored zero.
2f7377ac26b3bdcab26b3bdcab2Only the first row is an isolated score. The
6b3bdcab2rows ran on a Slurm cluster where shell network access was not blocked, and beforeimage_inputand #5548; today they would need the opt-out.Validation
At the head,
733578074, on Linux:scripts/ci/core_unit_tests.sh: 20,439 passed. Five tests fail only where the host name maps to loopback, and pass once it maps to a routable address.pre-commit run --all-filesandgit diff --checkpass.gym eval preparewrites all 100 tasks and 1,275 criteria from a missing OpenCode JSONL.At
2f7377ac2, the commit before the final merge of main:sandbox_app.py(containment, scoring, isolation, session bookkeeping, shutdown) each fail the sandbox tests./workspace, with no mounts.example.com,huggingface.coand1.1.1.1are unreachable from the sandbox while the host reachesexample.com. Close and shutdown each remove the container.Rollouts
All through
gym eval runon a Docker internal network, Kimi K3 via API with Luna grading.2f7377ac2: the first table row. All 100 scored; none failed or masked. 99 responses completed; one hit the 16,384-token output cap with an empty answer, returnedincomplete, and scored 0 of 26 without a judge call. 69 episodes read a rendered page image. 74 minutes at eight concurrent episodes.pdftoppmand read the PNG, with no OCR.allow_unisolated_sandbox: true, the warning is logged and the result records the opt-out.Compatibility
The single-turn preparation, agent and grader are unchanged.
The Docker recipe uses an internal network: the sandbox reaches the model proxy at the network's gateway and nothing public. Other host services bound to that gateway are reachable too, so expose only the model proxy there. Apptainer and other providers need
allow_unisolated_sandbox: trueand their own isolation; that opt-out path was exercised on Docker, not on Apptainer.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).