From a9e5bad12c3427d1250d560804721985d680a4b8 Mon Sep 17 00:00:00 2001 From: DarkLight1337 Date: Mon, 20 Jan 2025 12:56:35 +0000 Subject: [PATCH] [Bugfix] Fix `HfExampleModels.find_hf_info` Signed-off-by: DarkLight1337 --- tests/models/registry.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/models/registry.py b/tests/models/registry.py index 23227ea6b9714..e99dbd16c47b9 100644 --- a/tests/models/registry.py +++ b/tests/models/registry.py @@ -302,6 +302,11 @@ def find_hf_info(self, model_id: str) -> _HfExamplesInfo: 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}")