"tests/nn/git@developer.sourcefind.cn:OpenDAS/fairscale.git" did not exist on "b6dc98cfe3365b9fbc7e386c2c246765a5b5710f"
Unverified Commit 07bf2e84 authored by Liangsheng Yin's avatar Liangsheng Yin Committed by GitHub
Browse files

Allow consecutive ports when launching multiple sglang servers. (#1802)

parent a628dd8e
...@@ -720,11 +720,11 @@ class PortArgs: ...@@ -720,11 +720,11 @@ class PortArgs:
@staticmethod @staticmethod
def init_new(server_args) -> "PortArgs": def init_new(server_args) -> "PortArgs":
port = server_args.port + 1 port = server_args.port + 42
while True: while True:
if is_port_available(port): if is_port_available(port):
break break
port += 1 port += 42
return PortArgs( return PortArgs(
tokenizer_ipc_name=tempfile.NamedTemporaryFile(delete=False).name, tokenizer_ipc_name=tempfile.NamedTemporaryFile(delete=False).name,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment