Unverified Commit 18572e33 authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

[Bugfix] Fix `HfExampleModels.find_hf_info` (#12223)


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent 86bfb6db
...@@ -302,6 +302,11 @@ class HfExampleModels: ...@@ -302,6 +302,11 @@ class HfExampleModels:
if info.default == model_id: if info.default == model_id:
return info 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}") raise ValueError(f"No example model defined for {model_id}")
......
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