@@ -79,7 +79,9 @@ def fetch_config_only(cls, model_id: str) -> Dict[str, Any]:
7979 f"Model '{ model_id } ' requires authentication. Please set your HuggingFace access token as an environment variable."
8080 )
8181 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+ )
8385 elif response .status_code != 200 :
8486 raise AquaValueError (
8587 f"Failed to fetch config for '{ model_id } '. Status: { response .status_code } "
@@ -184,13 +186,13 @@ def _get_model_config_and_name(
184186 if HuggingFaceModelFetcher .is_huggingface_model_id (model_id ):
185187 logger .info (f"'{ model_id } ' identified as a Hugging Face model ID." )
186188 ds_model = self ._search_model_in_catalog (model_id , compartment_id )
187- if ds_model and ds_model . artifact :
189+ if ds_model :
188190 logger .info (
189191 "Loading configuration from existing model catalog artifact."
190192 )
191193 try :
192194 return (
193- load_config (ds_model . artifact , "config.json" ),
195+ self . _get_model_config (ds_model ),
194196 ds_model .display_name ,
195197 )
196198 except AquaFileNotFoundError :
@@ -207,7 +209,7 @@ def _search_model_in_catalog(
207209 self , model_id : str , compartment_id : str
208210 ) -> Optional [DataScienceModel ]:
209211 """
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.
211213 """
212214 try :
213215 # This should work since the SDK's list method can filter by display_name.
0 commit comments