Repository navigation
Conversation
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test 24e0667 |
yuki-97
left a comment
There was a problem hiding this comment.
@jthomson04 thanks for fixing this, overall lgtm. left some comments.
Address review feedback from @yuki-97 on PR NVIDIA-NeMo#2368: - Move `from collections import Counter` to the top of the file instead of importing it inside three separate methods. - Stop discarding prompts when one target's reservation is smaller than the batch. `_process_batch` now keeps reserving against successive targets in the age window until the batch is exhausted or no target still needs generation. Signed-off-by: jthomson04 <[email protected]>
|
/ok to test 105aa4d |
Address review feedback from @yuki-97 on PR NVIDIA-NeMo#2368: - Move `from collections import Counter` to the top of the file instead of importing it inside three separate methods. - Stop discarding prompts when one target's reservation is smaller than the batch. `_process_batch` now keeps reserving against successive targets in the age window until the batch is exhausted or no target still needs generation. Signed-off-by: jthomson04 <[email protected]>
105aa4d to
333c87c
Compare
|
/ok to test 333c87c |
yuki-97
left a comment
There was a problem hiding this comment.
thanks @jthomson04 , lgtm!
@terrykong @mehraakash could you help to take a review as well?
|
@jthomson04 IIUC, this now allows backfill for failing prompts instead of stalling/hanging. Please correct me if I'm wrong. If my understanding is correct, I feel like we should actually be erroring out (surface the error) b/c this kind of behavior seems like it can allow a lot of issues to be swept under the rug and ignored @ananthsub to opine on gym surfacing errors and how this could happen |
333c87c to
1affe55
Compare
|
Pushed an update to set a threshold for errors we tolerate. It loudly logs errors, and throws an exception after a certain amount of errors have been reached. By default, we retain the prior behavior of considering any generation error as fatal. |
yuki-97
left a comment
There was a problem hiding this comment.
thanks @jthomson04 , lgtm. could you help to rebase main and fix the conflict?
@terrykong @mehraakash could you help to take a review as well?
1affe55 to
3fc9465
Compare
|
/ok to test 3fc9465 |
52f5a72 to
a168378
Compare
|
/ok to test a168378 |
a168378 to
777ba10
Compare
|
/ok to test 777ba10 |
|
/ok to test 30c98ad |
|
/ok to test 5244f6e |
yuki-97
left a comment
There was a problem hiding this comment.
@terrykong @yfw could you help to take a review as well?
5244f6e to
109036f
Compare
|
/ok to test 109036f |
109036f to
b5c7dee
Compare
|
/ok to test b5c7dee |
terrykong
left a comment
There was a problem hiding this comment.
Reviewed with a team of five agents plus an adversarial pass; the main finding has a runnable repro attached to the first comment (verbatim-extracted methods, no GPU/ray/torch, deterministic 3/3).
The fast-fail is correctly wired for max_generation_failures: 0, and the bare raise at grpo.py:5104 is load-bearing rather than incidental — without it check_health()'s RuntimeError would be caught and swallowed by that same block and the feature would be a no-op. It also fixes a real pre-existing bug where a crashed async run exited 0. Docs, exemplar and the reference config are updated in lockstep.
The one thing I'd hold on: at max_trajectory_age_steps: 1 — which all 13 recipes this PR sets to max_generation_failures: 3 resolve to — once a batch worker exhausts its in-worker retries, the #2651 gap-fill that would top the short target back up never executes. The collection loop parks while the worker is in flight and a released slot can't wake it, so trajectories_needed is never recomputed and the step never completes. 0 aborts cleanly on such a failure; 3 hangs silently. Two-line fix, verified by the repro.
Two smaller independent items: a config default that contradicts its own documentation, and a miscount that turns normal dataloader exhaustion into a fatal generation failure.
Generated by Claude Code
b5c7dee to
87f55d4
Compare
|
/ok to test 87f55d4 |
jthomson04
left a comment
There was a problem hiding this comment.
Addressed in 87f55d4. The collector now tracks consecutive failures, preserves the first formatted diagnostic, raises fresh health exceptions, wakes gap filling after tolerated failures, and excludes shutdown-induced enqueue errors from failure accounting. AsyncGRPOConfig.max_generation_failures now defaults to 0, long-running agentic recipes explicitly tolerate 3, the trainer checks health every iteration, and the copyable docs/config references are updated. Validation passed: 93 broader unit tests, 4 focused post-format worker regressions, Ruff lint/format, and git diff --check.
87f55d4 to
07be815
Compare
|
/ok to test 07be815 |
Track consecutive rollout batch-worker failures in AsyncTrajectoryCollector and surface fatal health errors through async trainer startup and per-step checks. Add max_generation_failures with fail-fast defaults, resilient async recipe overrides including Nemotron-3-Ultra, documentation, and focused coverage. Co-authored-by: Yuki Huang <[email protected]> Signed-off-by: Yuki Huang <[email protected]> Signed-off-by: jthomson04 <[email protected]>
07be815 to
d585f13
Compare
|
/ok to test d585f13 |
Summary
Async GRPO can otherwise leave the trainer waiting for replay-buffer data when rollout batch workers fail in the background. This change makes those failures visible while preserving recovery from transient failures:
_run_rollout_batch_workerinvocations and reset the streak after a successful batch.max_generation_failures, including the backend, generation weight, target weight, count, threshold, original exception, and worker traceback.RuntimeErrorfromcheck_health()and check health during initial buffer fill and once per training-loop iteration.AsyncGRPOConfig.max_generation_failuresthe documented Pydantic default of0, while keeping explicit YAML values in runnable async-GRPO configs and the reference snapshot.3consecutive failures, aborting on the fourth.Superseded original fix
This PR originally targeted incomplete per-target prompt-group accounting. That original bugfix is no longer part of this PR: a separate batched reservation and gap-filling fix landed on
mainand superseded it.The rebase therefore drops obsolete commit
96ee36e72, preserves the target-accounting behavior now onmain, and contains no replay-buffer or target-accounting delta.Failure semantics
max_generation_failures: 0is fail-fast. Positive values tolerate that many consecutive failed batch-worker invocations. A successful batch resets the streak. Once the threshold is exceeded, the first fatal diagnostic remains sticky and subsequentcheck_health()calls raise fresh exceptions carrying that diagnostic.Validation
max_trajectory_age_steps: 1and for normal shutdown errors not affecting worker health.main.git diff --check.