fix(slurm): tear down inference-only nodes after clean trainer exit#2961
Draft
eligotts wants to merge 1 commit into
Draft
fix(slurm): tear down inference-only nodes after clean trainer exit#2961eligotts wants to merge 1 commit into
eligotts wants to merge 1 commit into
Conversation
`srun --kill-on-bad-exit=1` only reaps peer tasks on non-zero exits, so a trainer that finishes cleanly left inference-only nodes running vLLM until the allocation hit its time limit. Add a run-completion sentinel for separate train/inference deployments: - The trainer task wrapper touches `$OUTPUT_DIR/control/slurm_run_complete` on exit 0 (and propagates its exit code either way). - Inference-only nodes run a watcher that exits cleanly once the sentinel appears; an inference component exiting *without* the sentinel is treated as a failure so kill-on-bad-exit still tears the job down. - The orchestrator-hosting task re-waits when the orchestrator exits cleanly before the trainer finishes — otherwise its `wait -n` would return early and kill the trainer wrapper before it touches the sentinel. Validated by rendering the template with and without inference nodes and `bash -n` on both outputs; a live two-direction SLURM smoke (clean exit teardown, failure propagation) is still pending. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
srun --kill-on-bad-exit=1only reaps peer tasks on non-zero exits, so in separate train/inference multi-node RL a trainer that finished cleanly left the inference-only nodes running vLLM until the allocation hit its time limit — the job stayedRUNNINGwith idle GPUs afterRL trainer finished!.This adds a run-completion sentinel (
$OUTPUT_DIR/control/slurm_run_complete) for deployments with inference-only nodes:--kill-on-bad-exitis unchanged.wait -nwould return early and kill the trainer wrapper before it could touch the sentinel.Single-group deployments (
num_infer_nodes == 0) render without any of this.Validation
num_infer_nodes0 and 2; sentinel machinery present only in the latter;bash -npasses on both rendered scripts.🤖 Generated with Claude Code