[MISC] Cleanup deprecated parameters (#53559)

Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
Jee Jee Li
2026-08-24 10:19:04 -07:00
committed by GitHub
co-authored by Cyrus Leung
parent 6648eb118d
commit 4f686e182a
12 changed files with 16 additions and 93 deletions
@@ -58,13 +58,11 @@ class BgeM3SparseEmbeddingsProcessor(
params.dimensions = self.embed_dimensions params.dimensions = self.embed_dimensions
return params return params
def parse_request( def parse_data(self, data: object) -> SparseEmbeddingCompletionRequestMixin:
self, request_data: object
) -> SparseEmbeddingCompletionRequestMixin:
# for vllm.entrypoints.llm.LLM, offline mode, calls `encode` directly. # for vllm.entrypoints.llm.LLM, offline mode, calls `encode` directly.
if isinstance(request_data, dict): if isinstance(data, dict):
return SparseEmbeddingCompletionRequestMixin(**request_data) return SparseEmbeddingCompletionRequestMixin(**data)
raise TypeError("request_data should be a dictionary") raise TypeError("data should be a dictionary")
def pre_process( def pre_process(
self, self,
+1 -1
View File
@@ -119,7 +119,7 @@ class AttentionConfig:
if self.use_fp4_indexer_cache is not None: if self.use_fp4_indexer_cache is not None:
logger.warning( logger.warning(
"use_fp4_indexer_cache is deprecated and will be removed in " "use_fp4_indexer_cache is deprecated and will be removed in "
"v0.19. Use indexer_kv_dtype instead (True -> 'mxfp4')." "v0.29. Use indexer_kv_dtype instead (True -> 'mxfp4')."
) )
if self.use_fp4_indexer_cache: if self.use_fp4_indexer_cache:
if self.indexer_kv_dtype not in ("auto", "mxfp4"): if self.indexer_kv_dtype not in ("auto", "mxfp4"):
@@ -213,7 +213,7 @@ class PoolingIOProcessor:
if param.task is None: if param.task is None:
param.task = pooling_task param.task = pooling_task
elif pooling_task == "plugin": elif pooling_task == "plugin":
# `plugin` task uses io_processor.parse_request to verify inputs. # `plugin` task uses io_processor.parse_data to verify inputs.
# We actually allow plugin to overwrite pooling_task. # We actually allow plugin to overwrite pooling_task.
pass pass
elif param.task != pooling_task: elif param.task != pooling_task:
+1 -1
View File
@@ -173,7 +173,7 @@ class PoolingOfflineMixin(OfflineInferenceMixin):
"Try converting the model using `--convert classify`." "Try converting the model using `--convert classify`."
) )
# plugin task uses io_processor.parse_request to verify inputs # plugin task uses io_processor.parse_data to verify inputs
if pooling_task != "plugin" and pooling_task != self.pooling_task: if pooling_task != "plugin" and pooling_task != self.pooling_task:
if pooling_task not in self.supported_tasks: if pooling_task not in self.supported_tasks:
raise ValueError( raise ValueError(
+1 -1
View File
@@ -74,7 +74,7 @@ class ServingPooling(PoolingBaseServing):
assert request.task is not None assert request.task is not None
pooling_task = request.task pooling_task = request.task
# plugin task uses io_processor.parse_request to verify inputs # plugin task uses io_processor.parse_data to verify inputs
if pooling_task != "plugin" and pooling_task != self.pooling_task: if pooling_task != "plugin" and pooling_task != self.pooling_task:
if pooling_task not in self.supported_tasks: if pooling_task not in self.supported_tasks:
raise VLLMValidationError( raise VLLMValidationError(
-19
View File
@@ -91,8 +91,6 @@ if TYPE_CHECKING:
VLLM_FLOAT32_MATMUL_PRECISION: Literal["highest", "high", "medium"] = "highest" VLLM_FLOAT32_MATMUL_PRECISION: Literal["highest", "high", "medium"] = "highest"
VLLM_BATCH_INVARIANT: bool = False VLLM_BATCH_INVARIANT: bool = False
VLLM_TRITON_USE_TD: bool | None = None VLLM_TRITON_USE_TD: bool | None = None
# Deprecated alias of VLLM_TRITON_USE_TD (removed in v0.25).
VLLM_TRITON_ATTN_USE_TD: bool | None = None
VLLM_GPU_SYNC_CHECK: Literal["warn", "error"] | None = None VLLM_GPU_SYNC_CHECK: Literal["warn", "error"] | None = None
MAX_JOBS: str | None = None MAX_JOBS: str | None = None
NVCC_THREADS: str | None = None NVCC_THREADS: str | None = None
@@ -563,19 +561,6 @@ def get_env_or_set_default(
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
def _deprecated_triton_attn_use_td() -> None:
"""Warn that VLLM_TRITON_ATTN_USE_TD was renamed to VLLM_TRITON_USE_TD.
The old name is ignored; VLLM_TRITON_USE_TD is the supported variable.
"""
if "VLLM_TRITON_ATTN_USE_TD" in os.environ:
logger.warning(
"VLLM_TRITON_ATTN_USE_TD is deprecated and will be removed in "
"v0.25. Use VLLM_TRITON_USE_TD instead."
)
return None
def _resolve_rust_cli_path() -> str | None: def _resolve_rust_cli_path() -> str | None:
"""Resolve the vllm-rs binary path. """Resolve the vllm-rs binary path.
@@ -651,10 +636,6 @@ environment_variables: dict[str, Callable[[], Any]] = {
"VLLM_GPU_SYNC_CHECK": env_with_choices( "VLLM_GPU_SYNC_CHECK": env_with_choices(
"VLLM_GPU_SYNC_CHECK", None, ["warn", "error"] "VLLM_GPU_SYNC_CHECK", None, ["warn", "error"]
), ),
# Deprecated: renamed to VLLM_TRITON_USE_TD. Kept registered so it does
# not trip the unknown-env-var check; warns on use and is otherwise
# ignored.
"VLLM_TRITON_ATTN_USE_TD": lambda: _deprecated_triton_attn_use_td(),
# Maximum number of compilation jobs to run in parallel. # Maximum number of compilation jobs to run in parallel.
# By default this is the number of CPUs # By default this is the number of CPUs
"MAX_JOBS": lambda: os.getenv("MAX_JOBS", None), "MAX_JOBS": lambda: os.getenv("MAX_JOBS", None),
@@ -15,7 +15,7 @@ class MistralLarge3ForCausalLM(DeepseekV3ForCausalLM):
# (\A...\Z) and after substitution the resulting key always starts with # (\A...\Z) and after substitution the resulting key always starts with
# "model." or "lm_head.", so no later pattern can accidentally match again. # "model." or "lm_head.", so no later pattern can accidentally match again.
hf_to_vllm_mapper = WeightsMapper( hf_to_vllm_mapper = WeightsMapper(
orig_to_new_regex={ # noqa: B950 orig_to_new_regex={
regex.compile( regex.compile(
r"\Alayers\.(\d+)\.attention_norm\.weight\Z" r"\Alayers\.(\d+)\.attention_norm\.weight\Z"
): r"model.layers.\1.input_layernorm.weight", ): r"model.layers.\1.input_layernorm.weight",
-14
View File
@@ -12,7 +12,6 @@ from typing import TYPE_CHECKING, Any
import numpy as np import numpy as np
import numpy.typing as npt import numpy.typing as npt
from PIL import Image from PIL import Image
from typing_extensions import deprecated
from vllm.inputs import MultiModalPlaceholders from vllm.inputs import MultiModalPlaceholders
from vllm.utils.import_utils import LazyLoader from vllm.utils.import_utils import LazyLoader
@@ -325,19 +324,6 @@ def group_and_batch_mm_kwargs(
yield modality, num_items, mm_kwargs_batch yield modality, num_items, mm_kwargs_batch
@deprecated(
"`group_mm_kwargs_by_modality` has been renamed to `group_and_batch_mm_kwargs`. "
"The old name will be removed in v0.19."
)
def group_mm_kwargs_by_modality(
mm_kwargs: list[tuple[str, MultiModalKwargsItem]],
*,
device: torch.types.Device = None,
pin_memory: bool = False,
) -> Generator[tuple[str, int, BatchedTensorInputs], None, None]:
return group_and_batch_mm_kwargs(mm_kwargs, device=device, pin_memory=pin_memory)
def fetch_audio( def fetch_audio(
audio_url: str, audio_url: str,
audio_io_kwargs: dict[str, Any] | None = None, audio_io_kwargs: dict[str, Any] | None = None,
-44
View File
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import warnings
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from collections.abc import AsyncGenerator, Sequence from collections.abc import AsyncGenerator, Sequence
from typing import Generic, TypeVar from typing import Generic, TypeVar
@@ -25,61 +24,18 @@ class IOProcessor(ABC, Generic[IOProcessorInput, IOProcessorOutput]):
self.vllm_config = vllm_config self.vllm_config = vllm_config
def parse_data(self, data: object) -> IOProcessorInput: def parse_data(self, data: object) -> IOProcessorInput:
if callable(parse_request := getattr(self, "parse_request", None)):
warnings.warn(
"`parse_request` has been renamed to `parse_data`. "
"Please update your IO Processor Plugin to use the new name. "
"The old name will be removed in v0.19.",
DeprecationWarning,
stacklevel=2,
)
return parse_request(data) # type: ignore
raise NotImplementedError raise NotImplementedError
def merge_sampling_params( def merge_sampling_params(
self, self,
params: SamplingParams | None = None, params: SamplingParams | None = None,
) -> SamplingParams: ) -> SamplingParams:
if callable(
validate_or_generate_params := getattr(
self, "validate_or_generate_params", None
)
):
warnings.warn(
"`validate_or_generate_params` has been split into "
"`merge_sampling_params` and `merge_pooling_params`."
"Please update your IO Processor Plugin to use the new methods. "
"The old name will be removed in v0.19.",
DeprecationWarning,
stacklevel=2,
)
return validate_or_generate_params(params) # type: ignore
return params or SamplingParams() return params or SamplingParams()
def merge_pooling_params( def merge_pooling_params(
self, self,
params: PoolingParams | None = None, params: PoolingParams | None = None,
) -> PoolingParams: ) -> PoolingParams:
if callable(
validate_or_generate_params := getattr(
self, "validate_or_generate_params", None
)
):
warnings.warn(
"`validate_or_generate_params` has been split into "
"`merge_sampling_params` and `merge_pooling_params`."
"Please update your IO Processor Plugin to use the new methods. "
"The old name will be removed in v0.19.",
DeprecationWarning,
stacklevel=2,
)
return validate_or_generate_params(params) # type: ignore
return params or PoolingParams(task="plugin") return params or PoolingParams(task="plugin")
@abstractmethod @abstractmethod
+1 -1
View File
@@ -88,7 +88,7 @@ class PoolingParams(
return deepcopy(self) return deepcopy(self)
def verify(self, model_config: ModelConfig) -> None: def verify(self, model_config: ModelConfig) -> None:
# plugin task uses io_processor.parse_request to verify inputs, # plugin task uses io_processor.parse_data to verify inputs,
# skipping PoolingParams verify # skipping PoolingParams verify
if self.task == "plugin": if self.task == "plugin":
if self.skip_reading_prefix_cache is None: if self.skip_reading_prefix_cache is None:
+3 -2
View File
@@ -339,8 +339,9 @@ class AsyncLLM(EngineClient):
if isinstance(prompt, EngineCoreRequest): if isinstance(prompt, EngineCoreRequest):
logger.warning_once( logger.warning_once(
"Passing EngineCoreRequest to AsyncLLM.generate() and .add_requests() " "Passing EngineCoreRequest to AsyncLLM.generate() and .add_requests() "
"is deprecated and will be removed in v0.18. You should instead pass " "is deprecated and will be removed in the future. You should "
"the outputs of Renderer.render_cmpl() or Renderer.render_chat()." "instead pass the outputs of Renderer.render_cmpl() or "
"Renderer.render_chat()."
) )
request = prompt request = prompt
+3 -2
View File
@@ -236,8 +236,9 @@ class LLMEngine:
if isinstance(prompt, EngineCoreRequest): if isinstance(prompt, EngineCoreRequest):
logger.warning_once( logger.warning_once(
"Passing EngineCoreRequest to LLMEngine.generate() and .add_requests() " "Passing EngineCoreRequest to LLMEngine.generate() and .add_requests() "
"is deprecated and will be removed in v0.18. You should instead pass " "is deprecated and will be removed in the future. You should "
"the outputs of Renderer.render_cmpl() or Renderer.render_chat()." "instead pass the outputs of Renderer.render_cmpl() or "
"Renderer.render_chat()."
) )
request = prompt request = prompt