Repository navigation
fix(eval): report retries at the cap a run was collected with - #4873
Merged
AdamRajfer merged 4 commits intoOct 22, 2026
Merged
Conversation
…ters
gym eval run and gym eval aggregate now add coverage/failed/<class> and
retries/{attempts,rollouts_retried,at_cap,max_attempts} to the coverage
metrics they export. The counts come from the failures sidecars, so a
resumed run reports totals for the whole run. MLflowExporter.setup counts
each reopen of a run in a gym_resume_count tag.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adam Rajfer <[email protected]>
Review finding 4338960567 on NVIDIA-NeMo#4852. A resumed run reopens its tracking run, which keeps the last value of every metric it was sent. When a rollout that had failed later landed, or its last attempt failed with another class, coverage/failed/<class> was left out of the export and the old count stayed. Every class the sidecars name is now exported, at 0 when no unresolved rollout has it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
Review finding 4338960587 (follow-up to NVIDIA-NeMo#4852). Offline aggregation compared each rollout's failed attempts with the attempt cap of the process doing the aggregating, so a run collected with cap 1 and aggregated in a fresh shell reported max_attempts 3 and nothing at the cap. Collection now records its cap on each failures-sidecar row (_ng_failure_max_attempts, kept out of the metrics like the other _ng_failure_ fields), and retries/at_cap holds each rollout to the cap on its last attempt. retries/max_attempts is that cap, and is left out when the rollouts were collected with different caps. A row written before the cap was recorded uses the current cap, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
laszkiewiczp
previously approved these changes
Oct 22, 2026
NVIDIA-NeMo#4852 landed on main as one squashed commit, which also holds its later MLflow fix. This merge takes main's version of the files NVIDIA-NeMo#4852 changed and keeps this branch's own change on top, so the PR targets main and shows only that change: report retries at the cap a run was collected with. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
AdamRajfer
changed the base branch from
arajfer/stack/failure-retry-export
to
main
October 22, 2026 10:35
AdamRajfer
dismissed
laszkiewiczp’s stale review
October 22, 2026 10:35
The base branch was changed.
laszkiewiczp
approved these changes
Oct 22, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39767119786 |
AdamRajfer
added a commit
to AdamRajfer/Gym
that referenced
this pull request
Oct 22, 2026
Brings in the run health counts (NVIDIA-NeMo#4788) and the exporter changes (NVIDIA-NeMo#4852, NVIDIA-NeMo#4873), which the time-limit diagnostics now build on. No conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
5 tasks done
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.
Follow-up to #4852, which is merged; this PR now targets main. From review finding 4338960587.
What and why. Offline
gym eval aggregatereportedretries/at_capandretries/max_attemptsfrom the aggregating machine'sNEMO_GYM_MAX_ROLLOUT_ATTEMPTS, not from the cap the run was collected with. So a cap-1 run aggregated in a fresh shell showedat_cap=0. Each sidecar row now records the attempt cap it ran under (_ng_failure_max_attempts), and aggregation reads it. When rollouts were collected with different caps (across shards, or a resume under a new cap), no singleretries/max_attemptsis reported. A sidecar row written before this change has no recorded cap and uses the current one. The field is dropped before scoring, so it never becomes a metric.Eval scores. No change: diagnostics only.
Unit tests.
tests/unit_tests/test_rollout_collection.py::TestRecordedAttemptCap: five new cap tests. The recorded-cap and mixed-cap tests fail without the fix; the other two pin the fallback to the current cap and that the field never becomes a metric.🤖 Generated with Claude Code