Skip to content

Commit 2d0edee

Browse files
committed
fix codestyles
1 parent a8b718e commit 2d0edee

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

src/sagemaker/jumpstart/hub/utils.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -195,31 +195,6 @@ def is_gated_bucket(bucket_name: str) -> bool:
195195
return bucket_name in constants.JUMPSTART_GATED_BUCKET_NAME_SET
196196

197197

198-
def get_hub_model_version(
199-
hub_name: str,
200-
hub_model_name: str,
201-
hub_model_type: str,
202-
hub_model_version: Optional[str] = None,
203-
sagemaker_session: Session = constants.DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
204-
) -> str:
205-
"""Returns available Jumpstart hub model version.
206-
207-
It will attempt both a semantic HubContent version search and Marketplace version search.
208-
If the Marketplace version is also semantic, this function will default to HubContent version.
209-
210-
Raises:
211-
ClientError: If the specified model is not found in the hub.
212-
KeyError: If the specified model version is not found.
213-
"""
214-
215-
try:
216-
hub_content_summaries = sagemaker_session.list_hub_content_versions(
217-
hub_name=hub_name, hub_content_name=hub_model_name, hub_content_type=hub_model_type
218-
).get("HubContentSummaries")
219-
except Exception as ex:
220-
raise Exception(f"Failed calling list_hub_content_versions: {str(ex)}")
221-
222-
223198
def get_hub_model_version(
224199
hub_name: str,
225200
hub_model_name: str,

tests/integ/sagemaker/jumpstart/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def get_sm_session_with_override() -> Session:
6666
sagemaker_client=sagemaker,
6767
)
6868

69+
6970
def get_training_dataset_for_model_and_version(model_id: str, version: str) -> dict:
7071
return TRAINING_DATASET_MODEL_DICT[(model_id, version)]
7172

0 commit comments

Comments
 (0)