[Rust][Benchmark] Make vllm bench serve Rust delegation opt-in (#50081)
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
@@ -201,6 +201,7 @@ def test_run_vllm_dp_server_uses_rust_frontend_when_enabled(monkeypatch):
|
||||
monkeypatch.setattr(dp_sup.os, "setpgrp", lambda: None)
|
||||
monkeypatch.setattr(dp_sup, "set_process_title", lambda *_args: None)
|
||||
monkeypatch.setattr(dp_sup, "decorate_logs", lambda *_args: None)
|
||||
monkeypatch.setattr(dp_sup.envs, "VLLM_USE_RUST_FRONTEND", True, raising=False)
|
||||
monkeypatch.setattr(
|
||||
dp_sup.envs,
|
||||
"VLLM_RUST_FRONTEND_PATH",
|
||||
|
||||
@@ -145,6 +145,15 @@ def test_precompiled_install_flags_are_orthogonal() -> None:
|
||||
assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
|
||||
|
||||
|
||||
def test_rust_bench_auto_path_missing_fails_fast() -> None:
|
||||
with (
|
||||
patch.dict(os.environ, {"VLLM_USE_RUST_BENCH": "1"}, clear=True),
|
||||
patch("vllm.envs.os.path.isfile", return_value=False),
|
||||
pytest.raises(FileNotFoundError, match="vllm-rs binary was not found"),
|
||||
):
|
||||
environment_variables["VLLM_RUST_FRONTEND_PATH"]()
|
||||
|
||||
|
||||
class TestEnvWithChoices:
|
||||
"""Test cases for env_with_choices function."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user