File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 50
50
- name : " worker and utils"
51
51
markers : " not e2e"
52
52
flags : " --timeout=300"
53
+ - name : " compatibility"
54
+ markers : " compat"
55
+ flags : " --timeout=300"
53
56
54
57
name : " ${{ matrix.test_suite.name }} (${{ matrix.vllm_version.name }})"
55
58
90
93
if : (steps.changed-src-files.outputs.any_changed == 'true' && matrix.vllm_version.repo)
91
94
run : |
92
95
uv add ${{ matrix.vllm_version.repo }}
96
+ echo "TEST_VLLM_VERSION=main" >> $GITHUB_ENV
93
97
94
98
- name : " Install vLLM with Spyre plugin"
95
99
if : steps.changed-src-files.outputs.any_changed == 'true'
Original file line number Diff line number Diff line change
1
+ import os
2
+
3
+ import pytest
4
+
5
+ pytestmark = pytest .mark .compat
6
+
7
+ VLLM_VERSION = os .getenv ("TEST_VLLM_VERSION" , "default" )
8
+
9
+
10
+ def test_vllm_bert_support (monkeypatch ):
11
+ '''
12
+ Test if the vllm version under test already has Bert support for V1
13
+ '''
14
+
15
+ from vllm .model_executor .models .bert import BertEmbeddingModel
16
+ from vllm .model_executor .models .interfaces import SupportsV0Only
17
+
18
+ bert_supports_v0_only = issubclass (BertEmbeddingModel , SupportsV0Only )
19
+
20
+ if VLLM_VERSION == "main" :
21
+ assert not bert_supports_v0_only
22
+ else :
23
+ assert bert_supports_v0_only , (
24
+ "The currently supported vLLM version already"
25
+ "supports Bert in V1. Remove the compatibility workarounds." )
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def device_type(cls):
74
74
from vllm .config import ModelConfig
75
75
76
76
# no need to patch after the model_config change
77
- if not 'model_config' in \
77
+ if 'model_config' not in \
78
78
inspect .getfullargspec (ModelConfig .is_v1_compatible ).args :
79
79
ModelConfig .is_v1_compatible = is_v1_compatible
80
80
return cls ._device_type
You can’t perform that action at this time.
0 commit comments