Repository navigation
Conversation
…zed them Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Yu <justinvyu@anyscale.com>
justinvyu
added this pull request to stack #66764
October 5, 2026 23:41
Contributor
Author
|
Related, independent fix for the remaining |
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.
Description
test_elastic_e2ehas been timing out on CI since #66002, which pins Train V2 workers to AutoscalingCoordinator reservations. The elastic worker group start waits the full 60s (RAY_TRAIN_WORKER_GROUP_START_TIMEOUT_S) whenever the reservation changes between the scaling decision and pinning. The decision is sized from the cached reservation, while the pins come from a separaterecompute=Truepoll that requires an exact match, so:max_workersbundles, so afterResizeDecision(14)the reservation can reach 32 slots, andlen(label_selectors) != num_workersnever passes.This PR has the elastic policy take the size and the pins from the same snapshot, so they can't disagree:
ResizeDecision. A newResizeDecision.label_selectorsfield holds one node pin per worker, built from the reservation that chosenum_workersusing the same_floor_slotsmath. The STRICT_PACK/STRICT_SPREAD layout check from [train] Pin Train V2 workers to autoscaling coordinator reservations … #66002 is kept and now lives inScalingPolicy._get_reserved_label_selectors.recompute=True) view. In the non-running path it reads the fresh view only once the cached one looks ready, so waiting doesn't trigger a full coordinator tick every loop. The running path reads fresh everyelastic_resize_monitor_interval_s.FixedScalingPolicy) still use the existing poll,get_reserved_bundle_label_selectors, now built on the same helper. The stacked PR above this one moves the fixed policy to the same model and removes the poll.Compared with polling for an exact match, this also avoids an extra restart: the group starts at the size the reservation supports now, not at a stale size that elastic would resize one monitor interval later.
Related issues
Supersedes #66601 (agreed with its author), which fixes the same flake by picking a subset of a larger reservation with
_compute_reservationsand adding a relative_FIT_EPSILONto the coordinator's shared_bundle_can_fit_on_node. This PR doesn't change the coordinator or add a Train → Ray Data_compute_reservationsdependency.Part of a stack:
ResizeDecision+ elastic.Related, independent: early stop when a pinned node dies (linked in a comment).
Testing
All passing locally (macOS,
ray_dev_py311):test_scheduling.py,test_state.pyandtest_elastic_e2e.pywere run on the top of the stack (see the stacked PR).AI assistance (Claude Code) was used to write this change.
🤖 Generated with Claude Code