Fix eval tests not capturing server launch failures (#18886)

This commit is contained in:
Alison Shao
2026-02-17 15:59:03 -08:00
committed by GitHub
parent e02a9bec8d
commit 34d975b18f
4 changed files with 137 additions and 95 deletions

View File

@@ -259,18 +259,21 @@ class NightlyBenchmarkRunner:
avg_spec_accept_length = None
model_description = f"{model_path}" + (f" ({variant})" if variant else "")
# Launch server
process = popen_launch_server(
model=model_path,
base_url=self.base_url,
other_args=other_args or [],
timeout=(
timeout if timeout is not None else DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
),
env=env,
)
process = None
try:
# Launch server
process = popen_launch_server(
model=model_path,
base_url=self.base_url,
other_args=other_args or [],
timeout=(
timeout
if timeout is not None
else DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
),
env=env,
)
# Generate filenames
profile_path_prefix, json_output_file = self.generate_profile_filename(
model_path, variant
@@ -311,7 +314,8 @@ class NightlyBenchmarkRunner:
finally:
# Always clean up server process
kill_process_tree(process.pid)
if process is not None:
kill_process_tree(process.pid)
def _get_spec_accept_length(self) -> Optional[float]:
"""Query the server for avg_spec_accept_length metric.