Repository navigation
feat(healthbench): add HealthBench and HealthBench Professional - #5775
Conversation
Squash the original HealthBench commits into one signed-off commit to meet Gym's DCO requirements. The staged tree matches the original healthbench-professional branch. Co-authored-by: Chris Parisien <[email protected]> Signed-off-by: Jin Li (Worldwide Field Ops) <[email protected]>
Signed-off-by: Jin Li (Worldwide Field Ops) <[email protected]>
|
/review |
|
/ok to test 230206a |
|
/review |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
HOLD — one BLOCKER silently scores supported refusal answers as empty. Six RISKs affect schema validation, judge-failure completion, grading evidence, preparation, tests, and multi-worker startup.
I inspected all 32 changed files and traced the affected preparation, configuration, verification, aggregation, and reporting paths. This was a source-only review: I didn't execute tests or inspect the external run bundles. Two delegated report texts weren't returned, so I inspected those topics directly.
NOTE — Add published-site documentation for both benchmarks. The new READMEs explain the protocols, but the published benchmark guide doesn't mention either benchmark. The review rubric requires user-facing benchmark documentation under Fern. Could you add a concise section there covering preparation, model/judge configuration, subset selection, experimental status, and the two headline metric keys, with links to the detailed READMEs? Retain the warning that mean/reward isn't the published-score metric and that masked attempts reduce scored coverage. Proposed acceptance: verify that both names and their prepare/run examples appear in the published page, that HealthBench uses overall_score and Professional uses overall_score_length_adjusted, and run the Fern documentation and link checks. This is a documentation suggestion, not an observed runtime failure.
The inline comments contain the failure evidence, correction, preservation requirements, and proposed acceptance checks for each code finding. Suggested code is source-reviewed, not tested; please verify it before adopting it.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| for output in reversed(body.response.output): | ||
| if getattr(output, "type", None) != "message" or getattr(output, "role", None) != "assistant": | ||
| continue | ||
| return "".join(item.text for item in output.content if getattr(item, "type", None) == "output_text") |
There was a problem hiding this comment.
BLOCKER — Grade refusal content instead of treating it as an empty answer.
A supported final message containing {"type":"refusal","refusal":"Please seek emergency care; I cannot diagnose this remotely."} becomes an empty string here. verify() then assigns zero without judging even a positive criterion such as “Advises seeking emergency care.” This silently mis-scores answers in both benchmarks. Gym's response contract supports refusal content, and the policy converter preserves it.
Could you replace this return statement with:
| return "".join(item.text for item in output.content if getattr(item, "type", None) == "output_text") | |
| return "".join( | |
| item.text if getattr(item, "type", None) == "output_text" else item.refusal | |
| for item in output.content | |
| if getattr(item, "type", None) in {"output_text", "refusal"} | |
| ) |
This retains the last-assistant-message rule, content order, exact whitespace, and exclusion of reasoning. Truly empty or whitespace-only answers must still receive zero without a judge call or length bonus.
Proposed acceptance: send a refusal-only final message with the example criterion and a scripted true judge verdict; assert that the judge receives the refusal text, overall_score == 1, and grades is nonempty. Cover mixed text/refusal content in order. Retain the exact-whitespace/last-answer and empty-answer assertions in the verifier tests. I traced the suggestion through these cases but didn't execute it.
There was a problem hiding this comment.
Suggestion applied.
|
|
||
| class HealthBenchRubricVerifyRequest(BaseVerifyRequest): | ||
| model_config = ConfigDict(extra="allow") | ||
|
|
There was a problem hiding this comment.
RISK — Supply the resources server's task-data schema.
The new server has no task_data.py. The existing schema-presence check therefore fails, and collation skips task-field validation even in error mode. For example, a prepared row missing rubrics can pass collation before policy inference and then fail this required verifier contract. Both benchmarks and the committed examples use this owner.
Could you extract the task fields and their validators into a dependency-light resources_servers/healthbench_rubric/task_data.py exporting TaskData, reuse the shared contract in HealthBenchRubricVerifyRequest, and validate preparation output against it? Declare the emitted provenance fields, including uuid, so valid rows don't become unknown-field failures. Add enforcement between the schema and runtime model rather than maintaining unrelated declarations. The invariant is that preparation, collation, and /verify agree on required fields and validation.
Preserve signed finite rubric points, rubric extras/tags, metadata, native conversations ending in a user turn, and the current extra="allow" policy.
Proposed acceptance: the existing schema-presence and committed-row checks pass; rows produced by both preparers validate unchanged. Removing source_id, conversation, or rubrics, supplying boolean/nonfinite points, or removing all positive points must fail both schema and runtime validation before paid calls. Retain the existing preparation-preservation assertions. This is source reasoning; I didn't run the checks.
There was a problem hiding this comment.
Suggestion applied.
| conversation = _conversation_text(body.conversation, response_text) | ||
| try: | ||
| grades = [await self._grade_rubric(conversation, rubric) for rubric in body.rubrics] | ||
| except JudgeError as error: |
There was a problem hiding this comment.
RISK — Handle the typed failures emitted by the real judge helper.
HTTP and connection failures from call_judge raise NgFailureEvent, not JudgeError; see its exception contract. They bypass this branch. The shared failsafe masks them but doesn't add evaluation_completed=false, so an ordinary new request returns a failure row without the completion boolean required by the conformance consumer. The current tests mock only JudgeError and TimeoutError.
Could you import JUDGE_FAILURES and is_judge_failure from nemo_gym.verification and replace the exception header with:
except JUDGE_FAILURES as error:
if not is_judge_failure(error):
raiseKeep the existing incomplete/masked response fields, and merge FailureReportRow.fields(report_for_current_request(error)) from nemo_gym.core into the typed failure response so its selected event and HTTP cause survive. Don't swallow unrelated Gym failures or convert unavailable grades into valid false criteria.
Proposed acceptance: exercise the registered /verify route with the real helper over stubbed HTTP 401 and exhausted retryable failures. Assert evaluation_completed is False, masking, retained policy response, and a selected judge failure preserving the HTTP cause. Retain malformed-grade masking, valid-false grading, signed scores, and successful-reverification assertions. No tests were executed.
There was a problem hiding this comment.
Suggestion applied.
| ) | ||
| conversation = _conversation_text(body.conversation, response_text) | ||
| try: | ||
| grades = [await self._grade_rubric(conversation, rubric) for rubric in body.rubrics] |
There was a problem hiding this comment.
RISK — Record the judge grading that produced the returned score.
With observability enabled, successful nonempty answers record judge calls but no grading operation: this path never uses observe_llm_judge_grading or record_parsed_judge_verdict. The verification wrapper deliberately doesn't infer programmatic grading after model calls, and grades isn't a recognized grading artifact. Consequently, normally scored trials remain unobserved at the current evaluation-health gate, withholding a pass for both benchmarks. This is distinct from the historical call-ownership gap disclosed in the PR.
Could you instrument the complete score-producing calculation with the existing grading-observation contract? A successful operation must bind the returned policy response and bounded reward to the actual judge dependencies; mark a parsed verdict only after validating boolean criteria_met. Don't label the final arithmetic alone as model-free grading. The malformed-reply retry loop needs care: blindly wrapping it can leave an eventually accepted grade unknown. I haven't established a small safe patch for that arrangement; the required invariant is a completed, correctly bound grading record for each accepted result without hiding failed attempts.
Proposed acceptance: through the registered route and real helper over stubbed transport, cover true/false grades, multiple signed rubrics, both judge endpoints, and malformed-then-valid recovery. Assert completed judge-grading evidence, actual response IDs, and a binding matching the returned response/reward; the trial must no longer be unobserved for missing grading. Preserve empty/no-judge zeros, masked incomplete failures, raw negative scores, Professional's length adjustment, and clamp-after-averaging. These checks weren't executed.
There was a problem hiding this comment.
Additions applied.
| if other != subset: | ||
| Path(destination).write_text("do not overwrite\n") | ||
| with patch("huggingface_hub.hf_hub_download", return_value=str(local_source)) as download: | ||
| _multiprocess_benchmark_prepare_fn((datasets[0], "benchmarks.healthbench.prepare", args)) |
There was a problem hiding this comment.
RISK — Pass the current preparation worker's four-element input.
Each of the six subset/config-order cases calls the worker with three elements, but the current worker immediately unpacks four. These tests therefore raise ValueError: not enough values to unpack (expected 4, got 3) before preparing a row, so the advertised focused suite can't pass at this head and doesn't exercise its cross-subset overwrite assertions.
Could you supply None for the non-isolated interpreter, matching the production in-process branch?
| _multiprocess_benchmark_prepare_fn((datasets[0], "benchmarks.healthbench.prepare", args)) | |
| _multiprocess_benchmark_prepare_fn((datasets[0], "benchmarks.healthbench.prepare", args, None)) |
Retain all six Full/Consensus/Hard and config-order cases, selected filenames and destinations, subset metadata, and the assertions that other subset files remain untouched.
Acceptance: run this parametrized test and assert that all six cases reach the existing output/content assertions, with the mocked download selecting the expected source filename and all nonselected destinations unchanged. Also retain the atomic-failure and direct-subset preparation cases. The failure and suggestion follow directly from the inspected signatures; I didn't execute pytest.
There was a problem hiding this comment.
Suggestion applied.
|
|
||
| BENCHMARK_DIR = Path(__file__).parent | ||
| DATA_DIR = BENCHMARK_DIR / "data" | ||
| OUTPUT_FPATH = DATA_DIR / "healthbench_professional_benchmark.jsonl" |
There was a problem hiding this comment.
RISK — Write the default Professional dataset under the caller's working directory.
Outside the checkout, gym eval prepare --benchmark healthbench_professional uses this absolute module-relative destination, because its config supplies no output override. In a wheel installation that targets the installed package tree, preparation either fails on permissions or writes there and then fails the worker's cwd-relative destination check. The standard command should write the path declared by the benchmark in the user's writable working directory, not modify the installation.
Could you make the default destination match that contract?
| OUTPUT_FPATH = DATA_DIR / "healthbench_professional_benchmark.jsonl" | |
| OUTPUT_FPATH = Path("benchmarks/healthbench_professional/data/healthbench_professional_benchmark.jsonl") |
This keeps the repository-root workflow's destination unchanged and leaves explicit output arguments, local/ZIP/Hugging Face loading, revision pinning, limits, and atomic replacement intact.
Proposed acceptance: change into a temporary directory, prepare one local synthetic record using the default output, and assert that only the declared path beneath that directory is written and that the returned path matches the worker's expected absolute path. Exercise the standard prepare command from outside a read-only wheel installation. Retain explicit-output and atomic-failure assertions in the shared preparation tests. No commands were executed.
There was a problem hiding this comment.
Suggestion applied.
| ) | ||
|
|
||
|
|
||
| if __name__ == "__main__": |
There was a problem hiding this comment.
RISK — Export the application when Uvicorn imports a worker.
Setting this resources server's inherited num_workers to 2 makes the shared launcher start resources_servers.healthbench_rubric.app:app. In a worker import, __name__ isn't __main__, and this module never defines app, so the workers can't start and either benchmark times out during server startup. The server doesn't declare multi-worker operation unsupported.
Could you import is_nemo_gym_fastapi_entrypoint from nemo_gym.utils and use the same worker entrypoint branch as the existing model/agent servers? Replace this final block with:
if __name__ == "__main__":
HealthBenchRubricResourcesServer.run_webserver()
elif is_nemo_gym_fastapi_entrypoint(__file__):
app = HealthBenchRubricResourcesServer.run_webserver() # noqa: F401Preserve single-worker/script startup and ordinary imports used by tests and verifier fixtures; those imports must not start a server.
Proposed acceptance: start the resources server with two workers and stubbed judge transport, then check /reverify_mode and a synthetic /verify request. Both workers should serve successfully. Retain single-worker behavior and verify that importing the module normally still performs no startup. I traced this patch against the launcher and worker predicate but didn't run it.
There was a problem hiding this comment.
Suggestion has been applied
yaoyu-33
left a comment
There was a problem hiding this comment.
One config suggestion: move the HealthBench environment server off the legacy_agent relay.
| legacy_agent: | ||
| entrypoint: app.py | ||
| agent_server: | ||
| type: responses_api_agents | ||
| name: healthbench_rubric_simple_agent |
There was a problem hiding this comment.
resources_servers/healthbench_rubric/configs/healthbench_rubric.yaml:40
Could this pairing use single_agent_turn_legacy instead of the legacy_agent relay? The relay sends the whole episode to simple_agent's /run as one request, so a crash repeats the whole episode; single_agent_turn_legacy runs it in steps and is the documented target for simple_agent (Move a simple_agent Off the Relay; arena_judge does the same). scripts/add_legacy_agent_environment_servers.py --switch-simple-agent produces exactly this change, and the benchmark configs need no edit: through the _inherit_from rename it still resolves to both benchmark agents and to Professional's own resources server, and gym env validate --server-types environment_servers passes for Full, Consensus, Hard and Professional. A small before/after reward check would be good to include.
| legacy_agent: | |
| entrypoint: app.py | |
| agent_server: | |
| type: responses_api_agents | |
| name: healthbench_rubric_simple_agent | |
| single_agent_turn_legacy: | |
| entrypoint: app.py | |
| agent_server: | |
| type: responses_api_agents | |
| name: healthbench_rubric_simple_agent | |
| resources_server: | |
| type: resources_servers | |
| name: healthbench_rubric | |
| resources_tool_transports: | |
| - direct_http |
There was a problem hiding this comment.
Hi @yaoyu-33, the suggested change has been applied to PR, please take a look thank you
Signed-off-by: Jin Li (Worldwide Field Ops) <[email protected]>
Signed-off-by: Jin Li (Worldwide Field Ops) <[email protected]>
|
/review reset=true |
|
/review reset=true |
|
/ok to test ae8f3a0 |
|
/review reset=True |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — no qualifying findings.
The latest review's two RISKs are fixed: parser and local-timeout failures receive canonical failure IDs, and template substitution preserves conversation and criterion text. The added regression tests cover both concrete failures.
I assessed all 47 changed files and traced the affected preparation, configuration, verification, aggregation, validation, and recovery paths. All three delegated inspections reached terminal status. One report wasn't returned, so I directly inspected its preparation, schema, configuration, dependency, and documentation assignment.
This was source-only inspection. I didn't execute tests, install dependencies, or inspect the externally retained rollout bundles. This approval doesn't certify the disclosed onboarding exit checks or reference-score parity.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
Signed-off-by: Jin Li <[email protected]>
Head branch was pushed to by a user without write access
|
/ok to test b4a31bc |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43283012855 |
Main's #5775 validates a resources server that only manifest workloads use through its committed verifier fixtures (manifest_workloads_for_server, validate_environment(validate_datasets=False)). That covers what eb66804 added for AutomationBench, so nemo_gym/cli/env.py and nemo_gym/environment/validation.py take main's version, and the tests for the replaced path (require_all_datasets, setup_config reuse, the indic stubs it needed) are dropped. AutomationBench's VERIFIER_FIXTURE and verifier_cases.jsonl stay; main's path runs them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]>
#5775 left the benchmarks/healthbench_professional/prepare.py entry unterminated, so detect-secrets cannot read the baseline and the secrets-detector check fails on every PR. Restore the missing is_secret field and closing brackets. Signed-off-by: Chris Wing <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
#5775 left the benchmarks/healthbench_professional/prepare.py entry unterminated, so detect-secrets cannot read the baseline and the secrets-detector check fails on every PR. Restore the missing is_secret field and closing brackets. Signed-off-by: Chris Wing <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit b2a2791) Signed-off-by: yaoyu-33 <[email protected]>
…box (NVIDIA-NeMo#5003) * feat(environment): bind the agent's resources server when single_agent_turn names none A legacy_agent relay names no resources server: the agent's /run uses its own. A single_agent_turn_legacy server that replaces the relay had to pin one, and a pinned name breaks a benchmark that reaches the server through an _inherit_from rename of the agent. The rename also renames the resources server, and Gym follows renames only for agent references, so the pinned name dangles (for example indic/math_500 through math_with_judge's server). resources_server is now optional. Unset, the server binds the resources server the bound agent names, as the relay did, so it follows the agent rename. A server that sets none in front of an agent that names none fails at startup instead of on the first episode. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * feat(scripts): switch simple_agent relays to single_agent_turn_legacy About 307 configs reach simple_agent through a legacy_agent relay, so a crash repeats the whole episode. Under single_agent_turn_legacy, it repeats only the current step, and simple_agent resumes inside its turn (GYMINT-549). add_legacy_agent_environment_servers.py gains --switch-simple-agent. It replaces each relay in front of a simple_agent with a single_agent_turn_legacy server of the same name, so rows keep their routing. The server names no resources server, so it binds the agent's, as the relay did, and follows an agent rename. It grants direct HTTP access to the resources server's tools, the routes the agent's /run called. It resolves each config with its own config_paths, as Gym does, since instance names are unique only within a run. A relay stays, listed with its reason, when its agent binds no resources server, declares a grant simple_agent sessions reject (a required MCP access or a second direct HTTP access), binds a resources server whose seed_session takes only the legacy body (19 relays today, read from the server's source so a server passes once it migrates), or its run cannot load an include. A relay that inherits another keeps inheriting it, and the script refuses to switch only one of the two. The default mode is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(scripts): keep relays the switch would split or cannot drive The pairing guard only compared `_inherit_from` children that carry their own `legacy_agent` key, so a run that merged a switched relay with a same-name `legacy_agent` override (the hle and apex_shortlist opencode/pi recipes) or a bare `_inherit_from` child exited 0 with two environment server types. - Resolve every run after the planned switches. A relay that a run merges with a legacy_agent server stays on the relay; when the relay it inherits switches, the script refuses (exit 2) and names the config. Top-level nulls now remove instances, as in Gym. - Keep relays whose resources server reads the row's rollout coordinates (genrm_compare), whose implementation is not under resources_servers/, or that set keys the switched stanza would drop. - Build every rewrite before writing any file; a stanza that cannot be found exits 2 instead of raising StopIteration. - Dedupe scanned paths after resolving them. - Give the hle and apex_shortlist opencode/pi recipes a legacy_agent server of their own, so their benchmarks can switch. - Fix the docstring and docs examples, document the new stay reasons, note how to inherit the single_agent_turn templates, and test the legacy adapter with resources_server unset. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(scripts): keep every same-name declaration of a split relay When two files of a run declare the same relay (a base and a partial override of it) and a later config merges it with a legacy_agent server, split_servers found two switching entries for the instance itself and looked for a different inherited relay that was not there, raising StopIteration. Every declaration of the instance now stays on the relay; the script still refuses (exit 2) only when a different relay the instance inherits switches. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(config): preserve benchmark relay names in harness overrides Signed-off-by: yaoyu-33 <[email protected]> * chore(configs): move simple_agent configs off the legacy_agent relay Runs scripts/add_legacy_agent_environment_servers.py --switch-simple-agent over the repository (GYMINT-549). 287 relays in front of simple_agent in 279 config files become single_agent_turn_legacy servers of the same name, so a crash repeats only the current step instead of the whole episode, and simple_agent resumes inside its turn. 20 relays stay, as the script reports: - 19 whose resources server seeds only the legacy body (workplace_assistant, openenv, newton_bench, indirect_prompt_injection, example_session_state_mgmt, and the SWE example configs); they move once their servers accept the typed seed. - benchmarks/nemotron_3_ultra/benchmarks_no_external.yaml, whose include benchmarks/ruler/config_nemotron_3_256k.yaml does not exist on main. Tests and docs that read these configs follow the new key. The super35 container build now covers single_agent_turn_legacy too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(configs): keep genrm_compare on the relay and soften the docs claim Regenerated with the fixed --switch-simple-agent: genrm_compare's /verify needs the row's _ng_rollout_index and cohort keys, which single_agent_turn_legacy does not forward, so both genrm servers stay on legacy_agent. hle and apex_shortlist still switch now that their opencode/pi recipes declare their own relay. The YAML is byte-identical to a fresh generator run: 278 files, 285 relays switched, 22 kept. The docs said every shipped simple_agent config uses single_agent_turn_legacy; 22 stay on the relay, so say "most" and name why. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * test(super35): expect 16 core server environments after the switch The switched configs add single_agent_turn_legacy to the core batch's resolved server set, so the prebuilt dependency check now reports 16 environment paths. CI on Linux showed "16 server environment paths checked" against the old expectation of 15; macOS Bash 3.2 stops these shell tests before the count. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(agent): report simple_agent session tool calls as observations With model-call capture on, a simple_agent episode run through an Environment Server (single_agent_turn, single_agent_turn_legacy) lost its executed tool records: the session kept only the trajectory's invocations and gaps, so the collected ng_trajectory had no tool_calls and ng_perf.num_tool_calls was 0, while /run reported them. The session now adds a ToolCallObservation for each executed tool call to the agent observations it returns at close. Rollout collection already merges these into ng_trajectory.tool_calls and rejoins each call's output from the invocation conversation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> (cherry picked from commit 2ef4896) Signed-off-by: yaoyu-33 <[email protected]> * fix(config): relay session-less agents swapped onto single_agent_turn_legacy A `--agent-type` swap onto an environment fronted by single_agent_turn_legacy kept that server type even when the incoming agent does not implement agent sessions, so every episode failed with NotImplementedError from /v1/agent_sessions. Composition now rewrites such a server to a legacy_agent relay that calls the agent's own /run, keeping its entrypoint, agent_server and host/port. AGENT_SESSION_AGENT_TYPES in global_config is the single list of session-capable agent types; the legacy-relay migration script reads it instead of its own copy, and a unit test keeps it in step with the agent apps. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> (cherry picked from commit d156ef2) Signed-off-by: yaoyu-33 <[email protected]> * refactor(configs): retire tool_simulation_agent and non_executing_simple_agent into simple_agent Both agents make one model call and pass its tool calls to the verifier unexecuted. simple_agent with execute_tools: false does the same as an agent session, so its configs run under single_agent_turn_legacy and resume inside the turn after a crash (GYMINT-217, GYMINT-147). 14 configs move: image_tools_pivot, swe_pivot, structured_outputs_v4, seven single_step_tool_use_with_argument_comparison configs and four terminal_multi_harness configs. Each agent keeps its instance name and becomes simple_agent with execute_tools: false; its relay becomes a single_agent_turn_legacy server, which simple_agent needs since it refuses /run without tool execution; allowed_agents gains simple_agent. The pivot-dataset skill's template and reference config writer emit the same pairing. Both agents stay, marked deprecated, so configs outside the repository keep working until a later release removes them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(configs): drop the unused tool grant from non-executing simple_agent configs With execute_tools: false the agent never calls a tool, so the direct_http grant on the 14 converted configs was unused, and the pivot skill's template already omits it. It also made a silent mis-score possible: `--agent-type simple_agent` is now allowed on these servers, composition does not carry execute_tools over, and the swapped-in agent would execute tools through the grant against verifiers that score one unexecuted call. Without the grant it fails loudly instead. A repository test now asserts that no execute_tools: false simple_agent sits behind a legacy_agent relay (its /run refuses) or gets a tool grant. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(env): own resources bindings and resolve inherited renames Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): close agent session gaps and run behind single_agent_turn_legacy The DeepAgents agent inherited SimpleAgent's session seed, which accepted a direct HTTP tool grant that its own responses() never used, and SimpleAgent's resumable checkpoint support without SimpleAgent's activation tracking. - Refuse a sandbox and any required tool grant at seed with a final 422; skip optional grants. The session holds no Resources cookie jar. - Reject execute_tools=false at config load: the graph runs its own tools. - Take part in checkpoints as restart-only (GYMINT-357 tracks resuming). - On the session path, require the seeded session and stop mirroring request cookies; close reports observation gaps instead of nothing. - Move the reasoning_gym and tavily_search DeepAgents configs from the legacy_agent relay to single_agent_turn_legacy with no tool grants. Refs GYMINT-141. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * test(deepagents): expect single_agent_turn_legacy in the DeepAgents config test The core config test still required the legacy_agent relay that this PR replaces. Assert the new Environment Server, its Resources Server reference and the empty tool-transport grant instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * docs(deepagents): note --agent-type transports and skip_verification, test the optional-grant jar The README now says that an Environment Server this agent is swapped into with --agent-type must also send no tool grant, and that skip_verification does not apply on the session path. The optional-grant test now closes the session and checks that the grant's cookies never become the Resources cookie jar. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): preserve sessions across stack composition Signed-off-by: yaoyu-33 <[email protected]> * fix(configs): bind Resources Servers for environment servers switched on main `resources_server` is now required on `single_agent_turn` servers, and four configs switched on main after this PR was generated did not set it: beam, mimo_music, and vision_arena_v1 in their Resources Server configs, and the vision_arena_v1 benchmark, which renames its Resources Server through `_inherit_from` while the parent stays loaded. Each binding is the Resources Server its agent already uses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]> * test(deepagents): import sandbox access types from the nemo_gym.sandbox facade test_public_api_facades requires code outside the library to import exported names from the package's public API, not from nemo_gym.sandbox.access. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(configs): bind renamed Resources Servers in benchmarks that compose Five benchmark environment servers relied on the resolver to follow their Resources Server rename. That works when the benchmark loads alone, but a run that composes two benchmarks renaming the same Resources Server makes the reference ambiguous, and the resolver refuses it with AmbiguousResourcesRenameError. genrm_eval's test_mmrb composes genrm_mmrb1 and genrm_mmrb2 and fails this way. genrm_rewardbench2 and hle_diamond fail the same way next to their sibling benchmarks, and indic/mbpp is bound for consistency. Each binding is the Resources Server its agent already uses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]> * test(config): import the binding test's parser from nemo_gym.config Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: weijia chen <[email protected]> * refactor(deepagents): import agent session types from nemo_gym.agents main moved nemo_gym.base_responses_api_agent to nemo_gym.agents.base_responses_api_agent, and the agent session conformance checks to nemo_gym.agents.testing. The old paths still resolve but warn and go away in 0.10.0; nothing else on main imports them. Signed-off-by: weijia chen <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(configs): drop repeated timeouts from the DeepAgents configs default_episode_timeout_seconds: 21600 and cleanup_timeout_seconds: 180 repeat the single_agent_turn_legacy server defaults. No other migrated config spells them out, and the generator leaves them to the server defaults, so drop them from the two DeepAgents configs. The composed Environment Server configs still resolve to 21600 and 180. Signed-off-by: weijia chen <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(deepagents): import agent session types from the nemo_gym.agents facade Code outside nemo_gym/ imports exported names from the package's public API; test_public_api_facades.py failed on the submodule imports of AgentSeedRejectedError, AgentSeedSessionRequest, AgentCloseSessionRequest and check_agent_seed_rejected, all of which nemo_gym.agents exports. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * feat(deepagents): run Deep Agents in a borrowed task sandbox When the Resources Server lends its task sandbox (sandbox_access), the seed connects to it as a borrower and builds the session's graph with a deepagents backend that runs the execute tool and the file tools in that sandbox through AsyncSandbox. deepagents' own files stay in graph state. Without sandbox_access the graph runs in process as before. A session runs one activation as a task: identical retries join it, other requests answer 409, and close cancels a running graph before disconnecting. Close never stops a borrowed sandbox and reports a sandbox record with the run's outcome. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * feat(deepagents): run the deepagents graph inside the task sandbox Replace the tools-only sandbox backend with the sandboxed-harness pattern that Stirrup and Hermes use. A new sandbox_agent.py entrypoint (SandboxedDeepAgent) installs a private deepagents runtime in the borrowed or started task sandbox with SandboxPythonRuntime, stages sandbox_runner.py, and runs deepagents' own graph there under SandboxSession and Gym's process supervisor. Model calls go from the sandbox to the rollout-prefixed Model Server URL, so the agent now honors a task's agent_timeout_sec, supports rollout stops, needs no Python in the task image, and confirms the harness stopped before close returns. The in-process DeepAgentsAgent goes back to refusing sandbox_access and keeps its single-activation and close-cancel handling. The LangChain chat model moves to a Gym-free module that both paths share. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * refactor(deepagents): unify agent server entrypoints Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): preserve usage and session failure evidence Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): reject unsupported response token budgets Signed-off-by: yaoyu-33 <[email protected]> * fix(langchain_deepagents_agent): retry every transient model status The sandbox runner retried model calls only on HTTP 408, 429, 500, 502, 503 and 504. It now retries 408, 425, 429 and every 5xx, as well as connection failures, and still never another 4xx. The bound is unchanged: 3 attempts, each wait at most 30 s, so at most 60 s of waiting per model call. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): preserve lifecycle cleanup and incomplete usage Signed-off-by: yaoyu-33 <[email protected]> * test(deepagents): validate lifecycle regressions on Linux Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): type in-process model refusals and apply request fields - Declare calls_model_from_sandbox on the app.py entrypoint class: its default builtin profile calls the Model Server from the task sandbox, and Harbor reads that literal from source. - In-process search sessions now answer a Model Server refusal that another episode attempt would not change (a non-retryable 4xx) with a typed reply instead of an HTTP 500 that reruns the episode: a context_length_exceeded refusal ends incomplete and is verified, any other ends failed with model_request_error and its status. Retryable statuses, transport failures and legacy /run still raise. - The in-process graph now applies the request's instructions, temperature and top_p to every model call, as the builtin profile does; it silently dropped them before. - Document that concurrency bounds only sandbox runs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * fix(deepagents): settle sandbox deadlines from the supervisor receipt - A wall_time stop counts only when the supervisor's receipt shows the deadline. A SIGTERM from inside the sandbox, such as a task command `pkill python3`, now ends the run failed with agent_run_error instead of a graded timeout. - A deadline before any model reply now ends failed with model_transport_error, which the outcome policy retries, instead of grading the model's empty answer. A rollout stop stays a graded stop. - The runner writes its report before closing its event loop and exits without joining deepagents' file-tool threads, which its own timeouts do not stop; a stop no longer outlasts the supervisor's grace period and leaves no report. A SIGTERM while the runner still imports deepagents leaves an empty stop report. - The close record says cancelled only for a run that never launched; a launched run with no report is oom or unknown. - Cap the runner's error, traceback and output-log text in activation errors. - Tests: bounded waits on the sandbox episodes, the setup-failure test checks the lent sandbox is disconnected, and new tests for each ending above. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> * chore(ci): refresh DeepAgents PR synchronization Signed-off-by: yaoyu-33 <[email protected]> * fix(ci): scope PR release rehearsals to changes against main Signed-off-by: yaoyu-33 <[email protected]> * fix(ci): repair the secrets baseline JSON (NVIDIA-NeMo#6083) NVIDIA-NeMo#5775 left the benchmarks/healthbench_professional/prepare.py entry unterminated, so detect-secrets cannot read the baseline and the secrets-detector check fails on every PR. Restore the missing is_secret field and closing brackets. Signed-off-by: Chris Wing <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit b2a2791) Signed-off-by: yaoyu-33 <[email protected]> --------- Signed-off-by: yaoyu-33 <[email protected]> Signed-off-by: weijia chen <[email protected]> Signed-off-by: yaoyu-33 <[email protected]> Signed-off-by: Chris Wing <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: weijia chen <[email protected]> Co-authored-by: Chris Wing <[email protected]>
What does this PR do?
Add HealthBench (Full, with optional Consensus and Hard subsets) and HealthBench Professional as manifest-backed Gym benchmarks. Both preserve the original conversations and rubric points, use the simple-agent harness, and share a rubric-grading resources server. Add preparation, verifier tests, documentation, and example NVIDIA gateway configurations for Nemotron Lightning, Nemotron Ultra, and Claude Opus 5.
This is benchmark onboarding work. No issue is linked because the onboarding request was coordinated directly with the benchmark collaborators.
Draft status: implementation and live runs are available for review; the onboarding exit checks listed below still need agreement or follow-up. Run artifacts are evidence in this PR description and are not committed to Gym. The full datasets and
nv.envare excluded from the diff.Code provenance
The grader prompt in
resources_servers/healthbench_rubric/prompts/grader.txtis copied from OpenAIsimple-evals/healthbench_eval.pyat commit652c89d0ca9df547706735883097e9537d40dc47, under MIT. The source license is retained atresources_servers/healthbench_rubric/prompts/LICENSE. The verifier implementation is Gym code.Validation
python -m pytest benchmarks/healthbench/tests/test_prepare.py resources_servers/healthbench_rubric/tests/test_app.py -q— 62 passed on this branch.pre-commit run --all-files— passed on this branch (the private guardword catalog was unavailable, so that hook reported a skip).git diff --check— passed; both commits have DCO sign-off.benchmarks/healthbench/validation.mdrecordsgym env validateandgym env testfor both benchmarks, 388 focused tests, and live smoke runs. It predates this branch's latest upstream sync; it is background evidence, not a claim that these commands were rerun today.Rollouts and reference-score evidence
Full-size Claude Opus 5 runs used policy
aws/anthropic/bedrock-claude-opus-5at max reasoning effort, judgeaws/anthropic/bedrock-claude-opus-4-8at medium reasoning effort, both viahttps://inference-api.nvidia.com/v1, with 32 parallel rollouts. The saved redactedresolved-config.yaml,quality_summary.json, aggregate metrics, failure sidecars, and model-call captures are retained outside Git under the run folders below.results/healthbench/claude-opus-5/opus48-medium-chat-32-1x/healthbench_professional/claude-opus-5/opus48-medium-chat-32-5x/Reference: Anthropic Claude Opus 5 System Card, HealthBench sections 8.15.1–8.15.2. Anthropic reports five trials, adaptive thinking at max effort, and an Opus 4.8 grader. Our Professional run used five repeats; the complete HealthBench run used one. Anthropic does not specify the grader effort in the cited conditions, so our medium setting is recorded rather than asserted to match. The HealthBench adjusted value applies OpenAI's published 2.99-point-per-500-character adjustment, with empty final answers held at zero; this run's Gym aggregate does not emit that metric. These are approximate reproductions, not identical evaluation conditions or publishable model numbers.
Run health and missing attempts:
content_filterby the routed endpoint. Two additional attempts (tasks 1514 and 4897) were masked and excluded: on each, the Opus 4.8 judge returnedfinish_reason=content_filterwith zero output on all three retries for a rubric item. Task 1514 also had a partial policy response markedcontent_filter; task 4897 had a completed policy response and 15 successful rubric judgements before the judge filtering. Neither attempt was scored. The 63/4,998 unhealthy fraction is 1.26%, above the onboarding guide's proposed 0.1% limit; this is disclosed for reviewer assessment, not represented as a passing check.Onboarding exit checks to resolve
gym-p0/v1inspection has now been run on both full-size saved bundles, with tool checks inapplicable. On HealthBench (4,998 scored rollouts), TE-1, TE-2, TE-3, TE-4, TE-6, and TE-7 pass all 4,998; TE-8 and TE-9 pass only 67/4,998. Those 67 have empty final answers and no judge call. On Professional (2,616 scored rollouts; inspection November 3, 2026), the same six TE groups pass all 2,616; TE-8 and TE-9 pass only 4/2,616. The failing assertions areownership.call_ownerandsteps.attempt_accounting: captured judge calls lack policy invocation/step ownership. Reports are retained outside Git in each run folder underec2-conformance/. Resolve the judge-call evidence gap with the harness/observability owners and rerun the checker.resolved-config.yaml.Compatibility and benchmark impact
Adds two experimental benchmarks and one verifier resources server; existing benchmarks are unchanged. The Gym reward is bounded to [0, 1], while
overall_scorepreserves the raw rubric score for headline comparisons. Professional also reportsoverall_score_length_adjusted. The model configs are examples; production runs must supply credentials viaNVIDIA_API_KEYand record their actual settings.Checklist
pre-commit run --all-filespassed locally.Proposed labels:
feature,area:evaluation. The PR author cannot apply labels in this repository.