File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -719,7 +719,8 @@ def attach(
719
719
if not model_id :
720
720
raise ValueError (
721
721
f"Cannot infer JumpStart model ID from training job '{ training_job_name } '. "
722
- "Please specify JumpStart `model_id` when retrieving Estimator for this training job."
722
+ "Please specify JumpStart `model_id` when retrieving Estimator "
723
+ "for this training job."
723
724
)
724
725
725
726
model_version = model_version or "*"
Original file line number Diff line number Diff line change @@ -768,6 +768,10 @@ def _get_jumpstart_model_id_version_from_resource_arn(
768
768
resource_arn : str ,
769
769
sagemaker_session : Session = constants .DEFAULT_JUMPSTART_SAGEMAKER_SESSION ,
770
770
) -> Tuple [Optional [str ], Optional [str ]]:
771
+ """Returns the JumpStart model ID and version if in resource tags.
772
+
773
+ Returns None if model ID or version cannot be inferred from tags.
774
+ """
771
775
772
776
list_tags_result = sagemaker_session .list_tags (resource_arn )
773
777
Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ def retrieve_default(
77
77
if not model_id :
78
78
raise ValueError (
79
79
f"Cannot infer JumpStart model ID from endpoint '{ endpoint_name } '. "
80
- "Please specify JumpStart `model_id` when retrieving default predictor for this endpoint."
80
+ "Please specify JumpStart `model_id` when retrieving default "
81
+ "predictor for this endpoint."
81
82
)
82
83
83
84
model_version = model_version or "*"
You can’t perform that action at this time.
0 commit comments