Skip to content

Commit b1ca082

Browse files
authored
Add test for validating error for bad model (#1020)
1 parent 36bf988 commit b1ca082

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/model_registry/model_catalog/huggingface/test_huggingface_negative.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ class TestHuggingFaceNegative:
115115
"failed to expand model patterns: no models found",
116116
id="test_hf_source_non_existent_allowed_organization",
117117
),
118+
pytest.param(
119+
"""
120+
catalogs:
121+
- name: HuggingFace Hub
122+
id: error_catalog
123+
type: hf
124+
enabled: true
125+
includedModels:
126+
- 'microsoft/phi-3-abc-random'
127+
""",
128+
"Failed to fetch some models, ensure models exist and are accessible with given credentials. "
129+
"Failed models: [microsoft/phi-3-abc-random]",
130+
id="test_hf_bad_model_name",
131+
),
118132
],
119133
indirect=["updated_catalog_config_map_scope_function"],
120134
)

0 commit comments

Comments
 (0)