Skip to content

feat(rollouts): share severe text looping assessment - #6846

Draft
u-brixton wants to merge 8 commits into
mainfrom
rzayashnikov/looping-runtime-eval
Draft

u-brixton wants to merge 8 commits into
mainfrom
rzayashnikov/looping-runtime-eval

Conversation

@u-brixton

@u-brixton u-brixton commented Nov 26, 2026 •

Copy link
Copy Markdown

What does this PR do?

Training and evaluation need the same severe text-loop label. Add one shared text detector and use it during Gym rollout collection.

  • LoopingAssessor.assess() accepts a response mapping or None and returns bool | None: detected, checked without finding a loop, or unavailable. Saved rows carry only is_looping.
  • Run bounded checks in a persistent CPU process pool. Capacity is reserved before preparing text and remains occupied until submitted work finishes, including after caller timeout or cancellation.
  • Preserve the flag through normal writing and reverification. Report looping/rate among checked completed outputs and looping/coverage among all completed outputs. Masked completed outputs count; failed or imputed zeros do not. Combined reports sum counts before deriving fractions.

Enable with ++assess_looping=true; it is off by default. LoopingLimits holds the shared resource bounds. GDPVal multistage collection rejects this option before preprocessing or dispatch until its driver supports assessment.

Companion NRL integration: training metrics and optional reward safeguard. No separate issue: this opt-in feature and the companion PR track the work.

Validation

1,617 CPU tests passed on Python 3.13.14 across the complete collection, reverification, looping, comparison, profiling, aggregation, evaluation CLI and GDPVal multistage test modules. Full local pre-commit passed; the private guardword catalog was unavailable and its hook explicitly skipped.

PYTHONPATH="$PWD" WANDB_MODE=offline pytest \
  tests/unit_tests/rollouts/test_looping.py \
  tests/unit_tests/eval/test_comparison_pooling.py \
  tests/unit_tests/eval/test_comparison_pooling_reports.py \
  tests/unit_tests/eval/test_rollout_reverification.py \
  tests/unit_tests/rollouts/test_rollout_collection.py \
  tests/unit_tests/metrics/test_reward_profile.py \
  tests/unit_tests/metrics/test_aggregate_metrics.py \
  tests/unit_tests/cli/test_cli_eval.py \
  resources_servers/gdpval/tests/test_multistage_orchestrator.py \
  --cpu -o addopts='' -o log_cli=false -q --tb=short

The same looping, ordinary and unreadable inputs also produced matching true/false/null labels through the real Gym assessor and NRL result-processing path in both tested Forest modes. Scores remained unchanged. The regression tests cover actual verifier request filtering, saved aggregate diagnostics and bounded worker-crash cleanup.

Rollouts

N/A for model rollouts: this changes post-response assessment and reporting, with no model generation, environment interaction or verifier-rule changes. No live model evaluation or GPU training run was performed.

Compatibility and benchmark impact

Off by default. Assessment adds is_looping and diagnostic metrics without changing verifier grades or quality scores. Unknown labels reduce coverage. The detector checks assistant and visible reasoning text for severe repetition; it does not add a tool-cycle detector. Profiling uses full-input environment-server identities so masked runs retain the correct diagnostic labels.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated edits are tracked separately.
  • Tests added or updated and pass locally.
  • Documentation added or updated.
  • Pre-commit checks pass locally (pre-commit run --all-files).
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s).

@copy-pr-bot

copy-pr-bot Bot commented Nov 26, 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 svcnvidia-nemo-ci added risk:high Autobot PR risk: high feature New capabilities, enhancements, or enablement work area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters labels Nov 26, 2026
Add a bounded shared text assessor with process execution, persist row labels before enrichment, and report pooled evaluation rates and coverage.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Name repeat-derived metrics explicitly, reserve looping metrics for pooled counts, and explain both aggregation rules in comparison notes. Extend the existing regression to prevent repeat ratios from overwriting the combined rate.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Discard a broken executor only when it is still the assessor current pool, allowing the next assessment to recreate it. Retain the existing unknown outcome and future-based capacity handling. Extend the spawned-worker regression with an actual child exit and verify that a replacement pool resumes assessment.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Overlay shared looping counts after custom aggregation, using the original completed rows. Extend existing regressions to protect saved annotations, unknown labels and worker capacity after deadline expiry.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Use the shared environment-server-aware identity resolver for coverage and retain the full-input label map while quality scores are filtered. Extend existing profile regressions for episode rows, shared agents and fully masked runs.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
@u-brixton
u-brixton force-pushed the rzayashnikov/looping-runtime-eval branch from 96473f8 to a8913a1 Compare November 30, 2026 11:42
u-brixton added a commit to NVIDIA-NeMo/RL that referenced this pull request Nov 30, 2026
Use Gym assessment before token rebuilding, preserve verifier grades and row metadata, and pool diagnostic counts across supported training paths. Keep raw dynamic sampling and make loop zeroing optional under the reward-shaping master switch.

TODO after NVIDIA-NeMo/Gym#6846 merges: replace temporary Gym pin a8913a1e7e75e1b9cbf82c9bf02c6c494259db52 with the landed squash commit. Dependency alignment and uv.lock belong to the prerequisite branch.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
u-brixton added a commit to NVIDIA-NeMo/RL that referenced this pull request Nov 30, 2026
Use Gym assessment before token rebuilding, preserve verifier grades and row metadata, and pool diagnostic counts across supported training paths. Keep raw dynamic sampling and make loop zeroing optional under the reward-shaping master switch.

TODO after NVIDIA-NeMo/Gym#6846 merges: replace temporary Gym pin a8913a1e7e75e1b9cbf82c9bf02c6c494259db52 with the landed squash commit. Dependency alignment and uv.lock belong to the prerequisite branch.

Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>
Signed-off-by: Renat Zayashnikov <rzayashnikov@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters feature New capabilities, enhancements, or enablement work risk:high Autobot PR risk: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants