Repository navigation
Conversation
…raining sets SWE-bench, SWE-bench Pro, SWE-Gym, R2E-Gym and Scale-SWE already serve typed resources sessions and lend their task sandbox through sandbox_access, but their OpenCode configs still reach opencode_sandboxed_agent through the legacy_agent relay. Add a single_agent_turn config beside each of them: SWE-bench Verified, Multilingual and Pro recipes, and SWE-Gym, R2E-Gym and Scale-SWE training configs. Each routes its taskset to an Environment Server that seeds the resources session, lends the sandbox to an opencode_agent session, verifies after the agent closes, and closes both sessions. The training configs turn on the agent's token_id_capture, as opencode_sandboxed_agent does by default, and drop the golden-patch resources instance they do not use. The relay configs stay unchanged, because the Nemotron 3.5 Super recipes and their tests bind them and the two OpenCode adapters use different defaults. Each config has a binding test that resolves it and validates a materialized example row against the server's seed task model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test 4ef7392 |
|
🌿 Preview your docs: https://nvidia-preview-pr-5762-962d7e828850.docs.buildwithfern.com/nemo/gym |
… configs deprecated The opencode.yaml recipes of SWE-bench Verified, Multilingual and Pro, and the SWE-Gym, R2E-Gym and Scale-SWE opencode configs, run opencode_sandboxed_agent through the legacy_agent relay. That agent is already deprecated and will be removed after the Environment Server migration. Say so at the top of each relay config and in the READMEs, and point to the opencode_single_agent_turn configs instead. The SWE-bench README now shows the session recipe in its example. The relay recipes stay to reproduce existing results, such as the Nemotron 3.5 Super recipes. The opencode_agent README still lists its session path as evaluation only, so the training configs and READMEs now ask to check token capture before training on those rollouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test 54f51fd |
The configs are checked by gym env validate and the real pairing runs; separate unit tests for each config are not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test 1278902 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
RISK — Provide real-model evidence for the six session recipes
Could you attach representative smoke-rollout evidence for these recipes at the reviewed head? The PR explicitly says the runs haven't happened. This isn't a metadata-only change: the new recipes switch execution to agent sessions, and the training recipes enable token capture. AGENTS.md requires representative real-model smoke rollouts for behavior-changing environment or agent work. Config validation and the reported run on another branch don't establish that all six shipped pairings work. This is a validation gap, not a demonstrated runtime failure.
Correction: Run the Verified, Multilingual, Pro, SWE-Gym, R2E-Gym, and Scale-SWE recipes with a real model and supported sandbox provider. Record the head, commands, task IDs, model/provider settings, rollout artifacts, and inspected results in the PR. No speculative code change is needed unless those runs expose a failure.
Acceptance: For each recipe, show that OpenCode changes the task checkout, agent close finishes before patch capture, verification grades that captured patch in a fresh sandbox, and a completed verification returns evaluation_completed=true and mask_sample=false. Check that both task and verifier sandboxes are released after cleanup. For the three training recipes, enable run-level token capture and inspect captured prompt token IDs, generated token IDs, and corresponding log probabilities; the agent flag alone doesn't establish training readiness. Include a representative interrupted run to check cleanup and ensure an infrastructure failure isn't reported as a completed measured zero.
Preservation: Keep the relay recipes' settings unchanged so existing results remain reproducible. Retain three benchmark repeats and treat session scores as separate measurements. Preserve the existing composition test's assertions: the agent disconnects before verification without destroying the borrowed sandbox, completed results are unmasked, and grader-only fields don't reach the model.
I inspected all 17 changed files and traced the affected config, data-routing, session, verification, and cleanup contracts. I found no additional high-confidence correctness defects. I couldn't execute tests or model rollouts in this read-only review.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
… the relay configs
The benchmark and environment are already in the path, so the
single_agent_turn configs take the plain names:
benchmarks/swebench/{verified,multilingual,pro}/opencode.yaml and
resources_servers/{swe_gym,r2e_gym,scale_swe}/configs/*_opencode.yaml.
Configs can be referenced and extended elsewhere, so the relay configs
are renamed instead of removed: opencode_legacy_agent.yaml and
*_opencode_legacy_agent.yaml, after the legacy_agent environment server
they run behind. Their instance names do not change.
Every citation of the relay recipes now uses the new paths: the
Nemotron 3.5 Super eval, suite and SGLang configs and README, the
nemotron_recipes/super-3.5 SWE-bench recipes, and the tests that pin
those suites and the relay bindings. Each SWE-bench recipe keeps a
manifest: the relay manifests move to opencode_legacy_agent/ with
lifecycle deprecated, and opencode/ now describes the session recipe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test 962d7e8 |
|
Real-model smoke evidence for all six configs at 962d7e8 is now in the PR description (Rollout evidence): each run shows the agent closing before verify, grading in a fresh sandbox, |
What and why
SWE-bench (#4277), SWE-bench Pro (#3718), SWE-Gym and R2E-Gym (#4302) and Scale-SWE already serve typed resources sessions: their seed starts the task sandbox and lends it through
sandbox_access, verify grades the captured patch in a fresh sandbox, and/close_sessionstops what is left. Their OpenCode configs, though, still reachopencode_sandboxed_agentthrough thelegacy_agentrelay, so these benchmarks run with one harness only.This PR moves the OpenCode configs of these benchmarks onto
single_agent_turnand keeps the relay configs under new names:single_agent_turn+opencode_agent)benchmarks/swebench/verified/opencode.yamlbenchmarks/swebench/verified/opencode_legacy_agent.yamlswebench:verifiedbenchmarks/swebench/multilingual/opencode.yamlbenchmarks/swebench/multilingual/opencode_legacy_agent.yamlswebench:multilingualbenchmarks/swebench/pro/opencode.yamlbenchmarks/swebench/pro/opencode_legacy_agent.yamlswebench:proresources_servers/swe_gym/configs/swe_gym_opencode.yamlresources_servers/swe_gym/configs/swe_gym_opencode_legacy_agent.yamlswe_gymresources_servers/r2e_gym/configs/r2e_gym_opencode.yamlresources_servers/r2e_gym/configs/r2e_gym_opencode_legacy_agent.yamlr2e_gymresources_servers/scale_swe/configs/scale_swe_opencode.yamlresources_servers/scale_swe/configs/scale_swe_opencode_legacy_agent.yamlscale_sweThe benchmark and environment are already in each path, so the session configs take the plain
opencodenames. Configs can be referenced and extended elsewhere, so the relay configs are renamed rather than removed; their contents and instance names (<prefix>_opencode_sandboxed_agent,<prefix>_opencode_resources_server) are unchanged apart from a deprecation comment.Session configs
Each follows
verified/hermes.yaml: the datasets move to the resources server with a taskset, the Environment Server binds the resources server and anopencode_agentinstance withresources_server: null,resources_tool_transports: [],allowed_agents: [opencode_agent], andsandbox_config.ttl_s: 25200so the session outlives the 21600-second episode deadline. The benchmark recipes keep three repeats. The training configs turn on the agent'stoken_id_capture(asopencode_sandboxed_agentdoes by default) and set the unused golden-patch resources instance tonull, asagentic_ifdoes. Theopencode_agentREADME still lists its session path as evaluation only, so the training configs and READMEs ask to check token capture before training on these rollouts.Renamed relay configs and their citations
opencode_legacy_agent.yamlpaths:benchmarks/nemotron_3.5_super/{eval_container_config,swebench_verified_multilingual}.yaml, itssglang_configs/*.yamland README,nemotron_recipes/super-3.5/swebench-{verified,multilingual,pro}.yaml,tests/unit_tests/environment/test_benchmarks.py, andresponses_api_agents/opencode_agent/tests/test_existing_benchmarks.py. The Nemotron 3.5 Super overlays bind the same instance names, so they need no other change.opencode/manifest.yamlof each SWE-bench variant moved toopencode_legacy_agent/manifest.yamlwithlifecycle: deprecated, and a newopencode/manifest.yamldescribes the session recipe (agent_server: opencode_agent).benchmarks/swebench,swe_gym,r2e_gymandscale_swelist the session config first and mark the relay config deprecated.opencode_sandboxed_agentand itslegacy_agent/runpath are already deprecated ("Integrate Existing Agents").No issue: this is the config half of the server migrations above.
Compatibility
benchmarks/swebench/{verified,multilingual,pro}/opencode.yamland theswebench/*/opencodebenchmark names now runopencode_agentsessions. Runs that should reproduce earlier results, such as the Nemotron 3.5 Super recipes, useopencode_legacy_agent.yaml(already switched in this PR).opencode_agentuses different defaults fromopencode_sandboxed_agent(thinking on, a 10800-second timeout, subagents enabled), so scores from the two are separate measurements and the session recipes need their own baseline.resources_servers/{swe_gym,r2e_gym,scale_swe}/configs/*_opencode.yamlnow runopencode_agentsessions; the relay configs are*_opencode_legacy_agent.yaml. Theprepare_*.pyscripts still stamp rows with the relay agent'sagent_ref; collation through the taskset drops it._legacy_agentconfigs. Listing session configs there needs a change toscripts/update_env_list.py, left as a follow-up.Validation
gym env validate --config <file> --model-type vllm_model ...: the six session configs, the three SWE-bench relay recipes, the SWE-Gym and Scale-SWE relay configs, the two Nemotron 3.5 Super overlays and the threenemotron_recipes/super-3.5SWE-bench recipes reportConfig is valid.r2e_gym_opencode_legacy_agent.yamlfails asr2e_gym_opencode.yamlalready does onmain: its datasetlicensestring is not an allowed value (unchanged here).gym env validate --manifest <path>for all six SWE-bench manifests, with one-row stand-in dataset files: valid;--syncchanged nothing.responses_api_agents/opencode_agent/tests/test_existing_benchmarks.py,tests/unit_tests/benchmarks/test_super35_batch_launcher.py,tests/unit_tests/{environment,config,tooling},tests/unit_tests/cli/test_validate_server_configs.py,tests/unit_tests/data/test_task_data.py,tests/unit_tests/test_fern_docs_links.py: 1995 passed, 17 failed. The same 17 fail on an untouchedmaincheckout on this macOS host (repo tooling and lint tests, nine Super 3.5 launcher tests that hit an unset bash array, and the benchmark listing, which drops 11 existing recipes here; all six SWE-bench recipes are listed).pre-commit run --files <changed files>: passed after the README table hook rewrote the table. Commits are DCO signed off.Rollout evidence
Real-model smokes at head
962d7e8288501874e8a9eb19d5472b1a78814937, one task per config, on a Linux workstation with Docker 28.nvidia/nemotron-3.5-super-vl-120b-a12bon the hosted NVIDIA API endpoint throughvllm_model, withenable_thinking: false.nemo_gym/sandbox/providers/docker/configs/docker.yaml) with host networking.timeout: 1200andmax_output_tokens: 16384;clear_swebench_debug_logs: falseon the SWE-bench servers. Everything else is the shipped config.gym env start --config run.yaml(the config plus the model and Docker provider configs), thengym eval run --no-serve --config run.yaml --agent <agent> --input <one materialized row> --limit 1 --concurrency 1. The row is the task's prepared row (Verified and Multilingual prepared with theirprepare.py; Pro, SWE-Gym, R2E-Gym and Scale-SWE from the server'sdata/example.jsonl), wrapped withmaterialize_task(row, taskset=...).nemo-gym.sandbox=1containers every 5 seconds; containers were listed again after collection, before the servers stopped, and after they stopped.evaluation_completed/mask_sampleswebench/verified/opencode.yamldjango__django-11099django/contrib/auth/validators.pyswebench/multilingual/opencode.yamljqlang__jq-2235src/main.cswebench/pro/opencode.yamlinstance_ansible__ansible-a26c325b…changelogs/fragments/swe_gym_opencode.yamliterative__dvc-1651dvc/command/status.pyr2e_gym_opencode.yamlpillow__6e97dd5c…src/PIL/FontFile.pyscale_swe_opencode.yamlmore-itertools_more-itertools_pr490more_itertools/more.pyIn all six runs:
/seed_session→/v1/agent_sessions→ the agent's/v1/responses→/v1/agent_sessions/close→ resources/verify→/close_session→/runreturns, every call 200. The agent closed before the patch was captured.evaluation_completed: trueand an unmasked reward.Interrupted run.
swe_gym_opencode.yamloniterative__dvc-1651again, withNEMO_GYM_MAX_ROLLOUT_ATTEMPTS=1. The watcher killed the task container after OpenCode's 4th model call./v1/responsesanswered 500 (OpenCode launch outcome is unknown; cannot confirm termination), and its close answered 500 for the same reason./verifywas never called. The resources/close_sessionreturned 200.rollouts_failures.jsonlas_ng_failure_class: environment_server_failed, stageagent, not terminal. No reward row was written, so the infrastructure failure was not counted as a zero.gym eval runexited 76.Not covered: training token capture. The hosted endpoint does not return prompt or generation token IDs. The captured model calls hold none, and these runs did not turn on run-level token capture. So the training configs'
token_id_capture: trueis still unchecked, and inspecting token IDs and log probabilities needs a vLLM endpoint that a borrowed Docker sandbox can reach. The configs and READMEs say so.Rollouts, server logs, model-call captures and container samples are kept with the run.
Known gaps, left as follow-ups
scale_sweanswers a verify after/close_sessionwith 409, not the maskedlost_session_verificationresult the other SWE servers return.r2e_gym_opencode_legacy_agent.yaml(formerlyr2e_gym_opencode.yaml) failsgym env validateon its license string, as onmain._legacy_agenttraining configs (see Compatibility).benchmarks/swebench/README.mdis also edited by feat(swebench): run multimodal through environment server sessions #5659; whichever merges second resolves a small conflict.🤖 Generated with Claude Code