Skip to content

fix(update_weight): bracket IPv6 master address in tcp:// init_method - #2151

Merged
zhuzilin merged 1 commit into
THUDM:mainfrom
realJaydenCheng:fix/ipv6-distributed-init-method
Jul 1, 2026
Merged

zhuzilin merged 1 commit into
THUDM:mainfrom
realJaydenCheng:fix/ipv6-distributed-init-method

Conversation

@realJaydenCheng

Copy link
Copy Markdown
Contributor

torch.distributed tcp:// rendezvous requires bracketed IPv6. master_address from ray.get_node_ip_address() can be a bare IPv6 on IPv6/dual-stack clusters, yielding a malformed tcp://fe80::1:29500. Wrap with _wrap_ipv6() (no-op for IPv4/hostnames). Fixes weight-update process-group init under IPv6.

torch.distributed's tcp:// rendezvous requires IPv6 literals to be wrapped
in brackets, e.g. tcp://[::1]:29500. master_address here comes from
ray._private.services.get_node_ip_address(), which on IPv6-only / dual-stack
clusters returns a bare IPv6 address. Concatenating it directly produced a
malformed URI like tcp://fe80::1:29500, causing the weight-update process
group to fail to initialize.

Wrap master_address with _wrap_ipv6() (no-op for IPv4 / hostnames, idempotent
for already-bracketed input) so the init_method is well-formed under IPv6.
@zhuzilin
zhuzilin merged commit f8609b8 into THUDM:main Jul 1, 2026
40 checks passed
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