Skip to content

Commit f96100f

Browse files
[Misc][V0 Deprecation] Remove V0 related codes of test, example, platform (#1805)
### What this PR does / why we need it? Remove V0 related codes of test, example, platform. This PR is a part of #1620. - vLLM version: v0.9.2 - vLLM main: vllm-project/vllm@235bfd5 --------- Signed-off-by: shen-shanshan <467638484@qq.com>
1 parent a929699 commit f96100f

File tree

5 files changed

+9
-459
lines changed

5 files changed

+9
-459
lines changed

examples/offline_inference_npu_v0.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/e2e/singlecard/test_guided_decoding.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
os.environ["PYTORCH_NPU_ALLOC_CONF"] = "max_split_size_mb:256"
3131
MODEL_NAME = "Qwen/Qwen2.5-0.5B-Instruct"
3232

33-
GuidedDecodingBackendV0 = ["outlines", "lm-format-enforcer", "xgrammar"]
34-
GuidedDecodingBackendV1 = ["xgrammar", "guidance"]
35-
GuidedDecodingBackend = list(
36-
set(GuidedDecodingBackendV0 + GuidedDecodingBackendV1))
33+
GuidedDecodingBackend = ["xgrammar", "guidance"]
3734

3835

3936
@pytest.fixture(scope="module")
@@ -84,16 +81,9 @@ def sample_json_schema():
8481
}
8582

8683

87-
def check_backend(guided_decoding_backend: str):
88-
if guided_decoding_backend not in GuidedDecodingBackendV1:
89-
pytest.skip(f"{guided_decoding_backend} does not support v1, skip it.")
90-
91-
9284
@pytest.mark.parametrize("guided_decoding_backend", GuidedDecodingBackend)
9385
def test_guided_json_completion(guided_decoding_backend: str,
9486
sample_json_schema):
95-
check_backend(guided_decoding_backend)
96-
9787
sampling_params = SamplingParams(
9888
temperature=1.0,
9989
max_tokens=500,
@@ -130,8 +120,6 @@ def test_guided_json_completion(guided_decoding_backend: str,
130120

131121
@pytest.mark.parametrize("guided_decoding_backend", GuidedDecodingBackend)
132122
def test_guided_regex(guided_decoding_backend: str, sample_regex):
133-
check_backend(guided_decoding_backend)
134-
135123
sampling_params = SamplingParams(
136124
temperature=0.8,
137125
top_p=0.95,

tests/ut/test_platform.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -481,45 +481,6 @@ def test_get_attn_backend_cls_use_v1_only(self, mock_get_ascend_config):
481481
result,
482482
"vllm_ascend.attention.attention_v1.AscendAttentionBackend")
483483

484-
@patch('vllm_ascend.platform.get_ascend_config')
485-
def test_get_attn_backend_cls_use_mla_only(self, mock_get_ascend_config):
486-
mock_config = MagicMock()
487-
mock_config.torchair_graph_config.enabled = False
488-
489-
mock_get_ascend_config.return_value = mock_config
490-
491-
result = self.platform.get_attn_backend_cls(
492-
selected_backend="ascend",
493-
head_size=64,
494-
dtype="float16",
495-
kv_cache_dtype="float16",
496-
block_size=64,
497-
use_v1=False,
498-
use_mla=True,
499-
)
500-
self.assertEqual(
501-
result,
502-
"vllm_ascend.attention.attention.AscendMLAAttentionBackend")
503-
504-
@patch('vllm_ascend.platform.get_ascend_config')
505-
def test_get_attn_backend_cls_default_case(self, mock_get_ascend_config):
506-
mock_config = MagicMock()
507-
mock_config.torchair_graph_config.enabled = False
508-
509-
mock_get_ascend_config.return_value = mock_config
510-
511-
result = self.platform.get_attn_backend_cls(
512-
selected_backend="ascend",
513-
head_size=64,
514-
dtype="float16",
515-
kv_cache_dtype="float16",
516-
block_size=64,
517-
use_v1=False,
518-
use_mla=False,
519-
)
520-
self.assertEqual(
521-
result, "vllm_ascend.attention.attention.AscendAttentionBackend")
522-
523484
def test_get_punica_wrapper(self):
524485
result = self.platform.get_punica_wrapper()
525486
self.assertEqual(

0 commit comments

Comments
 (0)