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 5050 - name : " worker and utils"
5151 markers : " not e2e"
5252 flags : " --timeout=300"
53+ - name : " compatibility"
54+ markers : " compat"
55+ flags : " --timeout=300"
5356
5457 name : " ${{ matrix.test_suite.name }} (${{ matrix.vllm_version.name }})"
5558
9093 if : (steps.changed-src-files.outputs.any_changed == 'true' && matrix.vllm_version.repo)
9194 run : |
9295 uv add ${{ matrix.vllm_version.repo }}
96+ echo "TEST_VLLM_VERSION=main" >> $GITHUB_ENV
9397
9498 - name : " Install vLLM with Spyre plugin"
9599 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):
7474 from vllm .config import ModelConfig
7575
7676 # no need to patch after the model_config change
77- if not 'model_config' in \
77+ if 'model_config' not in \
7878 inspect .getfullargspec (ModelConfig .is_v1_compatible ).args :
7979 ModelConfig .is_v1_compatible = is_v1_compatible
8080 return cls ._device_type
You can’t perform that action at this time.
0 commit comments