Unverified Commit e2daeb35 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

[Auto Sync] Update test_utils.py (20251006) (#11280)


Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: default avatarSehoon Kim <sehoon@x.ai>
parent 0e7b3530
......@@ -509,6 +509,7 @@ def popen_launch_server(
return_stdout_stderr: Optional[tuple] = None,
device: str = "auto",
pd_separated: bool = False,
num_replicas: Optional[int] = None,
):
"""Launch a server process with automatic device detection.
......@@ -526,7 +527,8 @@ def popen_launch_server(
_, host, port = base_url.split(":")
host = host[2:]
if pd_separated:
use_mixed_pd_engine = not pd_separated and num_replicas is not None
if pd_separated or use_mixed_pd_engine:
command = "sglang.launch_pd_server"
else:
command = "sglang.launch_server"
......@@ -540,7 +542,7 @@ def popen_launch_server(
*[str(x) for x in other_args],
]
if pd_separated:
if pd_separated or use_mixed_pd_engine:
command.extend(
[
"--lb-host",
......@@ -559,6 +561,15 @@ def popen_launch_server(
]
)
if use_mixed_pd_engine:
command.extend(
[
"--mixed",
"--num-replicas",
str(num_replicas),
]
)
if api_key:
command += ["--api-key", api_key]
......
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