[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user