Skip to content

Log progress while waiting for placement group - #2024

Merged
zhuzilin merged 1 commit into
THUDM:mainfrom
luccabb:fix-pg-ready-timeout
Jun 8, 2026
Merged

zhuzilin merged 1 commit into
THUDM:mainfrom
luccabb:fix-pg-ready-timeout

Conversation

@luccabb

@luccabb luccabb commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Problem

_create_placement_group waits for the placement group with a bare ray.get(pg.ready()). When the placement group can't be placed yet — a node's GPUs haven't registered with the Ray GCS, or an autoscaler is still bringing nodes up — this blocks with no output, the last log line being Creating placement group with N GPUs.... The job looks hung with no indication of whether it's stuck, slow, or scaling. This may underlie some of the "training hangs at startup" reports.

Fix

Poll pg.ready() and log the GPU counts every 30s while waiting:

Waiting for placement group of 16 GPUs (elapsed 30s): 8 GPUs registered with Ray, 8 available.

The wait stays unbounded — no timeout, no behavior change — so autoscaling clusters (where a pending placement group is the signal that triggers scale-up, and a cold start can legitimately take many minutes) are unaffected.

🤖 Generated with Claude Code

@luccabb
luccabb marked this pull request as ready for review June 5, 2026 20:09
_create_placement_group waited with a bare ray.get(pg.ready()), so when the
placement group can't be placed yet (a node's GPUs haven't registered with the
GCS, or an autoscaler is still bringing nodes up) training hangs with no output,
the last line being 'Creating placement group with N GPUs...'. Poll pg.ready()
and log the GPU counts every 30s so the wait is observable. The wait stays
unbounded, so behavior on autoscaling clusters is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@luccabb
luccabb force-pushed the fix-pg-ready-timeout branch from f637230 to c59a19a Compare June 5, 2026 20:18
@luccabb luccabb changed the title Bound placement-group ready wait (fix silent infinite hang at startup) Log progress while waiting for placement group (fix silent startup hang) Jun 5, 2026
@luccabb luccabb changed the title Log progress while waiting for placement group (fix silent startup hang) Log progress while waiting for placement group Jun 5, 2026
@luccabb

luccabb commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

wondering if its a good idea to timeout?

@zhuzilin

zhuzilin commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

thanks a lot for this! yeah the origin logging was not intuitive.

wondering if its a good idea to timeout?

hmm... I've not sure about this...

@zhuzilin
zhuzilin merged commit 1de8347 into THUDM:main Jun 8, 2026
35 checks passed
@luccabb
luccabb deleted the fix-pg-ready-timeout branch June 8, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants