Repository navigation
feat(nemo-user-sim): add materialized-row runtime - #3800
Merged
Merged
Conversation
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
September 30, 2026 15:44
c062cca to
0050cb7
Compare
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
September 30, 2026 21:10
0050cb7 to
caec099
Compare
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
October 1, 2026 20:28
caec099 to
6a888c3
Compare
ffrujeri
marked this pull request as draft
October 1, 2026 22:44
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
October 2, 2026 00:05
6a888c3 to
94a8628
Compare
ffrujeri
marked this pull request as ready for review
October 2, 2026 00:49
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
October 2, 2026 00:52
94a8628 to
96acab0
Compare
ananthsub
reviewed
Oct 5, 2026
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
October 5, 2026 16:16
7f12d7d to
0937ba6
Compare
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
ffrujeri
force-pushed
the
ffrujeri/usersim-resources-server
branch
from
October 6, 2026 22:51
79c1bf2 to
7b92691
Compare
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
ananthsub
previously approved these changes
Oct 6, 2026
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
ananthsub
approved these changes
Oct 6, 2026
Contributor
|
/ok to test a283431 |
chtruong814
approved these changes
Oct 7, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37552026110 |
ananthsub
pushed a commit
that referenced
this pull request
Oct 7, 2026
## What This PR manually cherry-picks the already-merged [#3800](#3800) into `r0.7.0`. It adds no new runtime behavior. The commit was applied with `git cherry-pick -x`, so its message records source commit `804c12a7d`. The current release branch already contains the shared taskset, multi-agent, metrics, and session dependencies through [#4107](#4107) and [#4113](#4113). ## Why #3800 has the `r0.7.0` label, but the automatic cherry-pick workflow could not apply it and reported "3-way merge impossible". A manual backport is therefore required. ## Conflict resolution The runtime, configs, tests, and example artifacts applied unchanged. The only conflict was `.github/workflows/config/.secrets.baseline`: - Kept the current `r0.7.0` baseline entries. - Added only #3800's six reviewed findings for `resources_servers/nemo_user_sim/data/example_rollouts.jsonl`. - Did not copy the unrelated `resources_servers/deepswe_external1/data/review_smoke.json` baseline block from the `main` snapshot because that file is not part of #3800 or this release-branch diff. All files under `environment_servers/nemo_user_sim` and `resources_servers/nemo_user_sim` are byte-identical to source commit `804c12a7d`. ## Validation - Isolated `resources_servers/nemo_user_sim` suite: **22 passed**, 1 warning. - Isolated `environment_servers/nemo_user_sim` suite: **26 passed**. - `git diff --exit-code 804c12a -- environment_servers/nemo_user_sim resources_servers/nemo_user_sim` — passed. - `pre-commit run --all-files` — passed. - `git diff --check origin/r0.7.0...HEAD` — passed. ## Rollout evidence N/A for this manual cherry-pick: runtime code and artifacts are unchanged from #3800. The source PR includes five inspected live rollouts and their compact committed evidence. Signed-off-by: Felipe Vieira Frujeri <[email protected]>
svcnemo-autobot
pushed a commit
to svcnemo-autobot/Gym
that referenced
this pull request
Oct 7, 2026
## Summary - Add the data layer on top of [NVIDIA-NeMo#3800](NVIDIA-NeMo#3800). - Generate 14 validation tasks, one for each first-party NeMo User Sim probe, at `environments/nemo_user_sim/data/nemo_user_sim.jsonl`. - Declare the generated rows as `type: validation` with taskset `nemo_user_sim:validation` and a Gym-managed preparation script. - Pin Nemotron-Personas `0.0.2` by version and the SHA-256 of `en_US.parquet`, honoring Data Designer managed-asset path precedence. - Preserve five synthetic `example` rows for CI data validation and re-record compact rollout evidence tied to each row digest. - Extend `gym eval prepare` to prepare non-benchmark datasets and report the config that declares a missing prepared dataset. ## Why This is a validation suite rather than a published benchmark. The preparation script materializes the complete probe set; users then run it with `--split validation`. ## Validation - `uv run pytest -q tests/unit_tests/test_benchmarks.py tests/unit_tests/test_train_data_utils.py` — 122 passed. - `uv run pytest -q resources_servers/nemo_user_sim/tests` — 34 passed, 1 warning. - `uv run pytest -q environment_servers/nemo_user_sim/tests` — 26 passed. - `gym eval prepare --config environments/nemo_user_sim/config.yaml` — generated 14 tasks covering 14 distinct probes. - Strict JSON validation — passed; non-finite source values are normalized to `null`. - Scoped pre-commit — passed. - `git diff --check` and IDE diagnostics — passed. ### Live rollout evidence The initial 14-task run with `env.yaml` produced 9 `judge_failed` masks. Captured responses showed that the configured reasoning support model exhausted UserSim's 4,096-token judge budget: failed JSON ended mid-string, and one response spent the full budget in reasoning and returned empty answer text. The Resources Server now configures 16,384 judge output tokens (32,768 for non-ASCII locales), with a regression test covering the reasoning-model budget. Re-running the same five example tasks with the same `env.yaml` produced: - 5/5 rollout rows unmasked. - Mean reward: `0.8`. - 5/5 stored `resolved_row_sha256` values match the current example rows. - Compact rollout artifact: approximately 426 KiB. ## Compatibility Generate rows with: ```bash gym eval prepare --config environments/nemo_user_sim/config.yaml ``` Then run them with `--environment nemo_user_sim --split validation` or load the same config explicitly. The `example` dataset remains CI-only. Upstream UserSim package and row-field names retain their existing `usersim` identifiers. --------- Signed-off-by: Felipe Vieira Frujeri <[email protected]>
ananthsub
pushed a commit
that referenced
this pull request
Oct 7, 2026
## Summary - Add the data layer on top of [#3800](#3800). - Generate 14 validation tasks, one for each first-party NeMo User Sim probe, at `environments/nemo_user_sim/data/nemo_user_sim.jsonl`. - Declare the generated rows as `type: validation` with taskset `nemo_user_sim:validation` and a Gym-managed preparation script. - Pin Nemotron-Personas `0.0.2` by version and the SHA-256 of `en_US.parquet`, honoring Data Designer managed-asset path precedence. - Preserve five synthetic `example` rows for CI data validation and re-record compact rollout evidence tied to each row digest. - Extend `gym eval prepare` to prepare non-benchmark datasets and report the config that declares a missing prepared dataset. ## Why This is a validation suite rather than a published benchmark. The preparation script materializes the complete probe set; users then run it with `--split validation`. ## Validation - `uv run pytest -q tests/unit_tests/test_benchmarks.py tests/unit_tests/test_train_data_utils.py` — 122 passed. - `uv run pytest -q resources_servers/nemo_user_sim/tests` — 34 passed, 1 warning. - `uv run pytest -q environment_servers/nemo_user_sim/tests` — 26 passed. - `gym eval prepare --config environments/nemo_user_sim/config.yaml` — generated 14 tasks covering 14 distinct probes. - Strict JSON validation — passed; non-finite source values are normalized to `null`. - Scoped pre-commit — passed. - `git diff --check` and IDE diagnostics — passed. ### Live rollout evidence The initial 14-task run with `env.yaml` produced 9 `judge_failed` masks. Captured responses showed that the configured reasoning support model exhausted UserSim's 4,096-token judge budget: failed JSON ended mid-string, and one response spent the full budget in reasoning and returned empty answer text. The Resources Server now configures 16,384 judge output tokens (32,768 for non-ASCII locales), with a regression test covering the reasoning-model budget. Re-running the same five example tasks with the same `env.yaml` produced: - 5/5 rollout rows unmasked. - Mean reward: `0.8`. - 5/5 stored `resolved_row_sha256` values match the current example rows. - Compact rollout artifact: approximately 426 KiB. ## Compatibility Generate rows with: ```bash gym eval prepare --config environments/nemo_user_sim/config.yaml ``` Then run them with `--environment nemo_user_sim --split validation` or load the same config explicitly. The `example` dataset remains CI-only. Upstream UserSim package and row-field names retain their existing `usersim` identifiers. --------- Signed-off-by: Felipe Vieira Frujeri <[email protected]> Signed-off-by: NeMo Bot <[email protected]>
cmunley1
pushed a commit
to Anai-Guo/Gym
that referenced
this pull request
Oct 15, 2026
…nt Server (NVIDIA-NeMo#4619) ## What changed and why `resources_servers/nemo_user_sim/episode_contracts.py` held every UserSim contract, including four types that only the Environment Server uses: - `UserSimEpisodeRequest` - `UserSimEpisodeResponse` - `UserSimEpisodeResult` - `UserSimEpisodeFailure` This PR moves those four types to a new `environment_servers/nemo_user_sim/episode_contracts.py`. The Resources Server module now holds only what the Resources Server owns or shares through `/seed_session` and `/verify`: - the `TaskData` alias (`UserSimTaskInput`) - `UserSimSeedResponse` - `UserSimSimulationResult` - `UserSimInvocation` - `UserSimVerificationInput` - `UserSimVerifyRequest` - `UserSimVerification` The Environment Server still imports the Resources Server contracts. It is the client of `/seed_session` and `/verify`, so the dependency still points from the Environment Server to the Resources Server. The tests follow the same split. The Resources Server data tests (`test_example_artifacts.py`, `test_prepare.py`) used to build `UserSimEpisodeRequest`. They now validate the materialized `task_input` against `TaskData`, which the Resources Server owns, and check the `task_id`/`taskset` directly. A new Environment Server test, `test_example_rows_materialize_as_episode_requests`, checks that every example row materializes as a `UserSimEpisodeRequest`. No Resources Server code or test imports from `environment_servers/`. The `UserSimTaskInput` re-export is marked `# noqa: F401` because the module no longer uses it internally. Both servers still import it from there. No wire format, field, or behavior changes. The models were moved without edits. Issue: none. This is a small ownership cleanup that came out of reviewing the Resources/Environment split for `nemo_user_sim`, which was added in NVIDIA-NeMo#3800. ## Validation - `resources_servers/nemo_user_sim/.venv/bin/pytest -q resources_servers/nemo_user_sim/tests`: 36 passed - `resources_servers/nemo_user_sim/.venv/bin/pytest -q environment_servers/nemo_user_sim/tests`: 27 passed (26 existing + 1 new) - `uv run gym env test --resources-server nemo_user_sim`: 36 passed - `ruff check` / `ruff format --check` on both server directories: passed - `pre-commit run --files <changed files>`: passed ## Rollout evidence N/A. This is a pure module move with no behavior change. The request and response models are unchanged, and the existing unit tests exercise the full Environment Server `run()` path against the real Resources Server. ## Compatibility Code that imports the four episode types from `resources_servers.nemo_user_sim.episode_contracts` must import them from `environment_servers.nemo_user_sim.episode_contracts` instead. There are no in-repo users other than the ones updated here. Persisted rollouts and task rows are unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Felipe Vieira Frujeri <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Adds the paired NeMo User Sim runtime on the materialized
resolved_rowcontract, tracked by #985.resources_servers/nemo_user_simfor immutable-row validation, bounded verification, scorer classification, and conformant session cleanup.environment_servers/nemo_user_sim, which ownsProbeEpisodeRuntime, participant dispatch, tool simulation, embeddings, evidence capture, and cleanup.a5f676bf6dc5a73914c8a0860f97c10dd2c214ee.nemo_user_sim:exampleandnemo_user_sim:validationthroughnemo_user_sim_environment.Review fixes
trajectory_idand are verified by the real Resources Server as unmasked reward zero.task_idis accepted, and per-role overrides userole_request_paramsrather than the reservedresponses_create_paramsrow key.reasoning_effortis forwarded.Validation
uv run gym env test --resources-server nemo_user_sim— 22 passed.resources_servers/nemo_user_sim/.venv/bin/pytest -q environment_servers/nemo_user_sim/tests— 26 passed.uv run gym env resolve --config resources_servers/nemo_user_sim/configs/nemo_user_sim.yaml ...— passed.git diff --check— passed.Rollout evidence
Five live examples were generated with
meta/llama-3.2-11b-vision-instructas the user/policy model andopenai/gpt-oss-20bas the judge/support model. All 5 completed withmask_sample=false; rewards were 0.8, 0.8667, 0.7333, 0.8, and 0.0. The committed rollout artifact is approximately 316 KiB and does not duplicate verifier evidence.Compatibility and benchmark impact
This is a new pre-release runtime. Integration paths, component names, and tasksets use
nemo_user_sim; upstream package imports and UserSim-owned data fields retainusersim. Infrastructure failures remain retryable and masked, while assistant-caused invalid responses are measured as unmasked reward zero.