0
0
MLOpsdevops~10 mins

Promoting models between stages in MLOps - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Promoting models between stages
Model Training Completed
Register Model in Registry
Approve Model for Staging
Deploy Model to Staging Environment
Test and Validate in Staging
Approve Model for Production
Deploy Model to Production
Monitor Model Performance
Repeat or Rollback if Needed
This flow shows how a trained model moves step-by-step from training to production, passing through registration, staging, approval, deployment, and monitoring.
Execution Sample
MLOps
register_model('model_v1')
approve_model('model_v1', 'staging')
deploy_model('model_v1', 'staging')
approve_model('model_v1', 'production')
deploy_model('model_v1', 'production')
This code registers a model, promotes it to staging, deploys it there, then promotes and deploys it to production.
Process Table
StepActionModel VersionStageResult
1register_modelmodel_v1NoneModel registered in registry
2approve_modelmodel_v1stagingModel approved for staging
3deploy_modelmodel_v1stagingModel deployed to staging environment
4approve_modelmodel_v1productionModel approved for production
5deploy_modelmodel_v1productionModel deployed to production environment
💡 Model is successfully deployed to production after passing staging approval and deployment
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5
model_v1_stageNoneregisteredstaging_approvedstaging_deployedproduction_approvedproduction_deployed
Key Moments - 3 Insights
Why can't we deploy the model directly to production without staging?
Staging acts as a safe testing area to validate the model before production. As shown in execution_table rows 3 and 5, deployment to staging happens first to catch issues early.
What does 'approve_model' do in the promotion process?
'approve_model' changes the model's stage status, allowing deployment to that stage. See rows 2 and 4 where approval precedes deployment.
What happens if the model fails tests in staging?
The model is not approved for production and deployment stops. This is implied by the flow stopping before step 4 if validation fails.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the model stage after step 3?
Astaging_deployed
Bproduction_approved
Cregistered
Dproduction_deployed
💡 Hint
Check the 'Stage' and 'Result' columns at step 3 in the execution_table.
At which step is the model approved for production?
AStep 2
BStep 3
CStep 4
DStep 5
💡 Hint
Look for 'approve_model' action with 'production' stage in the execution_table.
If the model fails validation in staging, which step would NOT occur?
Aregister_model
Bdeploy_model to production
Capprove_model for staging
Ddeploy_model to staging
💡 Hint
Refer to the concept_flow and key_moments about stopping deployment if staging validation fails.
Concept Snapshot
Promoting models between stages:
1. Register model in registry
2. Approve model for staging
3. Deploy to staging for testing
4. Approve for production after validation
5. Deploy to production
Always test in staging before production to avoid issues.
Full Transcript
This visual execution shows how a machine learning model moves through stages from training to production. First, the model is registered in a model registry. Then it is approved for the staging environment, where it is deployed and tested. If tests pass, the model is approved for production and deployed there. Monitoring continues after deployment. This step-by-step promotion ensures safe and reliable model updates.