[Build] fix self-contradictory precompiled-flag orthogonality test (#44942)
Signed-off-by: pjdurden <prajjwalchittori1@gmail.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
co-authored by
Shengqi Chen
parent
3a04061701
commit
3501324957
@@ -293,6 +293,7 @@ steps:
|
|||||||
- vllm/transformers_utils/
|
- vllm/transformers_utils/
|
||||||
- vllm/utils/
|
- vllm/utils/
|
||||||
- vllm/v1/
|
- vllm/v1/
|
||||||
|
- tests/test_envs.py
|
||||||
- tests/test_inputs.py
|
- tests/test_inputs.py
|
||||||
- tests/test_outputs.py
|
- tests/test_outputs.py
|
||||||
- tests/test_pooling_params.py
|
- tests/test_pooling_params.py
|
||||||
@@ -309,6 +310,7 @@ steps:
|
|||||||
device: cpu-small
|
device: cpu-small
|
||||||
commands:
|
commands:
|
||||||
- python3 standalone_tests/lazy_imports.py
|
- python3 standalone_tests/lazy_imports.py
|
||||||
|
- pytest -v -s test_envs.py
|
||||||
- pytest -v -s test_inputs.py
|
- pytest -v -s test_inputs.py
|
||||||
- pytest -v -s test_outputs.py
|
- pytest -v -s test_outputs.py
|
||||||
- pytest -v -s test_pooling_params.py
|
- pytest -v -s test_pooling_params.py
|
||||||
|
|||||||
+19
-2
@@ -104,15 +104,32 @@ def test_is_envs_cache_enabled() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_precompiled_install_flags_are_orthogonal() -> None:
|
def test_precompiled_install_flags_are_orthogonal() -> None:
|
||||||
|
# The Rust frontend flag is independent of the C-extension precompiled
|
||||||
|
# flag: requesting the precompiled Rust frontend must not implicitly
|
||||||
|
# enable the precompiled C extensions.
|
||||||
|
with patch.dict(os.environ, {"VLLM_USE_PRECOMPILED_RUST": "1"}, clear=True):
|
||||||
|
assert environment_variables["VLLM_USE_PRECOMPILED"]() is False
|
||||||
|
assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
|
||||||
|
|
||||||
|
# ...and the reverse: requesting precompiled C extensions (here via a
|
||||||
|
# wheel location, which enables VLLM_USE_PRECOMPILED) must not flip the
|
||||||
|
# Rust frontend flag.
|
||||||
|
with patch.dict(
|
||||||
|
os.environ, {"VLLM_PRECOMPILED_WHEEL_LOCATION": "/tmp/vllm.whl"}, clear=True
|
||||||
|
):
|
||||||
|
assert environment_variables["VLLM_USE_PRECOMPILED"]() is True
|
||||||
|
assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is False
|
||||||
|
|
||||||
|
# ...and with both set together, each flag is still parsed independently.
|
||||||
with patch.dict(
|
with patch.dict(
|
||||||
os.environ,
|
os.environ,
|
||||||
{
|
{
|
||||||
"VLLM_PRECOMPILED_WHEEL_LOCATION": "/tmp/vllm.whl",
|
"VLLM_PRECOMPILED_WHEEL_LOCATION": "/tmp/vllm.whl",
|
||||||
"VLLM_USE_PRECOMPILED_RUST": "1",
|
"VLLM_USE_PRECOMPILED_RUST": "1",
|
||||||
},
|
},
|
||||||
clear=False,
|
clear=True,
|
||||||
):
|
):
|
||||||
assert environment_variables["VLLM_USE_PRECOMPILED"]() is False
|
assert environment_variables["VLLM_USE_PRECOMPILED"]() is True
|
||||||
assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
|
assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user