File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1212from vllm .v1 .core .kv_cache_utils import get_kv_cache_config
1313from vllm .v1 .engine .core import EngineCore as V1EngineCore
1414
15+ from ..utils import create_new_process_for_each_test
1516from .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 ()
1921def 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" )
You can’t perform that action at this time.
0 commit comments