NVIDIA-NeMo/RL #5158 · all links pinned to head 824c116 (the PR's code is the same at the newer head 18d98e6)
multi_harness changes across a resume, which the PR calls unsupported but says it guards. Raised in review comment C5.Three pages on this PR, one question each. This one: what the resume check misses.
The PR's design doc promises:
With token capture, a restored group that would finish on a different agent type stops the run
The checkpoint never records which harness a group was on. The only label is each sealed row's metric name. So
_require_unchanged_harness
can only compare sealed siblings, and it returns early when there are none.
What Gym does in case B was not traced. It may fail with an unclear error, or carry on an episode that a different harness started. Either way the run does not stop with the clear RestoredHarnessChanged error the doc promises. Prompt-group recovery is safe: it drops the whole unfinished group. With the config unchanged, every resume lands on the same harness.
Where the fix lands: RL only. The rollout checkpoint save and restore, next to the recovery ledger. No Gym change. Nothing below is implemented.
# driver, at checkpoint save ckpt["multi_harness_fingerprint"] = sha256(routes.candidates) # taskset, agent, server, weight # driver, at resume, before any group is re-dispatched if multi_harness and ckpt["multi_harness_fingerprint"] != sha256(routes.candidates): raise RestoredHarnessChanged("multi_harness changed since the checkpoint") # covers A and B # per group, at finalize (today's check) def _require_unchanged_harness(group): sealed = [s for s in group.siblings if s.sealed] if not sealed: return # the gap; fine once the check above exists ...
Real code: _require_unchanged_harness, called from _generate_for_finalization_attempt. The fingerprint also catches the case the doc already admits it misses: a server swapped for another of the same agent type.
🔴 review comment C5 — rollout_manager.py:3101
multi_harness across a resume is unsupported, and the PR says it stops such a run. It does stop it once any sibling has finished. It does not when every sibling was saved mid-episode, which is exactly when the saved state belongs to the old harness. One fingerprint check at resume closes the gap.