Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2e9f76f

Browse files
committedFeb 20, 2024
linter
1 parent 6efc206 commit 2e9f76f

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed
 

‎src/sagemaker/jumpstart/curated_hub/curated_hub.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from __future__ import absolute_import
1515

1616
from typing import Optional, Dict, Any
17+
from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION
1718

1819
from sagemaker.session import Session
1920

‎src/sagemaker/jumpstart/estimator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,9 @@ def _is_valid_model_id_hook():
529529
if match:
530530
hub_arn = hub_name
531531
else:
532-
hub_arn = construct_hub_arn_from_name(hub_name=hub_name, region=region, sagemaker_session=sagemaker_session)
532+
hub_arn = construct_hub_arn_from_name(
533+
hub_name=hub_name, region=region, sagemaker_session=sagemaker_session
534+
)
533535

534536
estimator_init_kwargs = get_init_kwargs(
535537
model_id=model_id,

‎src/sagemaker/jumpstart/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,6 @@ def __init__(
17481748
self.skip_model_validation = skip_model_validation
17491749

17501750

1751-
17521751
class HubArnExtractedInfo(JumpStartDataHolderType):
17531752
"""Data class for info extracted from Hub arn."""
17541753

‎src/sagemaker/jumpstart/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def construct_hub_arn_from_name(
878878
session: Optional[Session] = None,
879879
) -> str:
880880
"""Constructs a Hub arn from the Hub name using default Session values"""
881-
print('being called')
881+
print("being called")
882882

883883
if not session:
884884
session = constants.DEFAULT_JUMPSTART_SAGEMAKER_SESSION
@@ -894,6 +894,7 @@ def construct_hub_model_arn_from_inputs(hub_arn: str, model_name: str, version:
894894
"""Constructs a HubContent model arn from the Hub name, model name, and model version"""
895895

896896
info = extract_info_from_hub_content_arn(hub_arn)
897-
arn = f"arn:{info.partition}:sagemaker:{info.region}:{info.account_id}:hub-content/{info.hub_name}/Model/{model_name}/{version}"
897+
arn = f"arn:{info.partition}:sagemaker:{info.region}:{info.account_id}:hub-content/" \
898+
f"{info.hub_name}/Model/{model_name}/{version}"
898899

899900
return arn

‎tests/unit/sagemaker/jumpstart/estimator/test_estimator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from sagemaker.jumpstart.enums import JumpStartScriptScope, JumpStartTag
3535

3636
from sagemaker.jumpstart.estimator import JumpStartEstimator
37-
from sagemaker.jumpstart.types import JumpStartEstimatorFitKwargs
3837

3938
from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
4039
from sagemaker.session_settings import SessionSettings

‎tests/unit/sagemaker/jumpstart/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def get_spec_from_base_spec(
153153

154154
if version and semantic_version_str:
155155
raise ValueError("Cannot specify both `version` and `semantic_version_str` fields.")
156-
156+
157157
if model_id is not None:
158158
if all(
159159
[

0 commit comments

Comments
 (0)
Please sign in to comment.