[Refactor] Remove dead tests code (#58916)

Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

Wentao Ye committed Sep 30, 2026 at 00:39 UTC 834ad456d314f801696b259e426c6946e50ee42d
17 files changed +3 -488
.buildkite/test-amd.yaml
+1 -1
@@ -586,7 +586,7 @@ steps:
586 - tests/utils.py
587 - tests/models/test_vision.py
588 commands:
589 - - case "$$BUILDKITE_PARALLEL_JOB" in 0) TARGET_TEST_SUITE=MI300 pytest basic_correctness/ -v -s -m 'distributed(num_gpus=2)' && HIP_VISIBLE_DEVICES=0,1 pytest -v -s model_executor/model_loader/test_sharded_state_loader.py -m '(not slow_test)' ;; 1) pytest models/transformers/test_backend.py -v -s -m 'distributed(num_gpus=2)' && pytest models/language -v -s -m 'distributed(num_gpus=2)' && VLLM_ROCM_USE_AITER=1 pytest -v -s models/test_hyv4_rocm.py -m 'distributed(num_gpus=2)' ;; 2) pytest models/multimodal -v -s -m 'distributed(num_gpus=2)' --ignore models/multimodal/generation/test_whisper.py --ignore models/multimodal/generation/test_phi4siglip.py && pytest models/multimodal/generation/test_phi4siglip.py -v -s -m 'distributed(num_gpus=2)' && VLLM_WORKER_MULTIPROC_METHOD=spawn pytest models/multimodal/generation/test_whisper.py -v -s -m 'distributed(num_gpus=2)' && pytest -v -s models/test_vision.py -m 'distributed(num_gpus=2)' ;; *) exit 2 ;; esac
589 + - case "$$BUILDKITE_PARALLEL_JOB" in 0) TARGET_TEST_SUITE=MI300 pytest basic_correctness/ -v -s -m 'distributed(num_gpus=2)' && HIP_VISIBLE_DEVICES=0,1 pytest -v -s model_executor/model_loader/test_sharded_state_loader.py -m '(not slow_test)' ;; 1) pytest models/transformers/test_backend.py -v -s -m 'distributed(num_gpus=2)' && pytest models/language -v -s -m 'distributed(num_gpus=2)' && VLLM_ROCM_USE_AITER=1 pytest -v -s models/test_hyv4_rocm.py -m 'distributed(num_gpus=2)' ;; 2) pytest models/multimodal -v -s -m 'distributed(num_gpus=2)' --ignore models/multimodal/generation/test_whisper.py && VLLM_WORKER_MULTIPROC_METHOD=spawn pytest models/multimodal/generation/test_whisper.py -v -s -m 'distributed(num_gpus=2)' && pytest -v -s models/test_vision.py -m 'distributed(num_gpus=2)' ;; *) exit 2 ;; esac
590
591 #---------------------------------------------------------- mi300 · compile ----------------------------------------------------------#
592
.buildkite/test_areas/models_distributed.yaml
+2 -4
@@ -26,8 +26,7 @@ steps:
26 pytest models/language -v -s -m 'distributed(num_gpus=2)'
27 ;;
28 2)
29 - pytest models/multimodal/generation/test_phi4siglip.py -v -s -m 'distributed(num_gpus=2)'
30 - pytest models/multimodal -v -s -m 'distributed(num_gpus=2)' --ignore models/multimodal/generation/test_whisper.py --ignore models/multimodal/generation/test_phi4siglip.py
29 + pytest models/multimodal -v -s -m 'distributed(num_gpus=2)' --ignore models/multimodal/generation/test_whisper.py
30 VLLM_WORKER_MULTIPROC_METHOD=spawn pytest models/multimodal/generation/test_whisper.py -v -s -m 'distributed(num_gpus=2)'
31 ;;
32 *) exit 2 ;;
@@ -72,8 +71,7 @@ steps:
71 VLLM_ROCM_USE_AITER=1 pytest -v -s models/test_hyv4_rocm.py -m 'distributed(num_gpus=2)'
72 ;;
73 2)
75 - pytest models/multimodal -v -s -m 'distributed(num_gpus=2)' --ignore models/multimodal/generation/test_whisper.py --ignore models/multimodal/generation/test_phi4siglip.py &&
76 - pytest models/multimodal/generation/test_phi4siglip.py -v -s -m 'distributed(num_gpus=2)' &&
74 + pytest models/multimodal -v -s -m 'distributed(num_gpus=2)' --ignore models/multimodal/generation/test_whisper.py &&
75 VLLM_WORKER_MULTIPROC_METHOD=spawn pytest models/multimodal/generation/test_whisper.py -v -s -m 'distributed(num_gpus=2)'
76 ;;
77 *) exit 2 ;;
tests/compile/passes/test_fusion.py
-4
@@ -60,10 +60,6 @@ from vllm.utils.deep_gemm import (
60 is_deep_gemm_supported,
61 )
62
63 -FP8_DTYPE = current_platform.fp8_dtype()
64 -
65 -RMS_ADD_OP = torch.ops._C.fused_add_rms_norm.default
66 -
63 # Kernel and group_shape combinations: (kernel, group_shape)
64 # CUDA kernels
65 CUDA_KERNEL_GROUPSHAPE_COMBINATIONS = [
tests/compile/passes/test_fusion_attn.py
-1
@@ -248,7 +248,6 @@ class TestAttentionNvfp4QuantPatternModel(AttentionQuantPatternModel):
248 PATTERN_TEST_MODELS_FP8: list[tuple[str, type]] = []
249 PATTERN_TEST_MODELS_FP4: list[tuple[str, type]] = []
250 HEADS: list[tuple[int, int]] = []
251 -SPLIT_ATTENTION: list[bool] = []
251 BACKENDS_FP8: list[AttentionBackendEnum] = []
252 BACKENDS_FP4: list[AttentionBackendEnum] = []
253
tests/conftest.py
-5
@@ -317,11 +317,6 @@ def example_system_message() -> str:
317 return f.read()
318
319
320 -@pytest.fixture
321 -def example_long_prompts() -> list[str]:
322 - return [prompt for filename in _LONG_PROMPTS for prompt in _read_prompts(filename)]
323 -
324 -
320 @pytest.fixture(scope="session")
321 def image_assets() -> ImageTestAssets:
322 return IMAGE_ASSETS
tests/entrypoints/conftest.py
-120
@@ -14,16 +14,6 @@ def sample_prompts():
14 ]
15
16
17 -@pytest.fixture
18 -def sample_token_ids():
19 - return [
20 - [0],
21 - [0, 1],
22 - [0, 2, 1],
23 - [0, 3, 1, 2],
24 - ]
25 -
26 -
17 @pytest.fixture
18 def sample_regex():
19 return (
@@ -61,104 +51,6 @@ def sample_json_schema():
51 }
52
53
64 -@pytest.fixture
65 -def sample_complex_json_schema():
66 - return {
67 - "type": "object",
68 - "properties": {
69 - "score": {
70 - "type": "integer",
71 - "minimum": 0,
72 - "maximum": 100, # Numeric range
73 - },
74 - "grade": {
75 - "type": "string",
76 - "pattern": "^[A-D]$", # Regex pattern
77 - },
78 - "email": {
79 - "type": "string",
80 - "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
81 - },
82 - "tags": {
83 - "type": "array",
84 - "items": {
85 - "type": "string",
86 - # Combining length and pattern restrictions
87 - "pattern": "^[a-z]{1,10}$",
88 - },
89 - },
90 - },
91 - "required": ["score", "grade", "email", "tags"],
92 - }
93 -
94 -
95 -@pytest.fixture
96 -def sample_definition_json_schema():
97 - return {
98 - "$defs": {
99 - "Step": {
100 - "properties": {
101 - "explanation": {"title": "Explanation", "type": "string"},
102 - "output": {"title": "Output", "type": "string"},
103 - },
104 - "required": ["explanation", "output"],
105 - "title": "Step",
106 - "type": "object",
107 - }
108 - },
109 - "properties": {
110 - "steps": {
111 - "items": {"$ref": "#/$defs/Step"},
112 - "title": "Steps",
113 - "type": "array",
114 - },
115 - "final_answer": {"title": "Final Answer", "type": "string"},
116 - },
117 - "required": ["steps", "final_answer"],
118 - "title": "MathReasoning",
119 - "type": "object",
120 - }
121 -
122 -
123 -@pytest.fixture
124 -def sample_enum_json_schema():
125 - return {
126 - "type": "object",
127 - "properties": {
128 - "status": {
129 - "type": "string",
130 - "enum": ["active", "inactive", "pending"], # Literal values using enum
131 - },
132 - "priority": {
133 - "type": "string",
134 - "enum": ["low", "medium", "high", "critical"],
135 - },
136 - "category": {
137 - "type": "object",
138 - "properties": {
139 - "type": {
140 - "type": "string",
141 - "enum": ["bug", "feature", "improvement"],
142 - },
143 - "severity": {
144 - "type": "integer",
145 - "enum": [1, 2, 3, 4, 5], # Enum can also contain numbers
146 - },
147 - },
148 - "required": ["type", "severity"],
149 - },
150 - "flags": {
151 - "type": "array",
152 - "items": {
153 - "type": "string",
154 - "enum": ["urgent", "blocked", "needs_review", "approved"],
155 - },
156 - },
157 - },
158 - "required": ["status", "priority", "category", "flags"],
159 - }
160 -
161 -
54 @pytest.fixture
55 def sample_structured_outputs_choices():
56 return [
@@ -175,18 +67,6 @@ def sample_structured_outputs_choices():
67 ]
68
69
178 -@pytest.fixture
179 -def sample_sql_statements():
180 - return """
181 -start: select_statement
182 -select_statement: "SELECT" column "from" table "where" condition
183 -column: "col_1" | "col_2"
184 -table: "table_1" | "table_2"
185 -condition: column "=" number
186 -number: "1" | "2"
187 -"""
188 -
189 -
70 @pytest.fixture(scope="session")
71 def qwen3_lora_files():
72 """Download Qwen3 LoRA files once per test session."""
tests/entrypoints/launchers/test_dp_supervisor.py
-1
@@ -47,7 +47,6 @@ _SUPERVISOR_PORT = 19256
47 _CHILD_PORT_BASE = 18000
48 _N_CHILDREN = 2
49 _PROBE_INTERVAL = 1.0
50 -_POLL_INTERVAL = 1.0
50
51
52 # ---------------------------------------------------------------------------
tests/entrypoints/openai/responses/test_serving_responses.py
-8
@@ -127,14 +127,6 @@ def test_serialize_message_pydantic_model_returns_dict() -> None:
127 assert serialized["message"] == "hello"
128
129
130 -@pytest.fixture
131 -def mock_serving_responses():
132 - """Create a mock OpenAIServingResponses instance."""
133 - serving_responses = MagicMock(spec=OpenAIServingResponses)
134 - serving_responses.tool_server = MagicMock(spec=ToolServer)
135 - return serving_responses
136 -
137 -
130 @pytest.fixture
131 def mock_context():
132 """Create a mock conversation context."""
tests/entrypoints/tool_parsers/test_openai_tool_parser.py
-3
@@ -117,10 +117,7 @@ MESSAGES_INVALID_CALL = [
117
118 # Expected outputs
119 FUNC_CALC = "calculator"
120 -FUNC_ARGS_CALC = '{"expression":"123 + 456"}'
121 -
120 FUNC_TIME = "get_time"
123 -FUNC_ARGS_TIME = '{"city": "New York"}'
121
122
123 # ==========================================================
tests/kernels/attention/test_attention.py
-1
@@ -26,7 +26,6 @@ NUM_BLOCKS = 4321 # Arbitrary values for testing
26 PARTITION_SIZE_ROCM = 256
27 DTYPES = [torch.bfloat16, torch.float16]
28 NUM_GEN_SEQS = [7] # Arbitrary values for testing
29 -NUM_PREFILL_SEQS = [3] # Arbitrary values for testing
29 NUM_HEADS = [(32, 8), (40, 40), (64, 8)] # Arbitrary values for testing
30
31 # Head sizes supported by the ROCm paged attention kernel.
tests/kernels/moe/utils.py
-92
@@ -7,7 +7,6 @@ import torch
7 import vllm._custom_ops as ops
8 from tests.kernels.quant_utils import per_block_cast_to_int8
9 from tests.kernels.quantization.nvfp4_utils import FLOAT4_E2M1_MAX, FLOAT8_E4M3_MAX
10 -from vllm.model_executor.layers.activation import SiluAndMul
10 from vllm.model_executor.layers.fused_moe.activation import MoEActivation
11 from vllm.model_executor.layers.fused_moe.all2all_utils import (
12 maybe_make_prepare_finalize,
@@ -552,97 +551,6 @@ class TestMLP(torch.nn.Module):
551 return x
552
553
555 -class RealMLP(torch.nn.Module):
556 - def __init__(
557 - self,
558 - hidden_size: int,
559 - intermediate_size: int,
560 - w1: torch.Tensor,
561 - w2: torch.Tensor,
562 - hidden_act: str = "silu",
563 - quant_config=None,
564 - reduce_results: bool = True,
565 - prefix: str = "",
566 - w1_s: torch.Tensor | None = None,
567 - w2_s: torch.Tensor | None = None,
568 - ) -> None:
569 - from vllm.model_executor.layers.linear import (
570 - MergedColumnParallelLinear,
571 - RowParallelLinear,
572 - )
573 -
574 - super().__init__()
575 - self.gate_up_proj = MergedColumnParallelLinear(
576 - hidden_size,
577 - [intermediate_size] * 2,
578 - bias=False,
579 - quant_config=quant_config,
580 - prefix=f"{prefix}.gate_up_proj",
581 - )
582 - self.gate_up_proj.register_parameter(
583 - "weight", torch.nn.Parameter(w1, requires_grad=False)
584 - )
585 - self.gate_up_proj.register_parameter(
586 - "weight_scale", torch.nn.Parameter(w1_s, requires_grad=False)
587 - )
588 - self.gate_up_proj.register_parameter(
589 - "input_scale", None
590 - ) # torch.nn.Parameter(None, requires_grad=False))
591 - self.down_proj = RowParallelLinear(
592 - intermediate_size,
593 - hidden_size,
594 - bias=False,
595 - quant_config=quant_config,
596 - reduce_results=reduce_results,
597 - prefix=f"{prefix}.down_proj",
598 - )
599 - self.down_proj.register_parameter(
600 - "weight", torch.nn.Parameter(w2, requires_grad=False)
601 - )
602 - self.down_proj.register_parameter(
603 - "weight_scale", torch.nn.Parameter(w2_s, requires_grad=False)
604 - )
605 - self.down_proj.register_parameter(
606 - "input_scale", None
607 - ) # torch.nn.Parameter(None, requires_grad=False))
608 - if hidden_act != "silu":
609 - raise ValueError(
610 - f"Unsupported activation: {hidden_act}. Only silu is supported for now."
611 - )
612 - self.act_fn = SiluAndMul()
613 -
614 - def forward(self, x):
615 - gate_up, _ = self.gate_up_proj(x)
616 - x = self.act_fn(gate_up)
617 - x, _ = self.down_proj(x)
618 - return x
619 -
620 -
621 -def make_shared_experts_with_weights(
622 - N: int,
623 - K: int,
624 - in_dtype: torch.dtype,
625 - w1: torch.Tensor,
626 - w2: torch.Tensor,
627 - w1_s: torch.Tensor | None = None,
628 - w2_s: torch.Tensor | None = None,
629 - quant_dtype: torch.dtype | str | None = None,
630 -) -> torch.nn.Module:
631 - old_dtype = torch.get_default_dtype()
632 - try:
633 - torch.set_default_dtype(in_dtype)
634 - if quant_dtype == torch.float8_e4m3fn:
635 - from vllm.model_executor.layers.quantization.fp8 import Fp8Config
636 -
637 - quant_config = Fp8Config()
638 - else:
639 - quant_config = None
640 -
641 - return RealMLP(K, N, w1, w2, "silu", quant_config, w1_s=w1_s, w2_s=w2_s)
642 - finally:
643 - torch.set_default_dtype(old_dtype)
644 -
645 -
554 def modular_triton_fused_moe(
555 moe_config: FusedMoEConfig,
556 quant_config: FusedMoEQuantConfig,
tests/lora/conftest.py
-18
@@ -76,18 +76,6 @@ def dist_init():
76 cleanup_dist_env_and_memory(shutdown_ray=True)
77
78
79 -@pytest.fixture
80 -def dist_init_torch_only():
81 - if torch.distributed.is_initialized():
82 - return
83 - backend = current_platform.dist_backend
84 -
85 - temp_file = tempfile.mkstemp()[1]
86 - torch.distributed.init_process_group(
87 - world_size=1, rank=0, init_method=f"file://{temp_file}", backend=backend
88 - )
89 -
90 -
79 class DummyLoRAModel(nn.Sequential, SupportsLoRA):
80 pass
81
@@ -208,12 +196,6 @@ def qwen2vl_lora_files():
196 return hf_api().snapshot_download(repo_id="jeeejeee/qwen2-vl-lora-pokemon")
197
198
211 -@pytest.fixture(scope="session")
212 -def qwen25vl_base_huggingface_id():
213 - # used as a base model for testing with qwen25vl lora adapter
214 - return "Qwen/Qwen2.5-VL-3B-Instruct"
215 -
216 -
199 @pytest.fixture(scope="session")
200 def qwen25vl_lora_files():
201 return hf_api().snapshot_download(repo_id="jeeejeee/qwen25-vl-lora-pokemon")
tests/models/multimodal/generation/test_phi4siglip.py deleted
-198
@@ -1,198 +0,0 @@
1 -# SPDX-License-Identifier: Apache-2.0
2 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 -
4 -from collections.abc import Sequence
5 -from importlib.metadata import version
6 -
7 -import pytest
8 -import regex as re
9 -from packaging.version import Version
10 -from transformers import AutoModelForCausalLM, AutoTokenizer
11 -
12 -from vllm.logprobs import SampleLogprobs
13 -from vllm.multimodal.image import rescale_image_size
14 -
15 -from ....conftest import (
16 - IMAGE_ASSETS,
17 - HfRunner,
18 - PromptImageInput,
19 - VllmRunner,
20 -)
21 -from ....utils import multi_gpu_test
22 -from ...utils import check_logprobs_close
23 -
24 -pytestmark = pytest.mark.skipif(
25 - Version("5.0") <= Version(version("transformers")),
26 - reason=(
27 - "vllm upgraded transformers above v5.4 where HF model custom code uses siglip2 "
28 - "internals (filter_out_non_signature_kwargs) removed by "
29 - "huggingface/transformers#43514"
30 - ),
31 -)
32 -
33 -MODEL_ID = "microsoft/Phi-4-reasoning-vision-15B"
34 -
35 -HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts(
36 - {
37 - "stop_sign": "<|user|>\n<image>\nWhat's the content of the image?<|end|>\n<|assistant|>\n", # noqa: E501
38 - "cherry_blossom": "<|user|>\n<image>\nPlease infer the season with reason in details.<|end|>\n<|assistant|>\n", # noqa: E501
39 - }
40 -)
41 -HF_MULTIIMAGE_IMAGE_PROMPT = (
42 - "<|user|>\n<image>\n<image>\nDescribe these images.<|end|>\n<|assistant|>\n" # noqa: E501
43 -)
44 -
45 -DTYPE = "half"
46 -MAX_TOKENS = 128
47 -NUM_LOGPROBS = 10
48 -
49 -
50 -def vllm_to_hf_output(
51 - vllm_output: tuple[list[int], str, SampleLogprobs | None], model: str
52 -):
53 - """Sanitize vllm output to be comparable with hf output."""
54 - _, output_str, out_logprobs = vllm_output
55 -
56 - output_str_without_image = re.sub(r"(<image>)+", "", output_str)
57 - if output_str_without_image and output_str_without_image[0] == " ":
58 - output_str_without_image = output_str_without_image[1:]
59 -
60 - hf_output_str = output_str_without_image + "<|end|><|endoftext|>"
61 -
62 - tokenizer = AutoTokenizer.from_pretrained(model, trust_remote_code=True)
63 - hf_output_ids = tokenizer.encode(output_str_without_image)
64 - if hf_output_ids and hf_output_ids[0] == tokenizer.bos_token_id:
65 - hf_output_ids = hf_output_ids[1:]
66 -
67 - return hf_output_ids, hf_output_str, out_logprobs
68 -
69 -
70 -def _build_single_image_inputs(
71 - image_assets,
72 -) -> list[tuple[list[str], PromptImageInput]]:
73 - """Build single-image inputs for all size_factors at once."""
74 - images = [asset.pil_image for asset in image_assets]
75 - all_inputs: list[tuple[list[str], PromptImageInput]] = []
76 - for size_factors in [[1.0], [0.25, 0.5, 1.0]]:
77 - for image, prompt in zip(images, HF_IMAGE_PROMPTS):
78 - all_inputs.append(
79 - (
80 - [prompt for _ in size_factors],
81 - [rescale_image_size(image, f) for f in size_factors],
82 - )
83 - )
84 - return all_inputs
85 -
86 -
87 -def _build_multi_image_inputs(
88 - image_assets,
89 -) -> list[tuple[list[str], PromptImageInput]]:
90 - """Build multi-image inputs for all size_factors at once."""
91 - images = [asset.pil_image for asset in image_assets]
92 - all_inputs: list[tuple[list[str], PromptImageInput]] = []
93 - for size_factors in [[0.5], [0.15, 0.30]]:
94 - all_inputs.append(
95 - (
96 - [HF_MULTIIMAGE_IMAGE_PROMPT for _ in size_factors],
97 - [
98 - [rescale_image_size(image, factor) for image in images]
99 - for factor in size_factors
100 - ],
101 - )
102 - )
103 - return all_inputs
104 -
105 -
106 -def _run_and_compare(
107 - hf_runner: type[HfRunner],
108 - vllm_runner: type[VllmRunner],
109 - all_inputs: Sequence[tuple[list[str], PromptImageInput]],
110 - model: str,
111 - max_model_len: int,
112 - max_num_seqs: int,
113 - mm_limit: int,
114 - gpu_memory_utilization: float,
115 -):
116 - """Load each runner once, run all inputs, then compare."""
117 - # NOTE: run vLLM first, then HF. vLLM needs a fresh process without
118 - # cuda initialization; running HF first would break the multiprocessing
119 - # backend with fork method.
120 - with vllm_runner(
121 - model,
122 - runner="generate",
123 - max_model_len=max_model_len,
124 - max_num_seqs=max_num_seqs,
125 - gpu_memory_utilization=gpu_memory_utilization,
126 - dtype=DTYPE,
127 - limit_mm_per_prompt={"image": mm_limit},
128 - tensor_parallel_size=2,
129 - trust_remote_code=True,
130 - enforce_eager=True,
131 - ) as vllm_model:
132 - vllm_outputs_per_case = [
133 - vllm_model.generate_greedy_logprobs(
134 - prompts,
135 - MAX_TOKENS,
136 - num_logprobs=NUM_LOGPROBS,
137 - images=images,
138 - )
139 - for prompts, images in all_inputs
140 - ]
141 -
142 - hf_model_kwargs = {"_attn_implementation": "sdpa", "device_map": "auto"}
143 - with hf_runner(
144 - model,
145 - dtype=DTYPE,
146 - model_kwargs=hf_model_kwargs,
147 - auto_cls=AutoModelForCausalLM,
148 - trust_remote_code=True,
149 - ) as hf_model:
150 - hf_outputs_per_case = [
151 - hf_model.generate_greedy_logprobs_limit(
152 - prompts,
153 - MAX_TOKENS,
154 - num_logprobs=NUM_LOGPROBS,
155 - images=images,
156 - )
157 - for prompts, images in all_inputs
158 - ]
159 -
160 - for hf_outputs, vllm_outputs in zip(hf_outputs_per_case, vllm_outputs_per_case):
161 - check_logprobs_close(
162 - outputs_0_lst=hf_outputs,
163 - outputs_1_lst=vllm_outputs,
164 - name_0="hf",
165 - name_1="vllm",
166 - )
167 -
168 -
169 -@multi_gpu_test(num_gpus=2)
170 -@pytest.mark.parametrize("model", [MODEL_ID])
171 -def test_models(hf_runner, vllm_runner, image_assets, model) -> None:
172 - all_inputs = _build_single_image_inputs(image_assets)
173 - _run_and_compare(
174 - hf_runner,
175 - vllm_runner,
176 - all_inputs,
177 - model,
178 - max_model_len=8192,
179 - max_num_seqs=2,
180 - mm_limit=1,
181 - gpu_memory_utilization=0.80,
182 - )
183 -
184 -
185 -@multi_gpu_test(num_gpus=2)
186 -@pytest.mark.parametrize("model", [MODEL_ID])
187 -def test_multi_images_models(hf_runner, vllm_runner, image_assets, model) -> None:
188 - all_inputs = _build_multi_image_inputs(image_assets)
189 - _run_and_compare(
190 - hf_runner,
191 - vllm_runner,
192 - all_inputs,
193 - model,
194 - max_model_len=8192,
195 - max_num_seqs=2,
196 - mm_limit=2,
197 - gpu_memory_utilization=0.80,
198 - )
tests/reasoning/test_kimi_k2_reasoning_parser.py
-15
@@ -1,7 +1,6 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 -from unittest.mock import MagicMock
4
5 import pytest
6
@@ -13,20 +12,6 @@ from vllm.tokenizers import get_tokenizer
12 REASONING_MODEL_NAME = "moonshotai/Kimi-K2.5"
13
14
16 -@pytest.fixture
17 -def mock_kimi_k2_tokenizer():
18 - tokenizer = MagicMock()
19 - tokenizer.get_vocab.return_value = {
20 - "<think>": 100,
21 - "</think>": 101,
22 - "<|tool_calls_section_begin|>": 200,
23 - "<|tool_calls_section_end|>": 201,
24 - "<|tool_call_begin|>": 202,
25 - "<|tool_call_end|>": 203,
26 - }
27 - return tokenizer
28 -
29 -
15 @pytest.fixture(scope="module")
16 def kimi_k2_tokenizer():
17 return get_tokenizer(tokenizer_name=REASONING_MODEL_NAME, trust_remote_code=True)
tests/tracing/conftest.py
-6
@@ -142,9 +142,3 @@ def trace_service() -> Generator[FakeTraceService, None, None]:
142 yield service
143
144 server.stop(grace=None)
145 -
146 -
147 -@pytest.fixture
148 -def trace_server_address() -> str:
149 - """Returns the address of the fake trace server."""
150 - return FAKE_TRACE_SERVER_ADDRESS
tests/v1/engine/conftest.py
-4
@@ -2,7 +2,6 @@
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 import pytest
5 -import torch
5 from transformers import AutoTokenizer
6
7 from tests.v1.engine.utils import (
@@ -19,9 +18,6 @@ from vllm.engine.arg_utils import EngineArgs
18
19 from ...distributed.conftest import publisher_config, random_port # noqa: F401
20
22 -EngineCoreSampleLogprobsType = list[tuple[torch.Tensor, torch.Tensor]]
23 -EngineCorePromptLogprobsType = tuple[torch.Tensor, torch.Tensor]
24 -
21
22 def _build_test_vectors_no_logprobs() -> DummyOutputProcessorTestVectors:
23 """Generate output processor dummy test vectors, without logprobs.
tests/v1/engine/test_llm_engine.py
-7
@@ -49,13 +49,6 @@ def vllm_model(vllm_runner, request):
49 yield vllm_model
50
51
52 -@pytest.fixture(scope="function")
53 -def vllm_model_apc(vllm_runner):
54 - """VllmRunner test fixture with APC."""
55 - with _vllm_model(True, vllm_runner) as vllm_model:
56 - yield vllm_model
57 -
58 -
52 @pytest.fixture(
53 # Function scope decouples tests & allows
54 # env var adjustment via monkeypatch