Skip to content

Commit 9f74fbc

Browse files
navinsoninavinns
andauthored
fix: Wait on describe for tag propagation (#3705)
Co-authored-by: Navin Soni <[email protected]>
1 parent 7f823e1 commit 9f74fbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sagemaker/session.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,7 @@ def logs_for_auto_ml_job( # noqa: C901 - suppress complexity warning for this m
20292029
exceptions.UnexpectedStatusException: If waiting and auto ml job fails.
20302030
"""
20312031

2032-
description = self.sagemaker_client.describe_auto_ml_job(AutoMLJobName=job_name)
2032+
description = _wait_until(lambda: self.describe_auto_ml_job(job_name), poll)
20332033

20342034
instance_count, stream_names, positions, client, log_group, dot, color_wrap = _logs_init(
20352035
self, description, job="AutoML"
@@ -4113,7 +4113,7 @@ def logs_for_job( # noqa: C901 - suppress complexity warning for this method
41134113
exceptions.UnexpectedStatusException: If waiting and the training job fails.
41144114
"""
41154115

4116-
description = self.sagemaker_client.describe_training_job(TrainingJobName=job_name)
4116+
description = _wait_until(lambda: self.describe_training_job(job_name), poll)
41174117
print(secondary_training_status_message(description, None), end="")
41184118

41194119
instance_count, stream_names, positions, client, log_group, dot, color_wrap = _logs_init(
@@ -4240,7 +4240,7 @@ def logs_for_processing_job(self, job_name, wait=False, poll=10):
42404240
ValueError: If the processing job fails.
42414241
"""
42424242

4243-
description = self.sagemaker_client.describe_processing_job(ProcessingJobName=job_name)
4243+
description = _wait_until(lambda: self.describe_processing_job(job_name), poll)
42444244

42454245
instance_count, stream_names, positions, client, log_group, dot, color_wrap = _logs_init(
42464246
self, description, job="Processing"
@@ -4321,7 +4321,7 @@ def logs_for_transform_job(self, job_name, wait=False, poll=10):
43214321
ValueError: If the transform job fails.
43224322
"""
43234323

4324-
description = self.sagemaker_client.describe_transform_job(TransformJobName=job_name)
4324+
description = _wait_until(lambda: self.describe_transform_job(job_name), poll)
43254325

43264326
instance_count, stream_names, positions, client, log_group, dot, color_wrap = _logs_init(
43274327
self, description, job="Transform"

0 commit comments

Comments
 (0)