@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 05c1126f29
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 14, 23:45 UTC

[Misc] remove unused try-except in pooling config check (#21618)

Signed-off-by: reidliu41 <reid201711@gmail.com>

Reid committed Jul 26, 2025 at 20:20 UTC 05c1126f292ccaf6c57f46cc2c4f5df37db21543
1 file changed +5 -7
vllm/transformers_utils/config.py
+5 -7
@@ -574,13 +574,11 @@ def get_pooling_config_name(pooling_name: str) -> Union[str, None]:
574 supported_pooling_types = ['LAST', 'ALL', 'CLS', 'STEP', 'MEAN']
575 pooling_type_name = pooling_name.upper()
576
577 - try:
578 - if pooling_type_name in supported_pooling_types:
579 - return pooling_type_name
580 - except NotImplementedError as e:
581 - logger.debug("Pooling type not supported", e)
582 - return None
583 - return None
577 + if pooling_type_name in supported_pooling_types:
578 + return pooling_type_name
579 +
580 + raise NotImplementedError(
581 + f"Pooling type {pooling_type_name} not supported")
582
583
584 @cache