@@ -79,7 +79,9 @@ def fetch_config_only(cls, model_id: str) -> Dict[str, Any]:
79
79
f"Model '{ model_id } ' requires authentication. Please set your HuggingFace access token as an environment variable."
80
80
)
81
81
elif response .status_code == 404 :
82
- raise AquaValueError (f"Model '{ model_id } ' not found on HuggingFace." )
82
+ raise AquaValueError (
83
+ f"Model '{ model_id } ' not found on HuggingFace. Please check the name for typos."
84
+ )
83
85
elif response .status_code != 200 :
84
86
raise AquaValueError (
85
87
f"Failed to fetch config for '{ model_id } '. Status: { response .status_code } "
@@ -184,13 +186,13 @@ def _get_model_config_and_name(
184
186
if HuggingFaceModelFetcher .is_huggingface_model_id (model_id ):
185
187
logger .info (f"'{ model_id } ' identified as a Hugging Face model ID." )
186
188
ds_model = self ._search_model_in_catalog (model_id , compartment_id )
187
- if ds_model and ds_model . artifact :
189
+ if ds_model :
188
190
logger .info (
189
191
"Loading configuration from existing model catalog artifact."
190
192
)
191
193
try :
192
194
return (
193
- load_config (ds_model . artifact , "config.json" ),
195
+ self . _get_model_config (ds_model ),
194
196
ds_model .display_name ,
195
197
)
196
198
except AquaFileNotFoundError :
@@ -207,7 +209,7 @@ def _search_model_in_catalog(
207
209
self , model_id : str , compartment_id : str
208
210
) -> Optional [DataScienceModel ]:
209
211
"""
210
- Searches for a Hugging Face model in the Data Science model catalog by display name.
212
+ Searches for a model in the Data Science model catalog by display name.
211
213
"""
212
214
try :
213
215
# This should work since the SDK's list method can filter by display_name.
0 commit comments