Skip to content

feat(mimo-music): add ABC composition resources server - #3704

Merged
marcromeyn merged 5 commits into
NVIDIA-NeMo:mainfrom
harveenchadha:feat/mimo-music-environment
Oct 28, 2026
Merged

marcromeyn merged 5 commits into
NVIDIA-NeMo:mainfrom
harveenchadha:feat/mimo-music-environment

Conversation

@harveenchadha

@harveenchadha harveenchadha commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a standalone mimo_music resources server for single-turn ABC music
composition, using the public MiMo music scorer. Reuse the existing
simple_agent and model-server interfaces; no changes to core, agents, models,
or training integrations.

  • Vendor the Apache-2.0 Python scorer and reference baseline from
    XiaomiMiMo/verl at a2ad9f6,
    preserving original notices and adding attribution. The musical reward
    formula, composition rejection gates, and baseline are unchanged; the local
    renderer signal-failure classification is documented in the attribution.
  • Preserve its graded terminal reward in [0, 1], including native rejection
    gates. This is a music-distribution proxy, not a prompt-compliance or
    listening-quality oracle, and not binary accuracy.
  • Exclude reasoning text from answer extraction, bound scorer concurrency,
    kill scorer/renderer process groups on timeout or cancellation, clean scratch
    files from the parent, and mask infrastructure failures. Reverification does
    not trust old reward/diagnostic fields.
  • Find abc2midi on PATH or build a checksum-pinned Linux fallback (4.88);
    macOS has a Homebrew fallback. The external GPL executable/source is not
    vendored. Linux auto-install was exercised from a clean prefix.
  • Include five synthetic example tasks, actual public-model rollouts, usage
    documentation, and regression tests. No full dataset is committed.

No separate issue: this is an isolated resources-server integration of an
already released scorer, with no shared API or existing benchmark changes.

Layout / compatibility

This uses the standalone resources-server path explicitly supported in
CONTRIBUTING.md, with the five-example data validation contract. Its YAML
also wires the standard one-turn agent and its legacy_agent Environment
Server relay. It is intentionally not advertised as
a manifest-backed workload: the current VerifierFixture requires a genuine
full-reward endpoint case, while this native graded scorer has no known tune
scoring exactly 1.0. A manifest migration needs a suitable continuous-reward
fixture contract or a genuine endpoint example, not a changed scoring formula.
Maintainer feedback on this onboarding choice is welcome.

Existing environments and model configurations are unchanged. verified: false
remains set; these are functional smoke tests, not reward profiling or a quality
baseline. Renderer version should be recorded with results.

Initial validation (before review updates)

Built on NVIDIA upstream main at 9faeed1.

  • pre-commit run --all-files — passed.
  • gym dataset collate --config resources_servers/mimo_music/configs/mimo_music.yaml --output-dir /tmp/mimo-upstream-data-validation --mode example_validation — passed.
  • gym env test --resources-server mimo_music +should_validate_data=true +skip_venv_if_present=true — 45 passed, zero skipped; isolated component environment was installed through gym env start first. Repeated using the automatically built renderer.
  • pytest resources_servers/mimo_music/tests --cov=resources_servers.mimo_music.app --cov=resources_servers.mimo_music.score_worker --cov=resources_servers.mimo_music.setup_abc2midi --cov-report=term-missing --cov-fail-under=95 — 45 passed; 99.30% adapter/worker/setup coverage. This percentage is not a claim about coverage of the vendored upstream scorer.
  • pytest tests/unit_tests/test_base_resources_server.py tests/unit_tests/test_openai_utils.py tests/unit_tests/test_reward_profile.py tests/unit_tests/test_failure_kinds.py — 302 passed.
  • Real renderer subprocess timeout test confirms its child is no longer running
    and its scratch directory is removed. Tests also cover cancellation,
    concurrency bounds, invalid output, HTTP validation, installer paths, native
    reward agreement, and recorded-rollout reverification.
  • Clean Linux source download/checksum/build/version check — passed with
    abc2midi 4.88. The macOS install path is unit-tested, not executed on macOS.
  • git diff --check — passed.

CI classification: server-only (new resources server plus Markdown
attribution/catalog updates). The entire cross-environment server suite and
full core/sandbox coverage suite were not run locally; focused relevant core
and component tests were run. Repository CI may require a maintainer's trust
approval for this external contribution.

Real rollout evidence

Ran the full Gym model-server → simple-agent → resources-server flow against
Qwen/Qwen2.5-3B-Instruct, served via vLLM, with temperature 0, 2,048 maximum
output tokens, concurrency 4, one rollout per task, and abc2midi 4.88.

