Skip to content

Commit 4d35379

Browse files
committed
update linter
1 parent 4a19a33 commit 4d35379

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/sagemaker/jumpstart/cache.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ def get_hub_model(self, hub_model_arn: str) -> JumpStartModelSpecs:
473473
hub_model_arn (str): Arn for the Hub model to get specs for
474474
"""
475475

476-
details, _ = self._content_cache.get(JumpStartCachedContentKey(HubDataType.MODEL, hub_model_arn))
476+
details, _ = self._content_cache.get(
477+
JumpStartCachedContentKey(HubDataType.MODEL, hub_model_arn)
478+
)
477479
return details.formatted_content
478480

479481
def get_hub(self, hub_arn: str) -> Dict[str, Any]:

tests/unit/sagemaker/jumpstart/test_cache.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -860,16 +860,12 @@ def test_jumpstart_local_metadata_override_specs_not_exist_both_directories(
860860
def test_jumpstart_cache_get_hub_model():
861861
cache = JumpStartModelsCache(s3_bucket_name="some_bucket")
862862

863-
model_arn = (
864-
"arn:aws:sagemaker:us-west-2:000000000000:hub-content/HubName/Model/huggingface-mock-model-123/1.2.3"
865-
)
863+
model_arn = "arn:aws:sagemaker:us-west-2:000000000000:hub-content/HubName/Model/huggingface-mock-model-123/1.2.3"
866864
assert get_spec_from_base_spec(
867865
model_id="huggingface-mock-model-123", version="1.2.3"
868866
) == cache.get_hub_model(hub_model_arn=model_arn)
869867

870-
model_arn = (
871-
"arn:aws:sagemaker:us-west-2:000000000000:hub-content/HubName/Model/pytorch-mock-model-123/*"
872-
)
873-
assert get_spec_from_base_spec(model_id="pytorch-mock-model-123", version="*") == cache.get_hub_model(
874-
hub_model_arn=model_arn
875-
)
868+
model_arn = "arn:aws:sagemaker:us-west-2:000000000000:hub-content/HubName/Model/pytorch-mock-model-123/*"
869+
assert get_spec_from_base_spec(
870+
model_id="pytorch-mock-model-123", version="*"
871+
) == cache.get_hub_model(hub_model_arn=model_arn)

0 commit comments

Comments
 (0)