Skip to content
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

Unapproved models do trigger the deployment pipeline - mlops-template-gitlab #15

Open
zoltan-fedor opened this issue Apr 11, 2022 · 1 comment · May be fixed by #16
Open

Unapproved models do trigger the deployment pipeline - mlops-template-gitlab #15

zoltan-fedor opened this issue Apr 11, 2022 · 1 comment · May be fixed by #16

Comments

@zoltan-fedor
Copy link

Hi,
Thank you for the great patterns, especially the mlops-template-gitlab one.

I believe I have found an issue with the mlops-template-gitlab pattern though.

Based on the design the deployment pipeline is only supposed to be triggered when the model is approved in the SageMaker Model Registry - but that doesn't seem to be the case. The deployment pipeline is triggered every time there is a new model in the registry, whether or not it has been approved.

Every time a new model makes it into the Model Registry it will trigger the EventBridge event (and so the deployment GitLab pipeline) as that is triggered by "SageMaker Model Package State Change" (which includes adding a new model) and NOT only by new approval of a model - see https://github.com/aws-samples/sagemaker-custom-project-templates/blob/main/mlops-template-gitlab/project.yml#L142

This means once the build pipeline completes and a model makes it into the Model Registry, that will trigger the build pipeline even if the new model is not (yet) approved, so staging deployment WILL BE performed.
But it is true, that it is the latest "approved" model that will get deployed (or rather re-deployed) in staging, due to https://github.com/aws-samples/sagemaker-custom-project-templates/blob/main/mlops-template-gitlab/seedcode/mlops-gitlab-project-seedcode-model-deploy/build.py#L, so not necessarily the one that triggered the deployment pipeline (as that still might be unapproved).

Would it be possible to update the EventBridge rule (https://github.com/aws-samples/sagemaker-custom-project-templates/blob/main/mlops-template-gitlab/project.yml#L152) to only trigger on model approval?

Thanks

@zoltan-fedor zoltan-fedor changed the title Unapproved models trigger deployment pipeline - mlops-template-gitlab Unapproved models do trigger the deployment pipeline - mlops-template-gitlab Apr 11, 2022
zoltan-fedor added a commit to zoltan-fedor/sagemaker-custom-project-templates that referenced this issue Apr 11, 2022
…peline - `mlops-template-gitlab`

This fixes aws-samples#15.

Based on the design of `mlops-template-gitlab`, the model deployment pipeline should only be triggered for 'Approved' models.
@zoltan-fedor
Copy link
Author

I have provided a fix for this in PR: #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant