Skip to content

Commit c7c041e

Browse files
Fix CI slow tests: ImportError: vLLM is not installed (#4287)
1 parent ef40c04 commit c7c041e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_vllm_client_server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from trl.extras.vllm_client import VLLMClient
2323
from trl.scripts.vllm_serve import chunk_list
2424

25-
from .testing_utils import TrlTestCase, kill_process, require_3_accelerators
25+
from .testing_utils import TrlTestCase, kill_process, require_3_accelerators, require_vllm
2626

2727

2828
class TestChunkList(TrlTestCase):
@@ -53,6 +53,7 @@ def test_any_dtype(self):
5353

5454
@pytest.mark.slow
5555
@require_torch_multi_accelerator
56+
@require_vllm
5657
class TestVLLMClientServer(TrlTestCase):
5758
model_id = "Qwen/Qwen2.5-1.5B"
5859

@@ -212,6 +213,7 @@ def teardown_class(cls):
212213

213214
@pytest.mark.slow
214215
@require_3_accelerators
216+
@require_vllm
215217
class TestVLLMClientServerTP(TrlTestCase):
216218
model_id = "Qwen/Qwen2.5-1.5B"
217219

@@ -274,6 +276,7 @@ def teardown_class(cls):
274276

275277
@pytest.mark.slow
276278
@require_3_accelerators
279+
@require_vllm
277280
class TestVLLMClientServerDP(TrlTestCase):
278281
model_id = "Qwen/Qwen2.5-1.5B"
279282

@@ -336,6 +339,7 @@ def teardown_class(cls):
336339

337340
@pytest.mark.slow
338341
@require_torch_multi_accelerator
342+
@require_vllm
339343
class TestVLLMClientServerDeviceParameter(TrlTestCase):
340344
"""Test the device parameter functionality in init_communicator."""
341345

0 commit comments

Comments
 (0)