[Auto Sync] Update test_utils.py (20251006) (#11280)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Sehoon Kim <sehoon@x.ai>
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user