Repository navigation
feat(terminal_bench_2_1): run the Terminus 2 and OpenCode presets on the Harbor environment server and keep the relay recipes as *_legacy_agent - #6181
Conversation
…the Harbor environment server terminal_bench_2_1/terminus_2 and terminal_bench_2_1/opencode ran on the legacy_agent /run relay of the terminal_bench_2_1 resources server. They now name `harbor_target: terminal_bench_2_1` and run the 89 pinned Harbor task folders through the Harbor environment server with agent sessions: terminus_2_sandboxed_agent's episode sessions (its /run route is the deprecated part) and opencode_agent in place of opencode_sandboxed_agent. Both keep eight rollouts per task. The previous recipes stay unchanged as terminus_2_legacy_agent and opencode_legacy_agent (lifecycle deprecated). The Super 3.5 bundle and inkling_small, which compose the resources server's servers, now include terminus_2_legacy_agent.yaml. The resources server's README marks it legacy; the benchmark README gets a Harbor "Run" section and the differences between the two paths. Docs that show agent composition and instance renaming use opencode_legacy_agent, and the tests that exercise the relay recipes follow them to their new names. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
|
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. |
Conflicts with the SWE OpenCode relay renames: - benchmarks/nemotron_3.5_super/eval_container_config.yaml includes the SWE *_legacy_agent configs from main and terminus_2_legacy_agent.yaml from this branch. - responses_api_agents/opencode_agent/tests/test_existing_benchmarks.py checks the SWE *_legacy_agent recipes from main and terminal_bench_2_1/opencode_legacy_agent from this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
The benchmark README now says how the Harbor presets score an episode, which tasks the resources server repairs at run time and what each does when run as published, how the two paths differ (sandbox size, time budgets, the OpenCode adapters' defaults), and which Harbor setting replaces each resources-server key or command. The preset test imports from the public API. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
|
/ok to test 3f8d82a |
On TB2.1 both adapters keep OpenCode subagents enabled (the relay loads opencode_sandboxed_agent.yaml, which denies only webfetch, websearch and skill), and both bound the whole run at 10,800 seconds; the sandboxed adapter also caps each model call at one hour. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
|
/ok to test d164d72 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM. No concerns found.
I inspected all 23 changed files and traced the affected Harbor execution and legacy configuration paths. This was static review only; I did not run tests or reproduce the rollouts reported in the PR.
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.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
A model server imports each harness package that uses it to read the assistant-message header, in the model server's own environment. The terminus_2_agent package imported its app, which needs Harbor, so any run of terminus_2_agent against a model server without Harbor (vllm_model, for one) stopped at startup with "No module named 'harbor'". The package now exports the app's classes lazily, as stirrup_agent does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
terminal_bench_2_1/terminus_2 now lends each task sandbox to terminus_2_agent, Harbor's Terminus 2 at the Harbor commit it pins, which serves agent sessions since #5650; the terminus_2_legacy_agent recipe keeps terminus_2_sandboxed_agent on the relay. The README lists how the two harnesses' defaults differ, and a test checks that a model server can read each preset harness's header without loading the harness's app. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
terminal_bench_2_1/opencode now runs on the Harbor environment server, where --agent-type swaps the harness instead of composing it onto the benchmark's agent; the composition case uses opencode_legacy_agent, as the docs do. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
When Terminus cannot parse a reply it runs no command and sends parse-error
feedback as the step's observation. The response gave that observation a
function_call_output with a made-up call_id that no function call opened,
so the Harbor environment server could not export the transcript to ATIF
("function result ... matches no pending call") and masked the sample: 5
of 39 Terminal-Bench 2.1 rollouts in a 20-task run. A result with no call
to answer is now the next user turn, which ATIF attaches as that step's
observation.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
|
/ok to test 7c695d7 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44133181327 |
feat(terminal_bench_2_1): run the Terminus 2 and OpenCode presets on the Harbor environment server and keep the relay recipes as *_legacy_agent
What and why
terminal_bench_2_1/terminus_2andterminal_bench_2_1/opencoderan on thelegacy_agent/runrelay of theterminal_bench_2_1resources server, throughterminus_2_sandboxed_agentandopencode_sandboxed_agent. They now runTerminal-Bench 2.1 through the Harbor environment server, on the 89 pinned task folders of
environments/harbor/terminal_bench_2_1(#3730), with agent sessions, the same wayterminal_bench_4/miniswedoes in#5697 on the
harbor_targetsupport from #5794:session, and grades the episode with the task's own
tests/test.sh.--agent-type <harness>runs another session-capable harness on the same tasks.Every one of the 89 tasks names a prebuilt image in
[environment].docker_image; none needs a build, a GPU, a Composegroup or a separate verifier image.
What changes:
benchmarks/terminal_bench_2_1/terminus_2.yamlsetsharbor_target: terminal_bench_2_1and includesterminus_2_agent's shipped config: Harbor's own Terminus 2 at the harness's pinned commit, which runs inside thetask sandbox through agent sessions (feat(terminus-2): run Terminus 2 in task sandboxes through agent sessions #5650). The relay recipe ran
terminus_2_sandboxed_agent(Terminus 2 fromHarbor 0.22.0, driving the sandbox from outside), so the two names now measure different harnesses; the README's
"Terminus 2 harness" note lists the defaults that differ.
benchmarks/terminal_bench_2_1/opencode.yamlsets the same target withopencode_agent(agent sessions) in placeof the deprecated
opencode_sandboxed_agent.num_repeats: 8, as before);--num-repeatsreplaces it. Their manifests nameharbor_target, have no datasets of their own, and move to version 0.2.0.terminus_2_legacy_agent.yaml,opencode_legacy_agent.yamlkeep the previous recipes unchanged below adeprecation header, as
terminal_bench_2_1/terminus_2_legacy_agentandterminal_bench_2_1/opencode_legacy_agent(lifecycle
deprecated), so existing numbers stay reproducible. Their agent and resources instance names areunchanged, so overlays such as
benchmarks/nemotron_3.5_super/sandbox_utils.yamlstill bind them.terminus_2.yamlnow includeterminus_2_legacy_agent.yaml:benchmarks/nemotron_3.5_super/eval_container_config.yaml(and, through it,..._with_staged.yaml): this bundlecomposes many benchmarks' servers in one run, and a Harbor-backed preset runs only on its own.
benchmarks/terminal_bench_2_1/inkling_small.yamlkeeps its name and stays on the relay: its rows are pinned to onetask revision and append a terminal-interaction note to each instruction, which the Harbor rows do not carry.
terminus_2_agent, two fixes the Harbor preset needed:__init__.pyloads the app on first use. A model server imports the harness package to read itsassistant-message header, in the model server's own environment, which has no Harbor; the eager import of the app
failed there (
No module named 'harbor') and the run never started.stirrup_agentuses the same pattern.output.pyrecords the feedback Terminus sends after a reply it could not parse as a user message. It was afunction-call output with a made-up call id, which the Harbor verifier's ATIF export rejects ("matches no pending
call"), so the sample was masked (
harbor:trajectory_export_failed): 5 of 39 rollouts in the first 20-task run.resources_servers/terminal_bench_2_1/README.mdmarks the server legacy and says what still uses it.server repairs" (each repaired task and what its reference solution does on Harbor), "Differences from the
resources-server path" (tasks, repairs, sandbox size and budgets, the OpenCode adapter's defaults, Terminus 2) and
"From the resources-server commands" (each old key or command and its replacement); the existing resources-server
sections move under "The resources-server path (legacy)".
The Compare Harnesses page and the CLI reference keep
--benchmark terminal_bench_2_1/opencode --agent-type ...as theHarbor swap example (now with
--sandbox opensandbox) and useopencode_legacy_agentwhere they show composition andinstance renaming, which only a composed benchmark has.
gym eval plan's example namesterminus_2_legacy_agent(plan refuses a Harbor-backed benchmark). The Terminus 2 README, the Harbor entry's README and the TB2.1 Harbor
tutorial point at the presets.
benchmarks/terminal_bench_2_1/tests/test_harbor_presets.py: both presets name the entry and their harness;the run's merged config has
num_repeats: 8with the preset's harness and with--agent-type, and the command linestill wins; the relay recipes,
inkling_smalland both Super 3.5 bundles still compose their own servers; a freshinterpreter imports
terminus_2_agentandopencode_agentand reads the header without loading their apps. Aterminus_2_agenttest turns an unparsed reply into output and exports it to ATIF. The tests that exercise the relayrecipes (
--agent-typecomposition, Terminus 2 workers, OpenCode legacy bindings, the CLI's agent-selector example)follow them to their
_legacy_agentnames.Deliberately left alone:
terminal_bench_2_1/nooaalready runs agent sessions (single_agent_turnon the resources server). fix(config): resolve chained _inherit_from so Harbor binds inheriting profiles #6107, nowmerged, lets NOOA bind to a Harbor taskset; moving
nooato Harbor is a follow-up PR.nemotron_recipes/super-3.5/terminal-bench-2.1.yamlpinsgym_commit, so it keeps running the recipe at thatcommit.
terminal_bench_2_1resources server's code, and the session route its README documents. It retires afternooaandinkling_smallmove.No issue is linked: the work is tracked internally.
Compatibility
gym eval run --benchmark terminal_bench_2_1/terminus_2and.../opencodekeep their names but now needgym dataset pull terminal_bench_2_1and a sandbox flag. They no longer needgym eval prepare; they refuse--no-serveandgym eval plan, andgym env startdoes not compose their Harbor environment server (as for anyHarbor-backed benchmark). A script that prepares and
then runs with
--no-serveunder these names moves to the_legacy_agentnames.differs from the clone the resources server reads), runs
tests/test.shas published (the resources server repairs afew at run time), and uses each task's declared resources and time budgets (the resources server gives every task
4 CPUs, 16 GiB and the harness's own run limit).
terminal_bench_2_1/terminus_2also runs a different harness(
terminus_2_agent: temperature 0.7 and a 2,400 s cap per model call, whereterminus_2_sandboxed_agentuses themodel server's temperature and a 600 s cap).
gym eval submitand downstream launchers (for example EFB). These names are now Harbor-backed. A submitbenchmark passes only
+key=valueoverrides togym eval prepareandgym eval run, so it cannot carry--sandbox(feat(orchestration): run a Harbor task target fromgym eval submit#5978 addstarget,agentandsandboxto submit benchmarks, for task-folder targets). Until alauncher can run a Harbor-backed preset, keep its configs on
terminal_bench_2_1/terminus_2_legacy_agentoropencode_legacy_agent, which behave as these names did. This was not run throughgym eval submit.terminal_bench_2_1/nooa,terminal_bench_2_1/inkling_small,gym eval run terminal_bench_2_1 --agent ....Validation
Image check
gym dataset pull terminal_bench_2_1(dataset digest158fb6be…, 89 tasks), then everytask.toml:[environment].docker_image, prebuilt under one Docker Hub namespace; none ships only a Dockerfile;[verifier.environment]or[agent].user;Unit tests
On this branch merged with current
main, Linux, Python 3.13 (tests that build git fixture repositories ran withcommit.gpgsign=false, since the host signs commits by default):pytest benchmarks/terminal_bench_2_1/tests: 28 passed, 1 skipped, 2 failed. The two failures aretest_nooa_recipe_prepares_and_routes_canonical_terminal_tasks[nooa_agent|pi_agent](resources worker default 1 vsNone). They fail on unchangedmaintoo, as fix(config): resolve chained _inherit_from so Harbor binds inheriting profiles #6107 reports, and still fail after fix(config): resolve chained _inherit_from so Harbor binds inheriting profiles #6107 merged;nooa.yamlis notchanged here. The new
test_harbor_presets.py: 13 passed. Without the preset'snum_repeats: 8, the merged runconfig has 1; with the eager
terminus_2_agentimport, the header test fails.pytest tests/unit_tests/config/test_global_config.py: 250 passed.pytest tests/unit_tests/cli/test_eval_harbor_benchmark.py: 53 passed.pytest tests/unit_tests/cli: 696 passed.pytest tests/unit_tests/environment: 718 passed (manifest validation covers the new and changed manifests).pytest tests/unit_tests/test_public_api_facades.py tests/unit_tests/test_public_api.py: 1101 passed.pytest tests/unit_tests/data/tasks/harbor/test_harbor_entries.py: 101 passed.terminus_2_agenttests in its own environment: 196 passed.opencode_agent'stest_existing_benchmarks.pyin itsown environment: 13 passed.
pre-commit run --files <changed files>(27 files): passed.Oracle
gym dataset validate terminal_bench_2_1 --sandbox opensandbox --only-tasks ...:Six unrepaired tasks (
fix-git,regex-log,openssl-selfsigned-cert,log-summary-date-ranges,git-leak-recovery,cancel-async-tasks): reward 1 on all six, verifier 18–32 s.The eleven tasks the resources server repairs at run time, run as published on Harbor:
qemu-startupapt-get install curlgets 404 frombullseye-securityqemu-alpine-sshcompile-compcertca-certificatesintest.shextract-moves-from-videoca-certificatesintest.shpytorch-model-recoverytest.shtorch)torch-tensor-parallelismtest.shtorch-pipeline-parallelismtest.shmteb-retrievetest.shmcmc-sampling-stansolve.sh(golden-patch mode)rstanbuild-cython-extsolve.sh(golden-patch mode)build-pov-raysolve.sh(golden-patch mode)So only
qemu-startupandqemu-alpine-sshcost model scores on the Harbor path (2 of 89 tasks, as in Harboritself); the README names them and says to exclude them on both sides of a comparison with a source that repairs
them. The CPU-index repairs are not needed for a pass here, so the entry stays unpatched (the tutorial's "as
published" contract); the
ca-certificatesrepairs only matter for an agent that removes the CA bundle, which anoracle cannot show. The two failing reference solutions affect
gym dataset validate, not model rollouts.Real runs
Setup, the same on every arm:
server, 20 concurrent rollouts each, so wall-clock budgets were tighter than on a dedicated endpoint. The
terminus_2_agentarm, which the preset uses now, ran later on its own against a fresh server with the samecheckpoint, also at 20 concurrent rollouts.
resources server's clone, that no repair touches, and whose agent budget is at most 1800 s:
fix-git,log-summary-date-ranges,openssl-selfsigned-cert,regex-log,gpt2-codegolf,llm-inference-batching-scheduler,break-filter-js-from-html,merge-diff-arc-agi-task,rstan-to-pystan,cancel-async-tasks,dna-assembly,raman-fitting,make-mips-interpreter,chess-best-move,sqlite-db-truncate,pypi-server,financial-document-processor,prove-plus-comm,polyglot-c-py,git-leak-recovery.gym eval run --benchmark terminal_bench_2_1/<preset> --sandbox opensandbox --only-tasks ... --num-repeats 2.gym eval run --config benchmarks/terminal_bench_2_1/<preset>_legacy_agent.yaml, with theprepared rows filtered to the same tasks and two repeats.
benchmarks/nemotron_3.5_super/policy_model_override.yaml, which drops the per-calltoken caps. Without it,
opencode_sandboxed_agentasks formax_tokensequal to its 262144-token window, theendpoint refuses every first call (
context_length_exceeded), and every relay rollout scores 0 (seen in an earlier4-task run).
opencode_agenton Harbor scored the same with and without the override.Terminus 2 has three arms: the preset as it is now (
terminus_2_agenton Harbor), the harness the relay recipe runs(
terminus_2_sandboxed_agent) on Harbor, and the relay recipe itself.terminus_2_agentterminus_2_sandboxed_agentrstan-to-pystan, OOM)rstan-to-pystan, OOM)rstan-to-pystan, OOM)make-mips-interpreter, sandbox command outcome unknown)Rewards per rollout, on the tasks where any arm differs (the other 11 tasks have the same rewards on all five arms:
log-summary-date-ranges,openssl-selfsigned-cert,regex-log,merge-diff-arc-agi-task,sqlite-db-truncate,pypi-server,prove-plus-commandgit-leak-recoverypass;gpt2-codegolf,dna-assemblyandraman-fittingfail):
terminus_2_agentterminus_2_sandboxed_agentfix-gitbreak-filter-js-from-htmlrstan-to-pystancancel-async-tasksmake-mips-interpreterpolyglot-c-pyllm-inference-batching-schedulerchess-best-movefinancial-document-processorWhat the gap is made of:
tasks), as Harbor itself does; the resources server gives the harness 10,800 s. 12 Terminus 2 and 8 OpenCode
Harbor rollouts stopped at the budget and were graded as left. Most of them are on tasks that score 0 on both paths
anyway; three of them (
polyglot-c-py,break-filter-js-from-htmland onerstan-to-pystan) scored 1 on theresources server.
rstan-to-pystandeclares 8 GiB; on Harbor three of its four sandboxes were OOM-killed, and thosesamples were masked or failed (never scored 0). The resources server gives
every task 16 GiB.
sandbox_resources_overrideraises it on the Harbor path.break-filter-js-from-html(Terminus 2) andfix-git(OpenCode) lostwithout reaching the budget (the verifier found the XSS filter not bypassed, and the repository files not
restored), while
cancel-async-taskswent the other way on Terminus 2. In the earlier 4-task run, OpenCode scored0, 0 on
fix-giton the resources-server path as well. The two OpenCode arms also run different adapters(
opencode_agentandopencode_sandboxed_agent), so they are separate measurements.terminus_2_agentandterminus_2_sandboxed_agenton Harbor differ on 5 of the 19tasks both scored, in both directions (
chess-best-moveandpolyglot-c-pyup;cancel-async-tasks,llm-inference-batching-schedulerandfinancial-document-processordown). Onlyfinancial-document-processorisconsistent: 0 on both rollouts here and on both in an earlier
terminus_2_agentrun, against 1, 1 on every otherarm. That is not investigated; the harnesses' defaults differ (see Compatibility).
On Harbor every scored episode was graded by the task's own
tests/test.sh, each OpenCode rollout reportsharness_execution: sandbox, noterminus_2_agentrollout was masked, and no model call returned an error. A comparison at equal budgets would need thedataset's
timeout_multiplier, which changes the dataset digest; it is not part of this PR.Known limits
inkling_smallandnooastill run on the resources server; fix(config): resolve chained _inherit_from so Harbor binds inheriting profiles #6107 lets NOOA bind to a Harbor taskset, and the moveis a follow-up PR.
gym eval submitcannot run these presets yet (no--sandbox; feat(orchestration): run a Harbor task target fromgym eval submit#5978); configs that submit keep the_legacy_agentnames.--agent-typeuses the swapped-in harness's shipped settings.this PR.
financial-document-processorscores 0 withterminus_2_agentin both runs and 1 on every other arm; notinvestigated.
🤖 Generated with Claude Code