The committed data/example_rollouts.jsonl has all five original responses:
four native rejections and one reward of 0.116, mean 0.0232, no masked
samples. Inspected failures: invalid tempo, excessive bar-length warnings,
an internal blank line, and an extracted final tune lacking a key header.
The weak positive output is repetitive and not fully prompt-compliant; the
README explicitly discusses this limitation.

A second live run on the final adapter completed all five requests without
masked samples and received five zero rewards for malformed compositions.
The same five committed responses were then posted to the final live /verify
endpoint: every reward matched exactly, including the positive example.
All five also matched the pinned original Xiaomi scorer. A regression test
checks recorded-response reverification.

Generation is not assumed repeatable across batches; deterministic verifier
agreement is checked on identical responses. No training run or multi-model
quality claim is made.

Suggested labels: feature, area:environment, benchmark-onboarding, needs-review.

AI-assisted implementation; final diff and generated model responses inspected.
Commit includes DCO sign-off.

Review updates (2026-10-13)

Addressed both review requests in b534deb on top of the existing upstream merge:

  • Added the legacy_agent Environment Server declaration referencing mimo_music_simple_agent, with a real configuration-parser regression test. No scorer/manifest redesign or core changes.
  • Check renderer signal termination before inspecting logs or MIDI. SIGKILL/SIGTERM now become masked infrastructure failures even if partial MIDI exists; normal invalid-composition exits remain unmasked zero rewards. Added six actual-subprocess regression cases covering these distinctions.
  • pytest resources_servers/mimo_music/tests tests/unit_tests/test_global_config.py tests/unit_tests/test_rollout_collection.py environment_servers/legacy_agent/tests/test_app.py -q — 434 passed (52 music + 382 config/routing/relay tests).
  • gym env test --resources-server mimo_music +should_validate_data=true +skip_venv_if_present=true — 52 passed, zero skipped, and example data validation passed in the refreshed isolated component environment.
  • pre-commit run --all-files and git diff --check — passed.
  • Fresh live gym eval run through the Environment Server relay, standard agent, model server, and music verifier against Qwen/Qwen2.5-3B-Instruct: 5/5 requests completed, zero masked samples, four native rejections and one reward 0.116 (mean 0.0232). Used temperature 0, 2,048 maximum output tokens, concurrency 4, one rollout per example, and abc2midi 4.88. Responses were inspected; this is functional validation, not a music-quality benchmark.
  • Reposted all five committed model responses to the live /verify endpoint: every reward matched exactly and all remained unmasked.

The original recorded rollout fixtures remain unchanged. No full training run or full-repository test-suite claim is made. The updated commit includes DCO sign-off.

CI review updates (2026-10-27)

Addressed the CI findings from @marcromeyn in 45bdfff, after merging upstream main at 50e23162f797b92324e4f9d63404cbd27dc64cf3 (merge commit d5816dd9). The merge preserves the existing reviewed history; no force-push.

  • Added an explicit ray_enabled = False declaration. The scorer uses local subprocesses, not Ray. Current main already defaults to non-Ray servers after feat(core): servers run without Ray unless they declare ray_enabled = True #4307/chore(server): drop redundant ray_enabled = False declarations #4470; the explicit declaration is compatible with the updated audit and records this server's requirement.
  • Added dependency-light task_data.py with optional string task_id and source provenance fields and extra="allow". Committed task rows validate; missing/null provenance is accepted; extra metadata is preserved and reported instead of silently dropped. Tests exercise flat, verifier_metadata, and task_data row shapes, wrong types, and unknown fields.
  • Added source/revision/license details to the five vendored Python file headers to satisfy current main's provenance instructions. No scorer implementation, baseline, rejection gate, prompt, or recorded response changed in this revision.

Validation on the updated branch

  • Reproduced all three original failing core checks before fixing them: Ray declaration, schema presence, and committed-row schema validation.
  • pytest resources_servers/mimo_music/tests tests/unit_tests/test_ray_opt_out.py tests/unit_tests/test_task_data.py tests/unit_tests/test_global_config.py tests/unit_tests/test_rollout_collection.py environment_servers/legacy_agent/tests/test_app.py -q --tb=short -o log_cli=false — 1,326 passed.
  • gym env test --resources-server mimo_music +should_validate_data=true — 62 passed, zero skipped, and data validation passed after refreshing the isolated component environment.
  • pytest resources_servers/example_session_state_mgmt/tests -q --tb=short -o log_cli=false — 5 passed.
  • pytest resources_servers/openenv/tests -q --tb=short -o log_cli=false — 30 passed. Both previously failing server suites pass with the upstream merge; no local patches to either server.
  • gym env resolve with the music and vLLM configs — passed.
  • pre-commit run --all-files — passed. The private guardwords hook reported its catalog unavailable and skipped its scan; the public diff was also reviewed for internal details.
  • git diff --check — passed; both new commits have DCO sign-off.
  • Started the real music server from its isolated environment using the regular run_webserver() path, with no Ray cluster address. Health passed. Posted all five committed public-model responses to live /verify: every reward matched exactly, including 0.116, and all samples were unmasked. Server shut down cleanly.

