Skip to content

Commit 5c752ed

Browse files
committed
fix: reverse iteration over link_rets to safely remove clusters
Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
1 parent 791993a commit 5c752ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vllm_ascend/distributed/llmdatadist_connector_v1.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ def __init__(self, vllm_config: "VllmConfig",
445445
logger.warning(f"Failed to link clusters, {overall_ret=}")
446446
continue
447447

448-
for idx, link_ret in enumerate(link_rets):
448+
for idx in range(len(link_rets) - 1, -1, -1):
449+
link_ret = link_rets[idx]
449450
if link_ret == LLMStatusCode.LLM_SUCCESS:
450451
clusters.pop(idx)
451452

0 commit comments

Comments
 (0)