[Bugfix] Fix HfExampleModels.find_hf_info (#12223)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung 2025-01-20 23:35:36 +08:00 committed by GitHub
parent 86bfb6dba7
commit 18572e3384
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -302,6 +302,11 @@ class HfExampleModels:
if info.default == model_id:
return info
# Fallback to extras
for info in self.hf_models.values():
if any(extra == model_id for extra in info.extras.values()):
return info
raise ValueError(f"No example model defined for {model_id}")