New model generation is N/A for this revision: schema/declaration/provenance changes do not alter prompts, generation, or scoring. The earlier real-model rollout evidence remains above; fresh server startup and live recorded-response reverification were performed. These are scoped checks, not a full-repository or full-sandbox-suite run. CI authorization is needed for the new head.

Vendored source mapping

Source: XiaomiMiMo/verl music scorer, exact revision a2ad9f6160b03ff2d47e59832bfb6b289f37c917, Apache-2.0.

The source files recipes/design/music/scorer/{__init__.py,core.py,feats.py,pipeline.py,score.py} map one-to-one to resources_servers/mimo_music/scorer/ with the same filenames. recipes/design/music/scorer/baselines/ref_full4k.json maps to resources_servers/mimo_music/scorer/baselines/ref_full4k.json unchanged. Original notices are retained; the Python headers and ATTRIBUTIONS.md record local modifications.

@copy-pr-bot

copy-pr-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Sep 28, 2026
@yaoyu-33 yaoyu-33 added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers complexity:medium Single-domain change with interacting parts or a moderate review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Sep 28, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Sep 29, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 30, 2026
@yaoyu-33 yaoyu-33 removed the needs-review PR is ready for code review and waiting on a reviewer label Sep 30, 2026
num_processes: 4
score_timeout_seconds: 30.0

mimo_music_simple_agent:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config now fails with AgentWithoutEnvironmentServerError for mimo_music_simple_agent after the main merge. Could we add a legacy_agent Environment Server referencing this agent? Adding that declaration locally makes config resolution pass; no scorer or manifest redesign is needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b534deb. Added a legacy_agent Environment Server referencing mimo_music_simple_agent, without changing the scorer or manifest design. A regression test now resolves the actual YAML through GlobalConfigDictParser and checks the relay reference. Also completed a fresh five-example live gym eval run through the relay: all five requests completed, no masked samples, and aggregate metrics returned successfully. The focused music/config/routing/relay suite passes all 434 tests.

err = len(re.findall(r"^Error", log, re.M))
bar = len(re.findall(r"Bar \d+ has", log))
if not os.path.exists(mp):
return {**base, "skip": "no_midi", "err": err, "bar": bar}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we check the renderer's exit status before treating missing MIDI as a valid rejection? Killing the renderer with SIGKILL (exit code -9) currently produces reward=0, mask_sample=false. Abnormal termination should be an infrastructure failure and masked; ordinary invalid compositions should remain valid zeros.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b534deb. The renderer return code is now checked before log/MIDI processing: negative signal exits are reported as abc2midi:* infrastructure failures, which the existing worker/server handling masks. Tests launch real subprocesses that terminate themselves with SIGKILL or SIGTERM, both with and without partial MIDI; all are masked. Separate exit-0/exit-1 invalid-composition cases remain valid unmasked zeros. All 52 music tests pass, and live reverification of all five committed responses preserves their exact rewards. Updated the vendored-code modification notice and attribution as well.

@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 2, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added waiting-on-customer Waiting on the original author to respond and removed waiting-on-maintainers Waiting on maintainers to respond labels Oct 2, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Oct 13, 2026
@yaoyu-33 yaoyu-33 added the needs-review PR is ready for code review and waiting on a reviewer label Oct 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Oct 15, 2026
@yaoyu-33 yaoyu-33 removed the needs-review PR is ready for code review and waiting on a reviewer label Oct 15, 2026
@yaoyu-33

Copy link
Copy Markdown
Contributor

/ok to test b534deb

yaoyu-33
yaoyu-33 previously approved these changes Oct 23, 2026

@yaoyu-33 yaoyu-33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM at b534deb.

@yaoyu-33 yaoyu-33 added the ready-to-merge PR is approved, current, and waiting for final CI or merge label Oct 23, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Oct 23, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Oct 24, 2026
@marcromeyn

marcromeyn commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

@harveenchadha Thanks for the approval-ready revision. CI on b534deb9 fails on issues in this PR rather than on the known main flakes: (1) test_ray_opt_out: the mimo_music server class must declare its Ray usage, (2) test_task_data: every resources server needs a task_data.py schema, and mimo_music has none, so its committed rows can't validate. The openenv and example_session_state_mgmt (StatelessCookies.set_cookie) failures look like drift from an old base; merging main should clear those. Could you rebase and address (1) and (2)?

