Skip to content

Commit 8d30166

Browse files
committed
Add tests to remind us of removing deprecated compatibility code
Signed-off-by: Max de Bayser <[email protected]>
1 parent 30cb893 commit 8d30166

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
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

@@ -90,6 +93,7 @@ jobs:
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'

tests/utils/upstream_compatibility.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import pytest
2+
pytestmark = pytest.mark.compat
3+
import os
4+
5+
VLLM_VERSION = os.getenv("TEST_VLLM_VERSION", "default")
6+
7+
def test_vllm_bert_support(monkeypatch):
8+
'''
9+
Test if the vllm version under test already has Bert support for V1
10+
'''
11+
12+
from vllm.model_executor.models.interfaces import SupportsV0Only
13+
from vllm.model_executor.models.bert import BertEmbeddingModel
14+
15+
bert_supports_v0_only = issubclass(BertEmbeddingModel, MamSupportsV0Onlymal)
16+
17+
if VLLM_VERSION == "main":
18+
assert not bert_supports_v0_only
19+
else:
20+
assert bert_supports_v0_only, ("The currently supported vLLM version already"
21+
"supports Bert in V1. Remove the compatibility workarounds.")

0 commit comments

Comments
 (0)