Skip to content

Commit decd6eb

Browse files
heechan-marvinliujiaorrEC2 Default Userbenieric
authored
fix: avoid AccessDenied error for a while on SageMaker Studio wtih do… (#4600)
* fix: avoid AccessDenied error for a while on SageMaker Studio wtih domain isolation configured. * Chore: fix C0301 - Line too long * Chore: fix black-check fail --------- Co-authored-by: liujiaor <[email protected]> Co-authored-by: EC2 Default User <[email protected]> Co-authored-by: Erick Benitez-Ramos <[email protected]>
1 parent 732011e commit decd6eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sagemaker/session.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -8348,7 +8348,9 @@ def _logs_for_job( # noqa: C901 - suppress complexity warning for this method
83488348
"""
83498349
sagemaker_client = sagemaker_session.sagemaker_client
83508350
request_end_time = time.time() + timeout if timeout else None
8351-
description = sagemaker_client.describe_training_job(TrainingJobName=job_name)
8351+
description = _wait_until(
8352+
lambda: sagemaker_client.describe_training_job(TrainingJobName=job_name)
8353+
)
83528354
print(secondary_training_status_message(description, None), end="")
83538355

83548356
instance_count, stream_names, positions, client, log_group, dot, color_wrap = _logs_init(

0 commit comments

Comments
 (0)