Repository navigation
Conversation
…zed them Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Justin Yu <[email protected]>
|
Related, independent fix for the remaining |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
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