Skip to content

Commit 2251e3c

Browse files
committed
added docstrings
1 parent e324143 commit 2251e3c

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

ads/aqua/shaperecommend/recommend.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,25 @@ def which_shapes(
131131
return shape_recommendation_report
132132

133133
def _get_model_config_and_name(
134-
self, model_id: str, compartment_id: Optional[str] = None
135-
) -> (dict, str):
134+
self, model_id: str, compartment_id: Optional[str]
135+
) -> Tuple[Dict, str]:
136136
"""
137-
Loads model configuration, handling OCID and Hugging Face model IDs.
137+
Loads model configuration by trying OCID logic first, then falling back
138+
to treating the model_id as a Hugging Face Hub ID.
139+
140+
Parameters
141+
----------
142+
model_id : str
143+
The model OCID or Hugging Face model ID.
144+
compartment_id : Optional[str]
145+
The compartment OCID, used for searching the model catalog.
146+
147+
Returns
148+
-------
149+
Tuple[Dict, str]
150+
A tuple containing:
151+
- The model configuration dictionary.
152+
- The display name for the model.
138153
"""
139154
if is_valid_ocid(model_id):
140155
logger.info(f"'{model_id}' identified as a model OCID.")

0 commit comments

Comments
 (0)