Review notes on
NVIDIA-NeMo/RL #3665.
All permalinks pin the PR head ad048f9; "before" behaviour is
3d873eb.
The numbering here matches the three review comments on the PR.
The PR lets a training run give up on a prompt the generation fleet cannot answer, instead of ending the
run. To do that it adds five settings under async_rl.rollout_failure. Only finding 1 is
a defect; the other two are follow-up asks. Nothing that ships today is affected — every new
setting is off by default. Examples use 4 prompts per training step.
in_order sampler gives that batch the number of the training step it
belongs to (in the code, target_step), and step 7 will only ever train on groups
carrying the number 7. The other two built-in samplers, weight_fifo and windowed,
hand back None instead — their batches carry no step number.
Review comment on config.py:442
Everything this PR adds is keyed off the step number: a lost prompt is subtracted from its step's target so
the trainer stops waiting for it. With no step number there is nothing to subtract from. Both paths bail on
exactly that — _credit_shortfall returns immediately and
_take_replacement returns nothing — so with weight_fifo or
windowed neither "shrink" nor "replace" ever runs, the step's target stays at
the full num_prompts_per_step forever, and min_step_batch_fraction is never
consulted.
With weight_fifo that is unrecoverable, because two ranges disagree at exactly one point:
No exception is raised. The train pump sleeps 5 ms and re-asks forever, both pumps go idle, and the
job holds its GPUs until the wall clock kills it — stall_action defaults to warn,
so the watchdog only prints. This is pre-existing — the older
max_skipped_prompts could already reach it — but the PR adds a second way in, and its own YAML
comment suggests turning it on.
Which of the two failures you get is decided by an unrelated speed setting.
min_groups_for_streaming_train is how many finished groups the trainer waits for before starting
a chunk of work. Under in_order it has no say in fault tolerance at all. Here, because the
step's target never moves, it is the only thing left deciding what happens:
Suggested fix: reject the combination in
_warn_on_inert_failure_settings, which already works out whether the sampler
issues a step number. It blocks nothing that works today. A committable suggestion is on the review comment.
Review comment on config.py:141
One setting hides a mode inside a number.
max_consecutive_dropped_prompts: 0 does not mean "tolerate no drops and carry on". It means
"end the whole run on the first one" — and the only way to learn that is to read the comment beside it.
It also measures the same thing the watchdog already measures, and the two defaults contradict each other:
The fix is to make the defaults agree: a small non-zero budget as the fast, specific trip, and
stall_action: abort as the catch-all backstop. There is a payoff for finding 1 in that — with
the watchdog set to stop the run, the stall above becomes a bounded failure with a real error instead of an
unbounded one burning GPUs. It does not fix it, but it caps the damage.
Review comment on config.py:156 — documentation only, nothing is broken here
Four numbers decide how big a training step is. Two are settings you write in YAML, two are working
values the trainer recomputes every pass of its loop, and the names do not say which is which:
num_prompts_per_step, min_step_batch_fraction,
min_groups_for_streaming_train, and the pair min_prompt_groups /
max_prompt_groups that appear in the code.
They compose correctly under in_order — a step that legitimately shrank to 17 groups asks
for 17 and gets 17, because the chunk size is capped by what the step still needs
(single_controller.py:871). No bug. But two things catch people out, and neither is written
down: the floor is a check, not a target (losing 1 prompt of 4 gives a target of 3, not
4 × fraction), and the chunk size never needs lowering to let a step
shrink. One sentence on each field saying which thing it bounds would settle it.
The full breakdown of which numbers move and when is on part 2.
Finding 1 is the only defect, and three reviewers reached it independently by reading the code; the boundary mismatch was then confirmed by hand. Nobody ran any of it. None of this came from a live failure — there is no run where a worker was killed and the stall was watched happening, and the unit tests do not cover a no-step-number sampler on the training side, which is why the suite stays green.
What would settle it in about an hour: start a short run with sampler.name: weight_fifo and
max_consecutive_dropped_prompts: 1, force one prompt to fail, and watch whether training steps
keep advancing. Findings 2 and 3 are judgement calls about the shape and naming of the settings, not
defects — reasonable people can disagree, and they are worth a follow-up rather than blocking the PR.
in_order. Two of the shipped SingleController recipes use
windowed, which is the milder of the two failures but still ends the run at its last step.