"docs/source/models/supported_models.md" did not exist on "298695b76691867ecd320ea6a2c6d0c6a843d5ae"
Unverified Commit 05c1126f authored by Reid's avatar Reid Committed by GitHub
Browse files

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


Signed-off-by: default avatarreidliu41 <reid201711@gmail.com>
parent 875af38e
......@@ -574,13 +574,11 @@ def get_pooling_config_name(pooling_name: str) -> Union[str, None]:
supported_pooling_types = ['LAST', 'ALL', 'CLS', 'STEP', 'MEAN']
pooling_type_name = pooling_name.upper()
try:
if pooling_type_name in supported_pooling_types:
return pooling_type_name
except NotImplementedError as e:
logger.debug("Pooling type not supported", e)
return None
return None
raise NotImplementedError(
f"Pooling type {pooling_type_name} not supported")
@cache
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment