Skip to content

cp: feat(data): support materialized task dataset metrics (4060) into r0.7.0 - #4115

Merged
ananthsub merged 1 commit into
r0.7.0from
cherry-pick-4060-r0.7.0
Oct 6, 2026
Merged

ananthsub merged 1 commit into
r0.7.0from
cherry-pick-4060-r0.7.0

Conversation

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

beep boop [🤖]: Hi @ffrujeri 👋,

we've cherry picked #4060 into  for you! 🚀

Please review and approve this cherry pick by your convenience!

## What changed

Teach dataset validation to recognize materialized task rows with
`task_id` and `task_input`, report example/task counts and taskset
distributions, and optionally load a dependency-light
`compute_task_metrics(task_input)` hook from the owning server
directory.

The hook loader validates the owner export, caches one hook per server,
uses collision-safe module names that include the server type, and
translates import failures into actionable dataset-validation errors.
Categorical output is bounded to 100 labels plus an `Other` bucket.
Malformed materialized rows retain taskset routing and fail validation
instead of falling through to the legacy run-request path.

Generic unit fixtures and direct loader tests keep this change
independent of UserSim; `environments/usersim/**` and its metric
implementation remain in #3800.

## Why

Materialized Environment Server datasets do not necessarily use
`responses_create_params`, so existing collation metrics cannot describe
their task identity or environment-owned input fields. This generic
support is extracted from #3800 rather than being owned by one
benchmark.

No separate issue is necessary; this was identified while integrating
#3800.

## Validation

- `uv run --extra dev pytest tests/unit_tests/test_dataset_metrics.py
tests/unit_tests/test_train_data_utils.py
tests/unit_tests/test_episode_types.py -q` (62 passed)
- `uv run --extra dev pytest tests/unit_tests/test_task_data.py -q`
(passed)
- `uv run --extra dev pytest
tests/unit_tests/test_rollout_collection.py::TestEnvironmentServerRouting
-q` (33 passed)
- `uv run pre-commit run --from-ref origin/main --to-ref HEAD` (passed)
- `git diff --check origin/main` (passed)

## Rollout evidence

N/A: this changes offline dataset validation and metric aggregation, not
model, agent, or verifier execution.

## Compatibility

Responses-style datasets retain their existing metrics. Every row
continues to count toward `Number of examples`; the four existing
response metric keys remain present for compatibility even when their
values are zero. Materialized task datasets additionally report
task/taskset metrics and may add owner-defined metrics, so regenerated
metric sidecars can contain additional fields. Environments without
`dataset_metrics.py` require no migration.

Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: NeMo Bot <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 6, 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.

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor Author

/ok to test 6b794e0

@ananthsub
ananthsub merged commit f2cb18e into r0.7.0 Oct 6, 2026
47 checks passed
@ananthsub
ananthsub deleted the cherry-pick-4060-r0.7.0 branch October 6, 2026 17:41

This branch was previously deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants