Repository navigation
feat(checkpoint): resume ToolSimulationAgent legacy runs - #4798
Merged
Merged
Conversation
Port the ToolSimulationAgent recovery idea from Gym #3412 to the session participant and LegacyRun API on main. Preserve completed model replies across the reply-in-flight window and repeated saves, and declare the argument comparator stateless with replayable verification. Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
zyzhou5
reviewed
Oct 21, 2026
zyzhou5
reviewed
Oct 21, 2026
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
Contributor
Author
|
/ok to test e3989f1 |
Contributor
|
🌿 Preview your docs: https://nvidia-preview-pr-4798-e3989f140f51.docs.buildwithfern.com/nemo/gym |
This was referenced Oct 22, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39851661791 |
This branch was previously 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?
ToolSimulationAgent currently reports its in-flight
/runepisodes as restart-only. This adds continuation through the current Gym checkpoint session API, so a rollout can resume a model wait or reuse an already completed response instead of generating it again after recovery.This ports the ToolSimulationAgent recovery idea from #3412 to main's
AgentSessionParticipant/LegacyRuncontract. It does not cherry-pick that PR's older boundary protocol or its broader prefix-checkpoint stack. Main already has the shared checkpoint infrastructure, so this PR targetsmainindependently of the NeMo RL stack./runrecords its next boundary, covering the reply-in-flight race and duplicate delivery./runhas consumed the reply./v1/responseswithout an owning/runalso remains restart-only.Checkpointing remains opt-in. The non-checkpointed API, tool-call output, configured skip-verification reward, and comparator reward semantics are preserved. This adds no native agent-session API and does not execute the requested tools. The model participant owns any generation-prefix coordinates; this agent persists the boundary that reissues the matching call. It does not save tokens or a KV cache itself.
Validation
pre-commit run --all-filespassed. The guardwords hook reported the private catalog unavailable and skipped that private-catalog check.The checkpoint tests exercise the actual agent, participant control plane, on-disk save/restore, and real comparator with a controlled model response. They cover two successive restores during a model wait, a completed reply still on its way to
/run, verification-only replay, a saved final result, an unclaimed restore saved again, stale attempts, skip-verification, restart fallbacks, and the real verifier's seed capability headers.What does this PR do?
Validation
Rollouts
Compatibility and benchmark impact
Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).