[Misc] Replaced asserts with proper exceptions to improve UX for pooling (#44593)

Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
Taneem Ibrahim
2026-06-06 05:57:26 +00:00
committed by GitHub
parent ec0a31d4aa
commit eafbb06331
7 changed files with 44 additions and 16 deletions
@@ -115,7 +115,10 @@ def pooler_for_classify(
vllm_config = get_current_vllm_config()
model_config = vllm_config.model_config
assert model_config.pooler_config is not None
if model_config.pooler_config is None:
raise ValueError(
"model_config.pooler_config must be set for classification pooling"
)
head = ClassifierPoolerHead(
head_dtype=model_config.head_dtype,
classifier=classifier,