feat(checkpoint): add durable turn-level rollout recovery - #3349
Open
macandro96 wants to merge 39 commits into
Open
macandro96 wants to merge 39 commits into
macandro96 wants to merge 39 commits into
Conversation
macandro96
force-pushed
the
amahishi/gym-turn-level-recovery
branch
from
September 14, 2026 01:40
6473f49 to
6bba7b8
Compare
macandro96
marked this pull request as draft
September 14, 2026 03:47
macandro96
force-pushed
the
amahishi/gym-turn-level-recovery
branch
from
September 15, 2026 16:33
dbb8b76 to
80bd2a9
Compare
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
macandro96
force-pushed
the
amahishi/gym-turn-level-recovery
branch
from
September 23, 2026 00:36
5b0b444 to
f4fcf8c
Compare
macandro96
changed the base branch from
main
to
ananthsub/checkpoint-environment-adapters
September 23, 2026 00:39
2 of 3 tasks
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
macandro96
marked this pull request as ready for review
September 29, 2026 21:52
5 tasks
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
macandro96
force-pushed
the
amahishi/gym-turn-level-recovery
branch
from
September 30, 2026 15:07
f47cdcf to
023ae00
Compare
7 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Summary
Adds durable turn-level rollout recovery to NeMo Gym on top of #2946.
This change allows an accepted multi-turn rollout to stop at a committed agent/environment boundary, persist coordinated Gym state, and continue under a replacement rollout attempt after process or job restart.
What this adds above #2946
#2946 introduces checkpoint adapters for the initial stateful environments.
This PR integrates those adapters into the complete Gym rollout lifecycle:
Recovery flow
Nremains fenced.N+1while admissionremains paused.
turn without replaying completed resource mutations.
sequenceDiagram participant C as Checkpoint coordinator participant M as Model server participant A as Agent server participant R as Resource servers participant S as Checkpoint store Note over C,S: Checkpoint C->>M: Close admission and prepare Note over M: Accepted calls finish<br/>No mid-generation recovery M-->>C: Model-lineage manifest C->>A: Prepare checkpoint A-->>C: Parked turn and continuation manifest C->>R: Export environment state R-->>C: State and revision<br/>or restart-only classification C->>S: Commit coordinated checkpoint S-->>C: Checkpoint committed Note over C,S: Restore after restart C->>S: Load committed checkpoint S-->>C: Return participant manifests C->>M: Restore lineage and fence attempt N C->>A: Install continuation as attempt N+1 C->>R: Restore state or restart dependent execution C->>M: Reopen admission C->>A: Resume execution C->>R: Resume resourcesCorrectness guarantees
/runresults remain available until acknowledgedScalability
Checkpoint artifacts use:
This avoids scanning or materializing one loose checkpoint file per active
rollout during restore.
Testing
Scope
Included:
Not included:
Stack
Checklist
pre-commit run --all-files) (so CI lint/format/copyright pass).git commit -s) (so the DCO check passes).