fix(policy): surface the uncovered-rank error during HTTP weight refit - #3515
tianyi-zhang-02 wants to merge 6 commits into
Conversation
stream_weights_via_http_impl read gather_src/gather_group out of worker_state
before resolving the engine URL. _ensure_ipc_topology only stashes those keys
for ranks inside a matched range, so a rank no engine covers died with a bare
KeyError('gather_src') and never reached the descriptive RuntimeError written
for exactly that case.
Move the worker_state reads below the engine resolution block. The covered
path is unchanged: the resolution loop reads only rollout_engine_urls,
num_gpus_per_engine and rank, and _ensure_ipc_topology still runs first so
every rank enters the new_group collective.
Signed-off-by: Tianyi Zhang <123608656+tianyi-zhang-02@users.noreply.github.com>
…ainer-update Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
bg51717
left a comment
There was a problem hiding this comment.
LGTM. This change ensures uncovered policy ranks raise the intended RuntimeError instead of a KeyError, with tests covering both covered and uncovered rank paths.
|
Merged the latest upstream/main into this branch and removed the redundant explanatory comment. |
|
/ok to test 78f147d |
|
Two things on the red checks.
All 79 passed. The segfault is at interpreter shutdown, after the summary line. The job is judged by I also brought the branch up to date. Should be clean merge now. Needs a fresh |
|
Closing this — main fixed it, and better than I did.
Thanks for the review @bg51717 and @yuki-97, sorry it went stale. :) |
What does this PR do?
Makes the existing uncovered-rank error in
stream_weights_via_http_implreachable.The function currently reads cached IPC topology before resolving the rollout-engine URL, so an uncovered rank raises
KeyError: 'gather_src'. This moves those reads below URL resolution, allowing the intendedRuntimeErrorto report the bad rank mapping.Covered-rank behavior is unchanged.
Testing
ruff check,ruff format, andpyreflypassmainand this branch on Windows becauseipc://is unsupportedIssues
Found while investigating #3288. Draft PRs #3330 and #3426 also touch this function.
cc @RayenTian @yuki-97