@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 18e8545297
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 8, 17:45 UTC

[Revert] Add util `handle_deprecated` back (#33998)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Feb 6, 2026 at 23:14 UTC 18e85452979d2f974f2c193d159816a893fbc253
1 file changed +25
vllm/config/utils.py
+25
@@ -355,3 +355,28 @@ class Range:
355
356 def __repr__(self) -> str:
357 return self.__str__()
358 +
359 +
360 +def handle_deprecated(
361 + config: ConfigT,
362 + old_name: str,
363 + new_name_or_names: str | list[str],
364 + removal_version: str,
365 +) -> None:
366 + old_val = getattr(config, old_name)
367 + if old_val is None:
368 + return
369 +
370 + if isinstance(new_name_or_names, str):
371 + new_names = [new_name_or_names]
372 + else:
373 + new_names = new_name_or_names
374 +
375 + msg = (
376 + f"{old_name} is deprecated and will be removed in {removal_version}. "
377 + f"Use {', '.join(new_names)} instead."
378 + )
379 + logger.warning(msg)
380 +
381 + for new_name in new_names:
382 + setattr(config, new_name, old_val)