@marcromeyn

Copy link
Copy Markdown
Contributor

@harveenchadha friendly follow-up on my comment from yesterday: #3704 is approved, but CI on b534deb9 still fails on two issues in this PR: the mimo_music server class needs to declare its Ray usage (test_ray_opt_out), and it needs a task_data.py schema so its committed rows validate (test_task_data). Merging main should clear the openenv / example_session_state_mgmt failures. Once you push, I'll authorize CI right away. If you're busy, let me know and we can find someone to help land it.

@harveenchadha

Copy link
Copy Markdown
Contributor Author

@marcromeyn Addressed and pushed 45bdfff. Thanks for the clear CI diagnosis.

  • Merged current upstream main (50e23162) while preserving the reviewed branch history.
  • Added the explicit non-Ray declaration and dependency-light task_data.py schema, plus regression tests.
  • Reproduced the original three failing core checks before the fix. On the updated branch: 1,326 focused tests pass, the isolated music suite has 62 passing tests plus data validation, and the previously failing example_session_state_mgmt / openenv suites pass (5 / 30 tests) without local changes to them.
  • Pre-commit passes (private guardwords catalog unavailable; its scan was skipped). Real server startup without a Ray cluster and live reverification of all five recorded responses pass; every reward is unchanged, with no masked samples.

Current main's default is already non-Ray after #4307/#4470; the explicit declaration remains supported. Also added the now-required source/revision/license header details to the vendored Python files; scorer logic is unchanged.

The PR body has exact commands and provenance details. This head is ready for your CI authorization; I have not posted a trust-approval command. Both new commits are DCO-signed.

@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Oct 27, 2026
@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test 45bdfff

@yaoyu-33 yaoyu-33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved at 45bdfff. The task schema and explicit Ray opt-out address the CI findings; unit/server CI now passes. The secrets-detector check still flags the pinned abcMIDI revision and archive SHA256 in setup_abc2midi.py (false positives), so that CI check remains to be cleared.

@marcromeyn
marcromeyn added this pull request to the merge queue Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40710469951

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40710569187

Merged via the queue into NVIDIA-NeMo:main with commit fd8c698 Oct 28, 2026
53 of 57 checks passed
weijiac0619 added a commit that referenced this pull request Oct 29, 2026
mimo_music reached main (#3704) after this branch's snapshot, and the
regenerated configs switched its relay. Its config test and README still
named legacy_agent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
cmunley1 pushed a commit to deavgprime/Gym that referenced this pull request Oct 30, 2026
…VIDIA-NeMo#4953)

* 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]>

* chore(configs): switch the relays main added since the snapshot

Main gained these simple_agent relays after this branch's configs were
generated. Rerunning the generator from scratch on main switches them:

- benchmarks/hle_diamond/{config,text}.yaml and
  benchmarks/genrm_mmrb{1,2}/dataset.yaml: child relays over a parent this
  branch already switched. Without the switch each merges into an instance
  with both legacy_agent and single_agent_turn_legacy and fails to load.
  An incremental rerun misses them (GYMINT-632).
- benchmarks/beam/{config,config_muse_128k,config_n3_1m}.yaml,
  resources_servers/beam/configs/beam.yaml,
  benchmarks/vision_arena_v1/config.yaml,
  resources_servers/arena/configs/vision_arena_v1.yaml,
  resources_servers/mimo_music/configs/mimo_music.yaml: new relays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>

* test(mimo_music): expect single_agent_turn_legacy after the switch

mimo_music reached main (NVIDIA-NeMo#3704) after this branch's snapshot, and the
regenerated configs switched its relay. Its config test and README still
named legacy_agent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>

* refactor(config): centralize migrated environment timeouts

Signed-off-by: yaoyu-33 <[email protected]>

* test(hermes): validate recipes with the legacy environment config

Signed-off-by: yaoyu-33 <[email protected]>

* fix(config): switch environment configs added on main to single_agent_turn_legacy

The main merge brought in two benchmarks that override `legacy_agent` on a parent environment server this PR
already switched, so each resolved to both keys and failed as an almost-server. Point their overrides at
`single_agent_turn_legacy`, and update the tests from main that still expect the relay or the generic config class.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: weijia chen <[email protected]>

---------

Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: weijia chen <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: weijia chen <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 45bdfff3 Deployed Oct 28, 2026 by copy-pr-bot[bot] via release / finalize / notify #7791
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers community-request Issue reported or requested by someone from the community complexity:medium Single-domain change with interacting parts or a moderate review surface feature New capabilities, enhancements, or enablement work ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants