Repository navigation
Start Ray with enough CPUs for two-GPU Miles v0.2.0 trainers - #345
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Micah Yong (micahtyong)
requested a review
from Kailash Ranganathan (kailash109)
as a code owner
November 17, 2026 20:25
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
A Miles LoRA trainer on the
miles-v0.2.0-15afe21image with exactly two GPUs never finished starting. The client waited on "starting a trainer" indefinitely, and the GPUs never allocated memory.Spindle starts Ray with
max(4, world_size * 2)CPUs. The v0.2.0 runtime reserves one CPU per GPU for its training workers and runs three more single-CPU actors outside that reservation. With two GPUs that needs five CPUs, but Ray had four, so the last actor never scheduled and start-up waited on it forever. One GPU (4 of 4) and four GPUs (7 of 8) happened to fit.Ray now starts with
world_size * 2 + 2CPUs. This is never fewer than before, so other layouts are unaffected. Multi-node trainers join an existing Ray cluster and don't use this path.Testing
Stock
qwen35-4b-lora-32kwithtrainer_image = "miles-v0.2.0-15afe21"and two H200 trainer GPUs, using the stock Tinker SDK: create one rank-32 LoRA training client, then run oneforward_backward.forward_backwarddoneOn main,
ray statusinside the trainer showed 4 total CPUs with a pending demand for one more CPU, and the backend was waiting inRayWorkerManager.launch.uv run --no-sync pytest -q tests/backends: 336 passed.