NVIDIA-NeMo/RL #5011, part 1 of 11 in the partial-checkpointing stack.
All permalinks pin the PR head 7171e5d; removed code is linked at the base d3d22f1.
Two pages on this PR, one question each. This one: how much the PR adds and what can go.
The move itself is careful. Each of the 27 methods that left single_controller.py was compared with its new home, and the differences are renames. The extra lines are not in the moved code. They are in what the move added around it: eight new files, each with its own license, docstring and imports; two Protocol classes with only one real implementation; a 99-line test helper that rebuilds the controller's setup; and a design doc that lists private methods.
| same | Lock order around a save, the optimizer-commit window, and restore order (replay โ ledger โ spare prompts โ loader place). |
| same | On-disk checkpoint keys (gym_instance_id, gym_attempt) and schema version, so old checkpoints restore. |
| same | Telemetry keys, including gym_restarted_episodes and the gym_unavailable reason. |
| same | Checks that two commits drop: setup or the Gym adapter already makes each one on the same checkpoint. |
| same | Tests: every removed test moved or went with a duplicate check. 1,233 changed CPU tests pass; the Ray-cluster and triton ones were not run. |
C3 โ _rollout_checkpoints.py:32 C5 โ nemo_gym.py:131 C6 โ design doc:72 C7 โ gym checkpoint test:984 C8 โ races test:294 C9 โ design doc:14 C10 โ rollout_checkpointing/__init__.py:15 C11 โ restore.py:15