Skip to content

Commit

Permalink
[BugFix] Fix ipv4 address parsing regression (#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
njhill authored Mar 26, 2024
1 parent a979d97 commit 0dc7227
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 0dc7227

Please sign in to comment.