Fix metrics (#1963)

This commit is contained in:
Yudi Xue
2024-11-08 23:21:11 -08:00
committed by GitHub
parent d1150e9a00
commit 95a4ed129a
6 changed files with 142 additions and 8 deletions

View File

@@ -404,6 +404,7 @@ def popen_launch_server(
other_args: tuple = (),
env: Optional[dict] = None,
return_stdout_stderr: Optional[tuple] = None,
enable_metrics: bool = False,
):
_, host, port = base_url.split(":")
host = host[2:]
@@ -422,6 +423,8 @@ def popen_launch_server(
]
if api_key:
command += ["--api-key", api_key]
if enable_metrics:
command += ["--enable-metrics"]
if return_stdout_stderr:
process = subprocess.Popen(