-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix redeploying SageMaker Model Monitoring module. #168
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This was easy enough to fix by using a hash of the input parameters. (Note that the hash doesn't need to be secure due to not being used in a security context.) There's a risk of a collision, especially since the hash gets truncated due to the 63 character limit on resource names. Unsure if this is better or not. Seems like the options are:
Is there another option? Is there an opinion about which option is better? 1 is safer, 2 is will result in less churn. |
Thanks @clokep, I think option 2 works. I would not sweat too much about the risk in approach 1 if we instruct the user in the README to stop the schedule if there is a pending deployment, but I agree option 2 is less churn. We can always review and update this based on user feedback. |
modules/sagemaker/sagemaker-model-monitoring/sagemaker_model_monitoring/utils.py
Outdated
Show resolved
Hide resolved
Oh good call that we should document either way the failure about it running. I think it could still fail even with option 2, will need to try to do that on purpose to confirm and then document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update CHANGELOG, README & ship it :)
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
We chatted a bit about this offline and will leave this out of the changelog since the unreleased changes already include that this module was just added. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Describe your changes
Fixes redeploying SageMaker Model Monitoring. Previously if you modified a parameter then CloudFormation would error due to attempting to replace resources (via a create, then delete) using the same name. This adds a timestamp to names so that they'll be unique. Ideally we would allow CloudFormation to generate the names, but this does not seem to work -- CloudFormation is not properly waiting for the job definition to be created before attempting to access the name / propagating it to the monitoring schedule.
The downside of this approach is the monitoring stack will essentially be rebuilt for every update, even if no changes are made. This is double bad since updates will fail if any of the monitoring jobs are running. A potential solution to this could be to use a hash of the input parameters instead of a timestamp.
Issue ticket number and link
Checklist before requesting a review
CHANGELOG.MD
with a description of my changes - not updated since the SageMaker Monitoring module hasn't yet been in a releasescripts/validate.sh
)seedfarmer apply
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.