Skip to content

Commit

Permalink
[BugFix] Fix ipv4 address parsing regression (vllm-project#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
njhill authored and jimpang committed Mar 31, 2024
1 parent 6989b20 commit fb51366
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def get_ip() -> str:


def get_distributed_init_method(ip: str, port: int) -> str:
return f"tcp://[{ip}]:{port}"
# Brackets are not permitted in ipv4 addresses,
# see https://github.com/python/cpython/issues/103848
return f"tcp://[{ip}]:{port}" if ":" in ip else f"tcp://{ip}:{port}"


def get_open_port() -> int:
Expand Down

0 comments on commit fb51366

Please sign in to comment.