Rui Quintino
AI & Analytics Strategy Advisor
DevScope
20210219
“Houston,
we have a model...”
Introduction to MLOps
devscope.net
We have a model... It’s great!
YOU
ARE
HERE
Now what?
We just deploy it!
Easy right?
https://cloud.google.com/solutions/machine-learning/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning
What about the data Pipeline/preproc?
Or Data Drift -> causing Model Performance degradation?
https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/work-with-data/datadrift-tutorial/datadrift-tutorial.ipynb
Plus...
• How/who can we retrain if needed (ex: data drift)?
• What are the software requirements?
• How can we later update lib/os versions? (ex: security)
• How can we monitor model performance in production?
• How do we ensure data checks in production?
• How was the model trained? What was the performance?
• How to scale? And Reproduce?
• ...
Model & ML code just tip of the iceberg...
Model & ML code just tip of the iceberg...
https://cloud.google.com/solutions/machine-learning/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning
Introducing MLOps – Machine Learning & Operations
DevOps MLOps
Code testing
Code reproducibility
App deployment
Model retraining
Model validation
Model reproducibility
Model deployment
Build app
Collaborate Test app Deploy app Monitor app
App developer
Model reproducibility Model retraining
Model deployment
Model validation
Train model Validate
model
Deploy
model
Monitor
model
Retrain model
Build app
Collaborate Test app Release app Monitor app
Audit /interpretability
App developer
Data scientist
GitHub & Azure ML
MLOps Demo
Lets try a new hyper param configuration...
Compute, Experiment, Model, Deployment in Azure ML
Tracking critical for MLOps, but also for Experimenting
With GitHub & CML
• Automation for
Experimentation
• Ex: Smoke Test Locally (Fast)
• Queue Reproducible in Github
• Using notebooks
Experimentation
GitHub Workflows to support Experiment Queues
Check Continuous ML (CML) framework in Github
Branch for new experiment, change code, queue in GitHub
Commit & Push branch to queue workflow in GitHub
Workflow running...
Notebook execution using papermill on Github agent
Train performance results on commits (also PRs)
MLOps Recap
•From Models to Pipelines
•Execution of Pipelines produce models
•Train for Deployment is fully automated/reproducible
•Pipelines enable auto model retraining
•Automation, Automation, Automation...
•Monitoring for Data Drift, Concept Drift, Model Drift
•Tracking, Metadata & Artifact Stores
Mature MLOps Example (Level 1)
https://cloud.google.com/solutions/machine-learning/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning
Not best fit for interative/model development
Final notes
•MLOps doesn’t guarantee ML success
•MLOps should improve feedback and learning
(not block DataScientists from business/data understanding)
•Dont reinvent the wheel...
•Still a young field
Dont believe everything you read in docs (and ppt...)
•When/If to introduce MLOps
(it depends...)
MLOps
References
https://mlops.githubapp.com/
58
Also
• https://azure.microsoft.com/en-us/services/machine-
learning/mlops/
• https://cloud.google.com/solutions/machine-learning/mlops-
continuous-delivery-and-automation-pipelines-in-machine-
learning
• https://github.com/microsoft/MLOps
• https://databricks.com/blog/2020/10/13/using-mlops-with-
mlflow-and-azure.html
• https://github.com/Azure/MachineLearningNotebooks
devscope.net
Thank you!
© 2016 DevScope. All rights reserved.
Rua Passos Manuel Nº 223 – 4º Andar
4000-385 Porto
T. +351 223 751 350/51
F. +351 223 751 352
Av. Sidónio Pais, Nº 2 – 3º Andar
1050-214 5 Lisboa
info@devscope.net
www.devscope.net
Helping customers succeed
“Houston, we have a model...” Introduction to MLOps

“Houston, we have a model...” Introduction to MLOps