Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6d1c0f8
feat(rollout): add partial rollout lineage ledger
macandro96 Aug 19, 2026
3947302
fix(data-plane): make checkpoint barrier reentrant
macandro96 Aug 19, 2026
e09aab4
feat(rollout): persist sibling recovery state
macandro96 Aug 28, 2026
ee3906b
feat(rollout): add configurable recovery granularity
macandro96 Aug 28, 2026
6e33523
fix(rollout): reconcile sibling recovery tests
macandro96 Aug 28, 2026
b7fc4dc
test(rollout): cover sibling recovery across restart
macandro96 Aug 28, 2026
402fc4d
test(rollout): add data-plane checkpoint override
macandro96 Aug 29, 2026
d06318d
test(rollout): validate sibling recovery config
macandro96 Aug 29, 2026
d966d3a
fix(rollout): propagate prompt index through finalizer
macandro96 Aug 29, 2026
079f6f6
fix(rollout): harden sibling recovery checkpointing
macandro96 Aug 29, 2026
43871ff
fix(rollout): remove replay groups by stable id
macandro96 Aug 30, 2026
ff7fb98
fix(rollout): apply prompt-group recovery to live retries
macandro96 Aug 30, 2026
e852891
fix(rollout): preserve missing receipts across restart
macandro96 Aug 30, 2026
4bfc4ae
test(rollout): forward recovery granularity in sibling hook
macandro96 Aug 30, 2026
472ccd4
fix(rollout): address sibling recovery review findings
macandro96 Sep 1, 2026
ff36267
fix(rollout): address token capture review findings
macandro96 Sep 3, 2026
4d31868
refactor(rollout): rename resolved recovery granularity
macandro96 Sep 3, 2026
2755a26
fix(sc): enforce data-plane barrier ownership
macandro96 Sep 4, 2026
839f38d
fix(rollout): preserve mask state across recovery
macandro96 Sep 5, 2026
284d404
fix(rollout): repair recovery test integration
macandro96 Sep 5, 2026
cb78d63
fix(rollout): convert streamed capture receipts
macandro96 Sep 5, 2026
9d2b3f6
fix(rollout): harden recovery schema coverage
macandro96 Sep 6, 2026
6549009
fix: lint errors
macandro96 Sep 6, 2026
fa7f2bd
fix(rollout): harden sibling recovery invariants
macandro96 Sep 6, 2026
efcf43b
refactor(rollout): rename recovery granularity result
macandro96 Sep 6, 2026
34bcf9b
fix(rollout): align recovery policy with Gym routing
macandro96 Sep 6, 2026
5a74a6a
fix(nemo-gym): count resolved rollout agents
macandro96 Sep 7, 2026
e7447f7
test(sc): update rollout recovery fixtures
macandro96 Sep 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion docs/guides/single-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,32 @@ On resume, Single-Controller validates the TQ snapshot against the trainer check
Replay recovery is supported by all built-in samplers: `in_order`, `weight_fifo`, `ready_first`, and `windowed`. Custom samplers must explicitly declare `supports_buffer_checkpoint = True`. Otherwise, setup emits a warning and completed buffered groups are not restored.

:::{note}
Completed groups are restored directly from the TQ snapshot. Prompt groups whose generations were still in flight at the checkpoint boundary are recovered by ownership: `rollout_recovery.pt` records them, and on resume they are redispatched and regenerated from the same dataset rows. Only rows already committed to TQ preserve their exact generated tokens; redispatched groups produce new samples from the same prompts.
Completed groups are restored directly from the TQ snapshot. For unfinished
token-capture groups, `rollout_recovery.default_granularity` controls both live
failure and restart behavior:

- `sibling` preserves each sealed sibling and redispatches only unfinished ones.
- `prompt_group` retries every sibling in the group when any sibling is unfinished.
Comment thread
terrykong marked this conversation as resolved.

`sibling` is the default and avoids regenerating completed work. Use
`prompt_group` when every generation in a recovered group must come from the
policy weights live at redispatch.

`task_source_granularity_overrides` can select the policy using the Gym
`task_source` embedded in the raw rollout row. Unlike `agent_ref`, this identity
is available before Gym resolves the concrete agent and SC reserves the recovery
group. When a row already carries an `agent_ref`, a matching
`agent_granularity_overrides` entry wins over a matching task-source entry,
mirroring Gym's concrete-route precedence. Otherwise the task-source override,
then the global default, applies. The agent map also keeps datasets collated
before Gym recorded `task_source` working, although re-collating them is
recommended. Non-default policies require `token_capture.enabled: true`. The
task source and resolved policy are persisted in `rollout_recovery.pt`, so
recovery does not reinterpret an existing group using changed configuration. A
generation that already finished keeps its tokens in the token-capture staging
area, so `sibling` reuses them unchanged; a redispatched sibling produces a new
sample from the same prompt. Neither becomes a training row until every
generation in the group has finished.
:::

When a sampler does not support replay recovery, a requested data-plane checkpoint is written in `shadow` mode. The TQ snapshot is retained, but no authoritative replay index is written and its rows are not restored into the training replay buffer.
Expand Down
18 changes: 18 additions & 0 deletions examples/configs/grpo_math_1B_megatron_single_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,24 @@ token_capture:
enabled: false
staging_partition: rollout_staging

# Retry and restore policy for unfinished token-capture groups. "sibling" reuses
# already sealed generations; "prompt_group" regenerates every sibling when any
# sibling fails in-process or was unfinished at a checkpoint.
rollout_recovery:
default_granularity: sibling
# Per-Gym-task-source override, keyed on extra_env_info.task_source.
# task_source_granularity_overrides:
# genrm_compare_resources_server: prompt_group
task_source_granularity_overrides: {}
# Agent-specific override for rows already carrying extra_env_info.agent_ref.
# A matching agent entry wins over a matching task-source entry and also
# provides compatibility for legacy datasets without task_source.
# agent_granularity_overrides: {genrm_agent: prompt_group}
agent_granularity_overrides: {}

# Leaving either map above non-empty requires the top-level token_capture section
# to set enabled: true.

cluster:
# Master ports inherit the shared 1400-1999 band from grpo_math_1B.yaml.
gpus_per_node: 2
18 changes: 18 additions & 0 deletions examples/configs/ppo_math_1B_megatron_single_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,24 @@ token_capture:
enabled: false
staging_partition: rollout_staging

# Retry and restore policy for unfinished token-capture groups. "sibling" reuses
# already sealed generations; "prompt_group" regenerates every sibling when any
# sibling fails in-process or was unfinished at a checkpoint.
rollout_recovery:
default_granularity: sibling
# Per-Gym-task-source override, keyed on extra_env_info.task_source.
# task_source_granularity_overrides:
# genrm_compare_resources_server: prompt_group
task_source_granularity_overrides: {}
# Agent-specific override for rows already carrying extra_env_info.agent_ref.
# A matching agent entry wins over a matching task-source entry and also
# provides compatibility for legacy datasets without task_source.
# agent_granularity_overrides: {genrm_agent: prompt_group}
agent_granularity_overrides: {}

# Leaving either map above non-empty requires the top-level token_capture section
# to set enabled: true.

cluster:
# Master ports inherit the shared 1400-1999 band from ppo_math_1B.yaml.
gpus_per_node: 2
Loading
Loading