A presentation at All Day DevOps by Sasha Czarkowski (Rosenbaum)
MLOps CI/CD for Machine Learning SASHA ROSENBAUM
Sasha Rosenbaum Sr. Program Manager @DivineOps
What is MLOps and WHY should you care?
Machine Learning (ML) Is the science of getting computers to act Without being explicitly programmed
Machine Learning vs DevOps Google searches
Python questions on Stack Overflow
OK, but why should YOU care?
10
Data Scientists just want to Data Science
Deep Learning Some ML training algorithms are complex
Deep Learning - Backpropagation Some ML training algorithms are complex
Typical data scientist work environment
We’ve got the notebook into source control!
Programming Algorithm Answers Data
Machine Learning Answers Algorithm Data
Machine Learning Answers Model Data
Machine Learning Answers Model Data
Machine Learning Answers Data Model Predictions Data
How do we put the model in production?
What is an ML model?
Linear Regression – Housing Prices The training finds a and b such that Y = a+bX+ϵ
Deep Learning The input and output may be ത 𝑌ത vectors 𝑋,
Image Classification
ML Model A definition of the mathematical formula with a number of parameters that are learned from the data
Isn’t this just an API endpoint?!
Do models really change that often?
Models must be improved continuously
TensorFlow Extended FBLearner Flow Uber’s Michelangelo Microsoft Aether
But I don’t work at a big company with thousands of ML engineers!
How do we iterate?
Machine Learning Lifecycle
Data Scientist • • • • • • • Quick iteration Versioning Reuse Great tools Ease of management Unlimited scale Eliminating drift DevOps/SRE Friends? • • • • • • • Quick iteration Versioning Reuse Compliance Observability Uptime Updates
MLOps Workflow Collaborate Build app Test app Release app Monitor app App developer Data scientist Model reproducibility Model validation Model deployment Model retraining
MLOps Workflow Collaborate Build app Test app Release app Monitor app App developer Code, dataset, and environment versioning Data scientist Model reproducibility Model validation Model deployment Model retraining
MLOps Workflow Collaborate App developer Build app Test app Release app Monitor app Train model Automated ML ML Pipelines Hyperparameter tuning Data scientist Model reproducibility Model validation Model deployment Model retraining
MLOps Workflow Collaborate App developer Build app Test app Train model Validate model Release app Monitor app Model validation & certification Data scientist Model reproducibility Model validation Model deployment Model retraining
MLOps Workflow Collaborate App developer Build app Test app Release app Train model Validate model Deploy model Monitor app Model packaging Simple deployment Data scientist Model reproducibility Model validation Model deployment Model retraining
MLOps Workflow Collaborate App developer Build app Test app Release app Monitor app Train model Validate model Deploy model Monitor model Model management & monitoring Retrain model Data scientist Model performance analysis Model reproducibility Model validation Model deployment Model retraining
Build Your Own MLOps Platform + +
ML Pipeline A reusable, scaleable ML workflow template Kubeflow pipeline A reusable, scalable ML workflow template that runs on containers
Azure ML • • • • • Prep data Train Test Deploy Manage
The CI/CD Pipeline
GitHub Repo https://github.com/DivineOps/kubeflow-and-mlops
Azure Resources
The Code
Build Pipeline https://github.com/DivineOps/kubeflow-and-mlops
Kubeflow Pipeline https://www.kubeflow.org/docs/azure/azureendtoend/
Release Pipeline https://dev.azure.com/sasrose/kubeflow/_release?_a=releases&view=mine&definitionId=3
Even a simple CI/CD pipeline is better than none!
AI Ethics
Bias is a property of information
Build AI responsibly!
Thank You! @DivineOps
Resources GitHub repo https://www.kubeflow.org/docs/azure/azureendtoend/ Deploy Kubeflow on Azure https://www.kubeflow.org/docs/azure/deploy/install-kubeflow/ Example Kubeflow Azure Pipeline https://www.kubeflow.org/docs/azure/azureendtoend/ Release pipeline https://dev.azure.com/sasrose/kubeflow/_release
Machine Learning is now widely used across our industry, yet we have very limited tooling when it comes to automating the ML model versioning, testing, and release. We will show how a CI/CD pipeline for ML can greatly improve both your productivity and the reliability of your software.
The following code examples from the presentation can be tried out live.
This repository walks you through all the steps for building this MLOps CI/CD pipeline (and this demo)
Here’s what was said about this presentation on social media.
🚨Don't miss Sasha Rosenbaum’s (@DivineOps) session - CI/CD For Machine Learning🚨
— All Day DevOps (@AllDayDevOps) October 29, 2019
Join us at https://t.co/9lv1sWd0hK. 24 hours. 150 sessions. 5 simultaneous tracks. Live Online. November 6.
Register for free here ➡️ https://t.co/AqpvuP2TAg#AllDayDevOps pic.twitter.com/sSvJKyXQRF
@AllDayDevOps viewing party with Chicago’s own @DivineOps speaking knowledge on CI/CD for machine learning. #ChiTownRepresenting pic.twitter.com/bgxFq5dkaR
— Adam Lewis (@lewiada) November 6, 2019
We are streaming All Day DevOps LIVE at our Chandigarh Office India.
— XenonStack (@xenonstack) November 6, 2019
Take a glimpse of the amazing session by Sasha Rosenbaum on CI/CD for Machine Learning.
Learn More: https://t.co/3VnviqbsLN@XenonStack @AllDayDevOps @DivineOps #CI #CD #ML #MachineLearning #AllDayDevOps pic.twitter.com/IM2qZalbXG
10 minute warning 🚨 until the next round of sessions - we've got a nice line-up for this time slot including @DivineOps (she is a rockstar). Tune in here ▶️ https://t.co/gcYY8f4a0N
— All Day DevOps (@AllDayDevOps) November 6, 2019
Use #AllDayDevOps to join the conversation! pic.twitter.com/KMM7lMubWv
Look who's across the hall! pic.twitter.com/K8bNz1lSNQ
— Justin Jakowski (@jakowski) November 6, 2019
It is almost time for the #DevOps for #MachineLearning session @AllDayDevOps!#AllDayDevOps #MLOpshttps://t.co/mbI5eENbAe
— Sasha Rosenbaum 🦦🛋🧁 (@DivineOps) November 6, 2019
Look ma, I'm on a billboard!https://t.co/mbI5eEvAIG@AllDayDevOps #MLOps #DevOps pic.twitter.com/vDZanFGj7g
— Sasha Rosenbaum 🦦🛋🧁 (@DivineOps) October 1, 2019
Reaction 1: I know that logo
— Sasha Rosenbaum 🦦🛋🧁 (@DivineOps) October 22, 2019
Reaction 2: oh, it’s for me! 🎉🎉🎉
Thank you for the speaker gift, @AllDayDevOps!!! pic.twitter.com/JiVkIG93G2
We are streaming #AllDayDevOps LIVE at our Chandigarh Office #India and our viewers had a great time watching your session on CI/CD for Machine Learning.
— XenonStack (@xenonstack) November 6, 2019
Great stuff Sasha. Didn’t know about Kubeflow before!
— Rob Bos (@RobBos81) November 6, 2019
Speaking of Azure DevOps, be sure to check out the talk from @DivineOps and show some support for our #chitown speakers!
— OWASP Chicago (@OWASPChicago) November 4, 2019