Companion illustration for
NVIDIA-NeMo/RL #4108
— permalinks pinned to
d044f40,
library behaviour read from megatron-energon 7.4.0, the version pinned in uv.lock.
1 to 0, which Energon reads as "stop counting failures".d044f40. Raised as a 🔴 must-fix comment on the PR.Three pages on this PR, one question each — this one: one changed number and what it switches off.
Energon, the dataset library underneath this loader, counts how many samples fail to
decode in a row. Past a limit it gives up and raises, so a run against a broken dataset
dies quickly with an error. That limit is one number on the task encoder. This PR
changes it from 1 to 0 at
generic_sft.py:259
— and in Energon, 0 does not mean "give up immediately". It means
stop counting. The same commit deletes the three-line comment that said so.
At the base commit these four lines sat together (base, where they still exist):
The comment is right. In megatron-energon 7.4.0, ErrorContext documents
the field as "Maximum number of consecutive failures before raising FatalSampleError.
Set to 0 to disable tolerance checking", and the raise is guarded by
if self.tolerance > 0 and self._consecutive_failures >= self.tolerance:.
At 0 that test is never true. Energon's own default for this field is 100.
Put the number back above zero, and put the comment back with it. Energon's own default is 100, which is also what the deleted comment suggested — tolerate a run of transient decode errors, but still stop on a dataset that is simply wrong.
The three values worth keeping apart: 1 was the old setting, stop at the first bad sample. 100 is Energon's default, stop after a hundred in a row. 0 is not between them — it is off the scale in the other direction, and never stops at all.
prompt_format,
wrong processor, a dataset path pointing at the wrong shards — no longer fails. It sits
at step 0 printing tracebacks, holding its GPUs, until someone notices and kills it. The
larger the job, the more expensive that silence is. Nobody has run this code path: no unit
or functional CI job executed on this commit, and the review that found this had no GPU, so
this is read from the library source rather than from an observed hang.