Slide 1

Slide 1 text

DevOps and Machine Learning Henk Boelman Cloud Advocate @ Microsoft @hboelman github.com/hnky henkboelman.com

Slide 2

Slide 2 text

Machine Learning Ability to learn without being explicitly programmed.

Slide 3

Slide 3 text

Programming Algorithm Data Answers

Slide 4

Slide 4 text

Machine Learning Algorithm Data Answers

Slide 5

Slide 5 text

Machine Learning Model Data Answers

Slide 6

Slide 6 text

Machine Learning Model Data Answers

Slide 7

Slide 7 text

Machine Learning Predictions Data Model Data Answers

Slide 8

Slide 8 text

Sophisticated pretrained models To simplify solution development Azure Databricks Machine Learning VMs Popular frameworks To build advanced deep learning solutions TensorFlow Keras Pytorch Onnx Azure Machine Learning Language Speech … Azure Search Vision On-premises Cloud Edge Productive services To empower data science and development teams Powerful infrastructure To accelerate deep learning Flexible deployment To deploy and manage models on intelligent cloud and edge Machine Learning on Azure Cognitive Services

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

DevOps is the union of people, process, and products to enable continuous delivery of value to your end users. “ ”

Slide 11

Slide 11 text

Developers Data Scientists Operations

Slide 12

Slide 12 text

Ask a sharp question Collect the data Prepare the data Select the algorithm Train the model Use the answer The data science process

Slide 13

Slide 13 text

Azure Machine Learning A fully-managed cloud service that enables you to easily build, deploy, and share predictive analytics solutions.

Slide 14

Slide 14 text

What is Azure Machine Learning? Set of Azure Cloud Services Python SDK Prepare Data Build Models Train Models Manage Models Track Experiments Deploy Models That enables you to:

Slide 15

Slide 15 text

Prepare your environment Experiment with your model & data Deploy Your model into production

Slide 16

Slide 16 text

Step 1: Prepare your environment

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Datasets – registered, known data sets Experiments – Training runs Pipelines – Training workflows Models – Registered, versioned models Endpoints: Real-time Endpoints – Deployed model endpoints Pipeline Endpoints – Training workflow endpoints Compute – Managed compute Environments – defined training and inference environments Datastores – Connections to data Azure Machine Learning

Slide 19

Slide 19 text

Demo: Azure Machine Learning

Slide 20

Slide 20 text

Step 2: Create a ML pipeline to deliver a model

Slide 21

Slide 21 text

Pipelines Azure ML Service Pipelines Azure Pipelines

Slide 22

Slide 22 text

Azure Machine Learning Pipelines Workflows of steps that can use Data Sources, Datasets and Compute targets Unattended runs Reusability Tracking and versioning

Slide 23

Slide 23 text

Azure Pipelines Orchestration for Continuous Integration and Continuous Delivery Gates, tasks and processes for quality Integration with other services Trigger on code and non-code events

Slide 24

Slide 24 text

Create a pipeline step Input Output Runs a script on a Compute Target in a Docker container. Parameters

Slide 25

Slide 25 text

Create a pipeline Dataset of Simpsons Images Prepare data Train the Model with PyTorch Processed dataset model Register the model Blob Storage Account Model Management

Slide 26

Slide 26 text

Submit the pipeline to the cluster

Slide 27

Slide 27 text

Demo: Create an Azure ML Pipeline

Slide 28

Slide 28 text

Jupyter Notebook Compute Target Docker Image Data store 1. Snapshot folder and send to experiment 2. create docker image 3. Deploy docker and snapshot to compute 4. Mount datastore to compute 6. Stream stdout, logs, metrics 5. Launch the script 7. Copy over outputs Experiment

Slide 29

Slide 29 text

Azure Machine Learning Service Pipelines A repeatable process to deliver a ML model

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Continuous Integration

Slide 32

Slide 32 text

Code and comments only (not Jupyter output) Plus every part of the pipeline And Infrastructure and dependencies And maybe a subset of data Source Control

Slide 33

Slide 33 text

Everything should be in source control! Except your training data which should be a known, shared data source

Slide 34

Slide 34 text

Triggered on code change Refresh and execute AML Pipeline Code quality, linting, and unit testing Pull request process Continuous Integration

Slide 35

Slide 35 text

Demo: Setup Azure Pipeline for AMLS Pipeline

Slide 36

Slide 36 text

Step 3: Deploy your model

Slide 37

Slide 37 text

Trigger on model registration Deploy to test and staging environments Run integration and load tests Control: rollout, feature flags, A/B testing Continuous Delivery

Slide 38

Slide 38 text

Control model rollout! The same way you do with other software

Slide 39

Slide 39 text

AMLS to deploy The Model Score.py Environment file Docker Image

Slide 40

Slide 40 text

Demo: Deploy with Azure DevOps

Slide 41

Slide 41 text

Complete Pipeline

Slide 42

Slide 42 text

@hboelman github.com/hnky henkboelman.com Thank you! Read more on: henkboelman.com