Skip to content

Comments

Sagemaker hook: remove extra call at the end when waiting for completion#27551

Merged
potiuk merged 1 commit intoapache:mainfrom
aws-mwaa:vandonr/wip
Nov 8, 2022
Merged

Sagemaker hook: remove extra call at the end when waiting for completion#27551
potiuk merged 1 commit intoapache:mainfrom
aws-mwaa:vandonr/wip

Conversation

@vandonr-amz
Copy link
Contributor

also took the opportunity to speedup tests relying on this method by waiting zero

also took the opportunity to speedup tests relying on this method by waiting zero
@vandonr-amz vandonr-amz requested a review from eladkal as a code owner November 7, 2022 23:38
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Nov 7, 2022
raise AirflowException(f"SageMaker job took more than {max_ingestion_time} seconds")

self.log.info("SageMaker Job completed")
response = describe_function(job_name)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is basically no latency between the last call of the loop (l.682) and this one, and moreover the status reached is supposed to be a terminal state, so there is no need to repeat the call here.

Comment on lines -678 to +677
while running:
while True:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to do this change otherwise python would complain that the response variable might be uninitialized in the return clause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants