The problem
NVIDIA-NeMo/RL #3665
is trying to solve. Behaviour shown is main at
3d873eb,
the commit this PR sits on.
Companion page: how the fix works.
Training runs for days on hundreds of GPUs. The completions are generated by a separate fleet of
inference workers, and that fleet loses workers — a machine dies, a network link drops, a request times out.
When one prompt keeps failing on every worker it is sent to, the SingleController has run out of options for
it. Before this PR there was exactly one thing it could do next: raise, and take the whole job down
(single_controller.py:388 on main).
Days of work, thrown away because 1 prompt out of many thousands did not come back.
Three questions have to be answered before a run is allowed to shrug off a lost prompt. Each one is a setting, and each is off by default — a run that sets nothing behaves exactly as it does today.
| The question | The setting | Default, and why |
|---|---|---|
| How do we tell "one flaky worker" from "the fleet is gone"? Riding out an outage is good; retrying into a dead fleet for two days is not. | max_consecutive_dropped_prompts |
0 — fail on the first one, today's behaviour. It counts prompts lost in a row;
any completion that comes back resets it to zero, so it measures the outage, not the run. |
| How small a batch is still a real training step? The gradient comes from the batch, so a step that quietly halves is a silent change to training. | min_step_batch_fraction |
0.9 — a step may lose at most 10% of its prompts. A fraction, not a count, so it means
the same thing at any batch size and protects small batches harder. |
| Do we accept the smaller step, or find another prompt? | on_dropped_prompt |
shrink — train on fewer. Set it to replace to keep the batch size by
generating a spare prompt instead. How that works → |
There is a real trade here, and it is worth being blunt about it. shrink means some training
steps compute their gradient from fewer samples than you configured. replace keeps the batch
size but can leave the trainer idle waiting for a fresh completion. The PR's answer is that both are better
than losing three days of work, and that you should be the one to choose — which is why every setting starts
switched off.
Nobody has posted a run. There is no W&B link, no before/after comparison, and no log from a job that actually lost workers mid-training. Unit tests drive the real generate-and-train loops and check the bookkeeping, and CI is green, but neither of those shows that a real outage is survived.
The evidence worth asking for is small and specific: one long run with an inference worker killed on purpose part way through, next to a clean baseline. Show that the run finishes, and show the reward curve lands in the same place. That answers both halves of the question — the run survives, and training quality did not quietly change.
in_order sampler, which is the one that labels each batch with a training step number. The other
built-in samplers (weight_fifo, windowed) do not label batches, so a lost prompt is
never accounted for and the shortfall surfaces later — as a run that stops making progress, or one that fails
on its final step. Nothing that ships today sets these values, so no existing recipe is affected, but two
shipped SingleController recipes do use windowed. Check which sampler your config uses first.