Repository navigation
Conversation
Track each training launch with a unique ownership token and PID start identities. Wait for graceful termination, then clean only residual processes from that run. Preserve launcher exit codes and require every SSH node to confirm shutdown before clearing active diagnostic state. Make the 30-second grace period configurable. Validate normal Qwen3 training, abnormal rank exit, manual stop and the torchrun exit-barrier boundary through the formal two-node CLI on A100 and DCU. Run all 212 runner tests on each platform and the repository pre-commit checks. Signed-off-by: liuzeyu <958354467@qq.com>
This was referenced Nov 12, 2026
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.
PR Category
Train
PR Types
Bug Fixes
PR Description
This PR fixes delayed training shutdown when a launcher remains alive after its workers have exited.
Problem
During two-node fault testing on both NVIDIA A100 and Hygon DCU, one node could finish its worker processes while its
torchrunagent remained in PyTorch's exit barrier, waiting for other nodes.The previous stop script sent termination signals without waiting for the training launcher to exit or escalating cleanup after a deadline. As a result, the stop command could return successfully while
torchrunand the outer wrapper remained alive for approximately 300 seconds, delaying exit-code recording and final cleanup.This complements #1271: the diagnostic monitor shutdown was handled there, while this PR addresses residual training launchers and workers.
Changes
pkill -f torchrunfallback. Missing ownership state is reported asownership_missing.The grace period and cleanup waits are configurable through
experiment.runner.stop_timeout_sandstop_kill_timeout_s.