[Misc] Use VLLMValidationError in pooling input validation (#51931)

Signed-off-by: frank-suwen <suwenw2@outlook.com>
This commit is contained in:
Frank
2026-08-13 06:13:25 +00:00
committed by GitHub
parent b908a21f9a
commit 7bc1660bd6
3 changed files with 83 additions and 5 deletions
@@ -7,6 +7,7 @@ import pytest
from vllm import LLM, PoolingParams
from vllm.distributed import cleanup_dist_env_and_memory
from vllm.exceptions import VLLMValidationError
MODEL_NAME = "intfloat/multilingual-e5-small"
@@ -61,7 +62,7 @@ def test_multiple_pooling_params(llm: LLM):
assert len(PROMPTS) == len(outputs)
# Exception raised, if the size of params does not match the size of prompts
with pytest.raises(ValueError):
with pytest.raises(VLLMValidationError):
outputs = llm.encode(
PROMPTS, pooling_params=pooling_params[:3], pooling_task="embed"
)