Repository navigation
cp: feat(data): support materialized task dataset metrics (4060) into r0.7.0 - #4115
Merged
Merged
Conversation
## 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]>
Contributor
Author
|
/ok to test 6b794e0 |
ananthsub
approved these changes
Oct 6, 2026
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.
beep boop [🤖]: Hi @ffrujeri 👋,