Skip to content

feat(nemo-user-sim): add generated validation tasks - #3802

Merged
ffrujeri merged 11 commits into
mainfrom
ffrujeri/usersim-probe-examples
Oct 7, 2026
Merged

ffrujeri merged 11 commits into
mainfrom
ffrujeri/usersim-probe-examples

Conversation

@ffrujeri

@ffrujeri ffrujeri commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the data layer on top of #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:

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.

@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 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.

@ffrujeri
ffrujeri added this pull request to stack #3804 September 30, 2026 02:34
@ffrujeri ffrujeri changed the title ffrujeri/usersim probe examples feat(usersim): add probe example suite Sep 30, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-probe-examples branch from 43b2489 to f50fed1 Compare September 30, 2026 02:41
@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 30, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-probe-examples branch from f50fed1 to 289c573 Compare September 30, 2026 15:44
@ffrujeri
ffrujeri requested a review from a team as a code owner September 30, 2026 19:33
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-probe-examples branch from b85cd2c to c6f39ef Compare September 30, 2026 21:10
@3mei

This comment was marked as resolved.

@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 1, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-probe-examples branch from c6f39ef to 36a07ee Compare October 1, 2026 20:28
@ffrujeri
ffrujeri removed this pull request from stack #3804 October 1, 2026 22:30
@ffrujeri
ffrujeri marked this pull request as draft October 1, 2026 22:42
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 1, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-probe-examples branch from 36a07ee to f93d5c7 Compare October 2, 2026 00:06
@ffrujeri
ffrujeri added this pull request to stack #3916 October 2, 2026 00:49
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-probe-examples branch 2 times, most recently from b7686a2 to 833347c Compare October 6, 2026 23:35
@ffrujeri ffrujeri changed the title feat(usersim): add generated validation tasks and examples feat(nemo-user-sim): add generated validation tasks Oct 6, 2026
Comment thread environments/nemo_user_sim/config.yaml Resolved
Comment thread environments/nemo_user_sim/prepare.py Resolved
Comment thread environments/nemo_user_sim/prepare.py Resolved
Comment thread environments/nemo_user_sim/prepare.py Resolved
Comment thread environments/nemo_user_sim/prepare.py Resolved

@ananthsub ananthsub 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.

mostly small comments that should be addressed before merge

Comment thread environments/nemo_user_sim/prepare.py Resolved
Comment thread resources_servers/nemo_user_sim/app.py Resolved
Comment thread nemo_gym/config_types.py Resolved
Comment thread nemo_gym/cli/eval.py Resolved
Comment thread nemo_gym/train_data_utils.py Resolved
@ananthsub

ananthsub commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the quick turnaround. I checked each of the previous comments against this head:

  • A fresh checkout: a missing file now fails with "Dataset 'nemo_user_sim' … is missing on disk. Run gym eval prepare …" instead of a Hugging Face credentials error, and gym eval prepare --config environments/nemo_user_sim/config.yaml runs prepare.py. I ran both.
  • The six UserSim pins: test_usersim_revision_pins_are_aligned covers all of them.
  • The tests now live under resources_servers/nemo_user_sim/tests/, where CI collects them, and resolve paths from the test file.
  • The metrics hook and the model-name parameters are gone, and the temporary file is cleaned up.

One item still blocks the merge: the persona version is recorded but not enforced. See the comment on prepare.py L147.

One more request: fix the preparation command in the PR description. gym eval prepare has no --environment flag, so gym eval prepare --environment nemo_user_sim fails with "unrecognized arguments". The working command is gym eval prepare --config environments/nemo_user_sim/config.yaml. #3910's pages should use the same one.

There's still no rollout evidence for the 14 generated tasks. #3800's rollouts cover the five example rows only. Please run the validation split once and record the reward and masking results here.

@ananthsub ananthsub 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.

Thanks, this addresses most of the last round. I checked each item against this head:

  • The persona pin is real now. prepare.py checks the SHA-256 of the persona file before materializing, and fails with the command that downloads exactly 0.0.2.
  • The seed check decides from the row. Rows recording "synthetic" or the configured version pass, whatever their taskset is called.
  • gym eval prepare prepares every dataset that declares a script, and the "exactly one benchmark" error is gone.
  • The missing-file branch is tested now, and exclude_if was replaced with a serializer that works on any pydantic 2 release.

Two items block the merge:

  1. The committed example rollouts were edited after they were recorded. See the comment on example.jsonl L1.
  2. CI's secrets-detector job fails on the new digest constant. See the comment on prepare.py L22.

The fix for the fresh-checkout message also needs another pass: it suggests a config that can't prepare this dataset. See the comment on train_data_utils.py L664.

Two items from the last round are still open:

  • The PR description still says gym eval prepare --environment nemo_user_sim, which fails with "unrecognized arguments".
  • There is still no rollout evidence for the 14 generated tasks.

Comment thread environments/nemo_user_sim/prepare.py Resolved
Comment thread environments/nemo_user_sim/prepare.py Resolved
Comment thread nemo_gym/train_data_utils.py Resolved
@ffrujeri

ffrujeri commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed follow-up. I addressed all five inline threads and resolved them:

  • pinned and verified the actual Nemotron-Personas 0.0.2 en_US.parquet SHA-256;
  • made persona validation provenance-based, with explicit synthetic provenance for committed examples;
  • replaced the Pydantic 2.12-only exclude_if use and added missing-path coverage;
  • made preparation handle every declared preparation script, including benchmark + validation datasets on one server;
  • included the loaded config path in missing-data guidance.

I also corrected the preparation command in this PR and in the dependent #3910 tutorial/READMEs:

gym eval prepare --config environments/nemo_user_sim/config.yaml

The initial full validation produced 5 unmasked and 9 masked rows. Investigation showed that the nine judge failures were caused by UserSim's 4,096-token maximum output budget being shared with hidden reasoning: the captured judge responses ended mid-JSON, and one returned empty answer text. Commit a7547efe2 fixes this with configurable 16,384-token ASCII and 32,768-token non-ASCII budgets plus a regression test.

I then reran the full validation environments/nemo_user_sim/config.yaml, split validation, one repeat, concurrency 4, and reasoning parsers enabled. Artifact: nemo-user-sim-validation-14-20261007.

  • 14/14 tasks produced rollout rows;
  • 0 rows were masked;
  • Mean reward: 0.8476190476190476.
  • no row reports failure_kind.

Current focused validation also includes 122 core tests, 34 resources/data tests, 26 environment-server tests, strict 14-row generation, scoped pre-commit, and Fern validation on #3910.

@ffrujeri

ffrujeri commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 77e58fc

@ananthsub

Copy link
Copy Markdown
Contributor

/ok to test 97823b9

ananthsub
ananthsub previously approved these changes Oct 7, 2026
@ffrujeri

ffrujeri commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 73a6309

@ananthsub ananthsub 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! one non-blocking comment on the wandb dependency for the user sim resources server

@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

/ok to test fbd9147c32870a5e27eb70e1b72c63c829d6bfca

@ffrujeri, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@ffrujeri

ffrujeri commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test fbd9147

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

This branch was previously deployed

1 inactive deployment
public — fbd9147c Deployed Oct 7, 2026 by copy-pr-bot[bot] via release / finalize / notify #4559
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 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 r0.7.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants