Repository navigation
feat(terminal_bench_4): run the mini-SWE profiles on single_agent_turn_legacy - #5697
Draft
weijiac0619 wants to merge 2 commits into
Draft
weijiac0619 wants to merge 2 commits into
weijiac0619 wants to merge 2 commits into
Conversation
|
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. |
A benchmark config may set `harbor_target` (a task folder, a committed entry under environments/harbor/, or a harbor: reference) and define the one agent instance the benchmark runs. `gym eval prepare --benchmark` and `gym eval run --benchmark` then run that target as `gym eval run <target>` does, with the benchmark's harness and its settings. `--agent-type` swaps in another harness's shipped config; the dataset's allowed_agents still decides at prepare. `--agent` is refused rather than ignored. Manifests gain an optional `harbor_target`, mirrored from the config; with it `datasets` is empty and validation checks the target resolves without a fetch. Benchmarks that compose their own servers prepare and run as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: weijia chen <weijiac@nvidia.com>
…ment server `terminal_bench_4/miniswe` now names the Harbor entry environments/harbor/ terminal_bench_4 (`harbor_target`) and runs it with miniswe_sandboxed_agent on episode sessions: the Harbor environment server owns each task sandbox, its Compose group and the separate verifier. The preset keeps the Artificial Analysis settings (500 steps, 30 s per command, each task's 8-hour budget) and raises the episode bound to 54000 s so the slowest verifier fits. The legacy /run preset stays as `terminal_bench_4/miniswe_run` (deprecated) until the TB4 resources server is retired; the smoke runner and the server's example config follow it. The entry's dataset.toml sets CIRCLE_NODE_TOTAL=3 for nextjs-performance, as the resources server does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: weijia chen <weijiac@nvidia.com>
weijiac0619
force-pushed
the
weijiac/n4p0-tb-miniswe
branch
from
November 6, 2026 23:20
aa3fdd5 to
8bbad05
Compare
This branch has not been deployed
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 and why
terminal_bench_4/miniswe(Terminal-Bench 4.0) andterminal_bench_science/miniswe(Terminal-Bench-Science v0.1) were the last TB profiles on thelegacy_agent/runrelay. Each profile now composes three servers, asterminal_bench_science/codex(#5219) does: the TB4 Resources Server,miniswe_sandboxed_agentandsingle_agent_turn_legacy. The Resources Server owns the task and verifier sandboxes and lends the task sandbox throughSandboxAccess. mini-SWE runs in it on an agent session, and the Environment Server closes the agent before grading. The datasets move to the Resources Server instance, and both manifests gaindataset_owner.prompt_sourcestaysagent.The TB4 Resources Server's session seed lacked three things the legacy seed reply carried. This PR adds them:
instruction_observationsetting returns the task'sinstruction.mdas the seed'sobservation. The Environment Server appends it to the agent's input as one user message, and mini-SWE renders it with its upstreammini.yamltemplates. The setting is off by default, so Codex rows, which embed the prompt (prepare_codex.py), are unchanged./tmp/.nemo-gym/task.jsonin its sandbox, the file Harbor episodes write and mini-SWE already reads. In TB 4.0 this coversmedical-claims-processing(Playwright MCP) andcumulative-layout-shift(skills). TB-Science has neither.sandbox_split_endpoints. A newsandbox_provider_refs: {cpu, gpu}setting lends the provider block of the pool where the task's sandboxes run. The provider blocks (terminal_bench_4_sandbox{,_cpu,_gpu},terminal_bench_science_sandbox{,_cpu,_gpu}) move into each benchmark'sresources.yaml. The TB-Science Codex block moves there unchanged, so Codex can also run with split endpoints.miniswe_sandboxed_agentused to log its/rundeprecation warning wheneverresources_serverwas set. The migrated profiles set it only to route the dataset, so the warning now fires on the first/runcall.The benchmark settings are unchanged:
agent.user.The legacy relay had no episode bound, and
single_agent_turn_legacydefaults to 21600 s, so both profiles set one. It covers setup, the agent budget and the slowest verifier: 54000 s for TB 4.0 (fp8-rmsnorm-gemm's verifier allows 18000 s) and 46800 s for TB-Science, the same as its Codex profile.Relation to #5654. #5654 gives
mini_swe_agentagent sessions with an install that meets the installation contract, and leaves the TB4 and TB-Science configs alone. This PR does not depend on it and keeps today's agent,miniswe_sandboxed_agent. The Resources Server changes are agent-independent. #5654 notes that the TB4 Resources Server seed "returns no instruction", which is why its TB4 runs go through the Harbor environment server. With this PR,mini_swe_agentcan borrow TB4 sandboxes from the Resources Server too: it reads the task from the input messages and the task context from/tmp/.nemo-gym/task.json. Moving these profiles tomini_swe_agentafter #5654 lands is a config change:responses_api_agents/mini_swe_agent/configs/mini_swe_agent_sandboxed.yamland_inherit_from: mini_swe_agent.harness.step_limittostep_limitandharness.step_timeout_sectostep_timeout.agent_timeout_sec/agent_max_timeout_secwithsandbox_runner_timeout_seconds.sandbox_model_base_urlandartifacts_dir.The episode bounds already leave room for its 900 s install timeout.
No issue is linked: the work is tracked internally.
Compatibility
terminal_bench_{4,science}_miniswenow names the Environment Server, beside..._miniswe_agentand..._miniswe_resources_server. No other config in the repository referenced the old names.gym eval run --benchmark terminal_bench_4/minisweis unchanged.resources_servers/terminal_bench_4/configs/terminal_bench_4.yamlfollows the new names. Its datasets now sit on the Resources Server, so the generated environment table inREADME.mddrops the TB4 row, as it does for other migrated servers.benchmarks/terminal_bench_4/smoke.pyposts rows to the profile'ssingle_agent_turn_legacyserver.instruction_observation: false,sandbox_provider_refs: {}). Unchanged: Harbor and Codex profiles, and the legacy/runpath ofminiswe_sandboxed_agent.terminal_bench_science_sandboxblock identical to the one this PR moves intoresources.yaml, so the later of the two can drop those copies. refactor(server_runtime): rename the head server to the registry server #5553 (registry-server rename) also merges cleanly, and itssmoke.pyedit is the only file both touch.Validation
Unit tests
At
aa3fdd5ba, Linux:gym env test +entrypoint=resources_servers/terminal_bench_4: 356 passed, 1 skipped.gym env test +entrypoint=responses_api_agents/miniswe_sandboxed_agent: 196 passed.python -m pytest tests/unit_tests/environment/test_environment_validation.py tests/unit_tests/test_public_api_facades.py tests/unit_tests/test_public_api.py: 944 passed, including the manifest-to-runtime composition of both profiles.New tests cover:
task.jsonwritten for a task with MCP servers, and none for a task without./runonly.Real runs
Source: this branch's content before it was committed as
aa3fdd5ba(no file changed after the runs). Model: a Nemotron checkpoint served by vLLM through Gym'svllm_modelserver. Sandboxes: two OpenSandbox deployments, one for CPU and one for GPU, selected per task with++tb4_split_sandbox_endpoints=true.Each stage ran one task with
gym eval prepare --benchmark terminal_bench_4/miniswe "++prepare_script_args.task_names=[<task>]"and thengym eval run --benchmark terminal_bench_4/miniswe ++tb4_split_sandbox_endpoints=true ++tb4_max_steps=3 ++tb4_agent_max_timeout_sec=900 ++tb4_concurrency=1. The 3-step cap keeps the runs short, so no reward is expected.ks-solver-cppLimitsExceededmedical-claims-processing(Compose, Playwright MCP)LimitsExceededmath-eval-graderLimitsExceededIn every run:
mini.yaml's instance template.evaluation_completedwas true, no sample was masked, androllouts_failures.jsonlwas empty.In the Compose run, the Playwright tool schemas from
task.jsonappeared in the prompt, and all four services were closed. The GPU run's verifier logged 404s collecting/app/extracted.jsonland/app/grader.py, files the 3-step run never wrote.Checks
pre-commit run --files <changed files>: passed.Known limits
/verifymaps termination fromresponse.status, andminiswe_sandboxed_agentsets no status. ALimitsExceededor timeout exit is therefore recorded ascompletedin the trial record, as in all three runs above. The actual reason is in the response metadata (miniswe_termination_detail). Reward is unaffected.mini_swe_agentfrom feat(mini-swe): run mini-SWE in task sandboxes through agent sessions #5654 setsincompletefor these exits, so the switch above would fix this.🤖 Generated with Claude Code