hsrocks commented on a change in pull request #21673:
URL: https://github.com/apache/airflow/pull/21673#discussion_r814041892
##########
File path: airflow/providers/amazon/aws/hooks/sagemaker.py
##########
@@ -908,3 +908,19 @@ def find_processing_job_by_name(self, processing_job_name:
str) -> bool:
if e.response['Error']['Code'] in ['ValidationException',
'ResourceNotFound']:
return False
raise
+
+ def delete_model(self, model_name: str):
+ """Delete Sagemaker model
+ :param model_name: (optional) name of the model
+ :return: True if Model exists and deleted else return False
Review comment:
Yes my intent was that the delete call should not fail when model is not
present. So my initial thought was :
on first run of workflow assume the sagemaker model are not created so the
workflow will always fail for any use case. So I thought of return false for
ValidationException where model is not present but I got ur point to keep
behavior as close to boto3 so that its more understandable. Made the changes
based on that. Thanks a lot
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]