Skip to content

Commit 7571a4a

Browse files
authored
[CI/Build] Fix Basic Models Test (#20728)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
1 parent f67d986 commit 7571a4a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/models/test_initialization.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@
1212
from vllm.v1.core.kv_cache_utils import get_kv_cache_config
1313
from vllm.v1.engine.core import EngineCore as V1EngineCore
1414

15+
from ..utils import create_new_process_for_each_test
1516
from .registry import HF_EXAMPLE_MODELS
1617

1718

1819
@pytest.mark.parametrize("model_arch", HF_EXAMPLE_MODELS.get_supported_archs())
20+
@create_new_process_for_each_test()
1921
def test_can_initialize(model_arch: str, monkeypatch: pytest.MonkeyPatch):
22+
"""The reason for using create_new_process_for_each_test is to avoid
23+
the WARNING:
24+
"We must use the 'spawn' multiprocessing start method. Overriding
25+
VLLM_WORKER_MULTIPROC_METHOD to 'spawn'."
26+
The spawn process causes the _initialize_kv_caches_v1 function below to
27+
become ineffective.
28+
"""
2029
model_info = HF_EXAMPLE_MODELS.get_hf_info(model_arch)
2130
model_info.check_available_online(on_fail="skip")
2231
model_info.check_transformers_version(on_fail="skip")

0 commit comments

Comments
 (0)