File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
tests/unit/sagemaker/jumpstart Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,9 @@ def get_hub_model(self, hub_model_arn: str) -> JumpStartModelSpecs:
473
473
hub_model_arn (str): Arn for the Hub model to get specs for
474
474
"""
475
475
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
+ )
477
479
return details .formatted_content
478
480
479
481
def get_hub (self , hub_arn : str ) -> Dict [str , Any ]:
Original file line number Diff line number Diff line change @@ -860,16 +860,12 @@ def test_jumpstart_local_metadata_override_specs_not_exist_both_directories(
860
860
def test_jumpstart_cache_get_hub_model ():
861
861
cache = JumpStartModelsCache (s3_bucket_name = "some_bucket" )
862
862
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"
866
864
assert get_spec_from_base_spec (
867
865
model_id = "huggingface-mock-model-123" , version = "1.2.3"
868
866
) == cache .get_hub_model (hub_model_arn = model_arn )
869
867
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 )
You can’t perform that action at this time.
0 commit comments