@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / c51e397fe8
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 16, 07:00 UTC

[Misc] Suppress duplicated logging regarding multimodal input pipeline (#10530)

Signed-off-by: Roger Wang <ywang@roblox.com>

Roger Wang committed Nov 21, 2024 at 09:21 UTC c51e397fe8db2ef0664814ef3f80e1237c7283da
2 files changed +8 -2
vllm/inputs/preprocess.py
+2 -2
@@ -10,7 +10,7 @@ from vllm.multimodal import MULTIMODAL_REGISTRY, MultiModalRegistry
10 from vllm.multimodal.processing import MultiModalDataDict, MultiModalInputsV2
11 from vllm.prompt_adapter.request import PromptAdapterRequest
12 from vllm.transformers_utils.tokenizer_group import BaseTokenizerGroup
13 -from vllm.utils import print_warning_once
13 +from vllm.utils import print_info_once, print_warning_once
14
15 from .data import (DecoderOnlyInputs, EncoderDecoderInputs, ProcessorInputs,
16 PromptType, SingletonInputs, SingletonPrompt, token_inputs)
@@ -212,7 +212,7 @@ class InputPreprocessor:
212 # updated to use the new multi-modal processor
213 can_process_multimodal = self.mm_registry.has_processor(model_config)
214 if not can_process_multimodal:
215 - logger.info(
215 + print_info_once(
216 "Your model uses the legacy input pipeline instead of the new "
217 "multi-modal processor. Please note that the legacy pipeline "
218 "will be removed in a future release. For more details, see: "
vllm/utils.py
+6
@@ -705,6 +705,12 @@ def create_kv_caches_with_random(
705 return key_caches, value_caches
706
707
708 +@lru_cache
709 +def print_info_once(msg: str) -> None:
710 + # Set the stacklevel to 2 to print the caller's line info
711 + logger.info(msg, stacklevel=2)
712 +
713 +
714 @lru_cache
715 def print_warning_once(msg: str) -> None:
716 # Set the stacklevel to 2 to print the caller's line info