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