@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 33f227e16b
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 19:45 UTC

[CI/Build] Use a fixed seed to avoid flaky tests (#14480)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>

Cyrus Leung committed Mar 8, 2025 at 19:30 UTC 33f227e16bfc05910c6650a9d22911031d7f67d6
4 files changed +7 -6
tests/entrypoints/openai/test_chat_echo.py
-2
@@ -24,8 +24,6 @@ def server():
24 "4080",
25 "--chat-template",
26 DUMMY_CHAT_TEMPLATE,
27 - "--seed",
28 - "0",
27 ]
28
29 with RemoteOpenAIServer(MODEL_NAME, args) as remote_server:
tests/entrypoints/openai/test_metrics.py
-2
@@ -47,8 +47,6 @@ def default_server_args():
47 "--enforce-eager",
48 "--max-num-seqs",
49 "128",
50 - "--seed",
51 - "0",
50 ]
51
52
tests/entrypoints/openai/test_root_path.py
-2
@@ -30,8 +30,6 @@ def server():
30 "/" + ROOT_PATH,
31 "--chat-template",
32 DUMMY_CHAT_TEMPLATE,
33 - "--seed",
34 - "0",
33 ]
34 envs = os.environ.copy()
35
tests/utils.py
+7
@@ -76,6 +76,7 @@ class RemoteOpenAIServer:
76 vllm_serve_args: list[str],
77 *,
78 env_dict: Optional[dict[str, str]] = None,
79 + seed: Optional[int] = 0,
80 auto_port: bool = True,
81 max_wait_seconds: Optional[float] = None) -> None:
82 if auto_port:
@@ -87,6 +88,12 @@ class RemoteOpenAIServer:
88 vllm_serve_args = vllm_serve_args + [
89 "--port", str(get_open_port())
90 ]
91 + if seed is not None:
92 + if "--seed" in vllm_serve_args:
93 + raise ValueError("You have manually specified the seed "
94 + f"when `seed={seed}`.")
95 +
96 + vllm_serve_args = vllm_serve_args + ["--seed", str(seed)]
97
98 parser = FlexibleArgumentParser(
99 description="vLLM's remote OpenAI server.")