Skip to content

fix: Wait on describe for tag propagation #3705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sagemaker/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ def logs_for_auto_ml_job( # noqa: C901 - suppress complexity warning for this m
exceptions.UnexpectedStatusException: If waiting and auto ml job fails.
"""

description = self.sagemaker_client.describe_auto_ml_job(AutoMLJobName=job_name)
description = _wait_until(lambda: self.describe_auto_ml_job(job_name), poll)

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

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

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

description = self.sagemaker_client.describe_processing_job(ProcessingJobName=job_name)
description = _wait_until(lambda: self.describe_processing_job(job_name), poll)

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

description = self.sagemaker_client.describe_transform_job(TransformJobName=job_name)
description = _wait_until(lambda: self.describe_transform_job(job_name), poll)

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