File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,8 @@ def get_model_specs(
301
301
302
302
except Exception as ex :
303
303
logging .info (
304
- "Recieved exeption while calling APIs for ContentType Model, retrying with ContentType ModelReference: " + str (ex )
304
+ "Recieved exeption while calling APIs for ContentType Model, retrying with ContentType ModelReference: "
305
+ + str (ex )
305
306
)
306
307
hub_model_arn = construct_hub_model_arn_from_inputs (
307
308
hub_arn = hub_arn , model_name = model_id , version = version
Original file line number Diff line number Diff line change 29
29
_retrieve_model_package_model_artifact_s3_uri ,
30
30
)
31
31
from sagemaker .jumpstart .artifacts .resource_names import _retrieve_resource_name_base
32
- from sagemaker .jumpstart .hub .utils import construct_hub_model_arn_from_inputs , construct_hub_model_reference_arn_from_inputs
32
+ from sagemaker .jumpstart .hub .utils import (
33
+ construct_hub_model_arn_from_inputs ,
34
+ construct_hub_model_reference_arn_from_inputs ,
35
+ )
33
36
from sagemaker .session import Session
34
37
from sagemaker .async_inference .async_inference_config import AsyncInferenceConfig
35
38
from sagemaker .base_deserializers import BaseDeserializer
@@ -549,11 +552,12 @@ def _add_image_uri_to_kwargs(kwargs: JumpStartEstimatorInitKwargs) -> JumpStartE
549
552
550
553
return kwargs
551
554
555
+
552
556
def _add_model_reference_arn_to_kwargs (
553
557
kwargs : JumpStartEstimatorInitKwargs ,
554
558
) -> JumpStartEstimatorInitKwargs :
555
559
"""Sets Model Reference ARN if the hub content type is Model Reference, returns full kwargs."""
556
-
560
+
557
561
hub_content_type = verify_model_region_and_return_specs (
558
562
model_id = kwargs .model_id ,
559
563
version = kwargs .model_version ,
Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ def _add_model_reference_arn_to_kwargs(
268
268
kwargs : JumpStartModelInitKwargs ,
269
269
) -> JumpStartModelInitKwargs :
270
270
"""Sets Model Reference ARN if the hub content type is Model Reference, returns full kwargs."""
271
-
271
+
272
272
hub_content_type = verify_model_region_and_return_specs (
273
273
model_id = kwargs .model_id ,
274
274
version = kwargs .model_version ,
Original file line number Diff line number Diff line change @@ -288,7 +288,10 @@ def describe_model(
288
288
)
289
289
290
290
except Exception as ex :
291
- logging .info ("Recieved exeption while calling APIs for ContentType Model, retrying with ContentType ModelReference: " + str (ex ))
291
+ logging .info (
292
+ "Recieved exeption while calling APIs for ContentType Model, retrying with ContentType ModelReference: "
293
+ + str (ex )
294
+ )
292
295
model_version = get_hub_model_version (
293
296
hub_model_name = model_name ,
294
297
hub_model_type = HubContentType .MODEL_REFERENCE .value ,
You can’t perform that action at this time.
0 commit comments