Slide 1

Slide 1 text

How can Azure superpower your Data Science journey? UCL data science hackathon 2019-11-30 Tania Allard, PhD ixek

Slide 2

Slide 2 text

About me Developer advocate @ Microsoft – scientific computing and machine learning Champion for open source in research and education Champion for diversity, inclusion and accesible tech PSF fellow GDE for Tensorflow

Slide 3

Slide 3 text

Outline 3 Azure Machine learning A 101 on using machine learning to solve problems Super quick intro to ML Getting started with AML Advanced features for ML Speeding up 1 2 3

Slide 4

Slide 4 text

What is machine learning? Quick 101

Slide 5

Slide 5 text

What is AI, ML, and DL? Artificial intelligence (AI) is a technique that enables computers to mimic human intelligence. It includes machine learning. Machine learning (ML) is a subset of artificial intelligence that includes techniques (such as deep learning) that enable machines to improve at tasks with experience. Deep learning (DL) is a subset of machine learning based on artificial neural networks that permit a machine to train itself.

Slide 6

Slide 6 text

Traditional programming Machine learning

Slide 7

Slide 7 text

Machine learning

Slide 8

Slide 8 text

Machine learning FINDING (AND EXPLOITING) PATTERNS IN DATA REPLACING “HUMAN WRITING CODE” WITH “HUMAN SUPPLYING DATA” STARTS WITH A SHARP QUESTION

Slide 9

Slide 9 text

When is ML the right tool? Start by asking a question: What are the forecasted sales quantities per item in the next 4 weeks?

Slide 10

Slide 10 text

When should you use machine learning? ● Regression: how much / how many ● Classification: which class does it belong to? ● Clustering: are there different groups? Which does it belong to? ● Anomaly Detection: is this weird? ● Recommendation: which option should I choose? supervised learning unsupervised learning

Slide 11

Slide 11 text

https://cda.ms/17L

Slide 12

Slide 12 text

How can Azure help you to develop ML solutions?

Slide 13

Slide 13 text

Azure Bot Service Azure Cognitive Services Azure Cognitive Search Azure Machine Learning Knowledge mining AI apps & agents Machine learning Azure AI

Slide 14

Slide 14 text

Machine Learning on Azure Azure Machine Learning Domain Specific Pretrained Models To reduce time to market Azure Databricks Machine Learning VMs Popular Frameworks To build machine learning and deep learning solutions TensorFlow PyTorch ONNX Azure Machine Learning Language Speech … Search Vision Productive Services To empower data science and development teams Powerful Hardware To accelerate deep learning Scikit-Learn PyCharm Jupyter Familiar Data Science Tools To simplify model development Visual Studio Code Command line CPU GPU FPGA

Slide 15

Slide 15 text

Azure Machine Learning Azure Cloud Services Python SDK ü Prepare Data ü Build Models ü Train Models ü Manage Models ü Track Experiments ü Deploy Models That enables you to: Cross-Platform CLI

Slide 16

Slide 16 text

Machine Learning Typical E2E Process Prepare Data Register and Manage Model Train & Test Model Build Image Build model (your favorite IDE) Deploy Service Monitor Model Prepare Experiment Deploy Orchestrate …

Slide 17

Slide 17 text

Azure Machine Learning 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

Slide 18

Slide 18 text

19 Familiar example: digits recognition

Slide 19

Slide 19 text

20 Familiar example: digits recognition

Slide 20

Slide 20 text

Workspace and compute

Slide 21

Slide 21 text

Azure Machine Learning 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

Slide 22

Slide 22 text

Your favourite platforms 23

Slide 23

Slide 23 text

Running experiments

Slide 24

Slide 24 text

Azure Machine Learning 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

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Deploying your models

Slide 27

Slide 27 text

Azure Machine Learning 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

Slide 28

Slide 28 text

My Computer Data Store Azure ML Workspace Compute Target

Slide 29

Slide 29 text

The 8 Azure ML Train Steps

Slide 30

Slide 30 text

Deploy image Azure Kubernetes Service (AKS) Azure Container Instance

Slide 31

Slide 31 text

Some advanced AML features

Slide 32

Slide 32 text

Distributed Hyperparameter Tuning

Slide 33

Slide 33 text

What are Hyperparameters? { “learning_rate”: uniform(0, 1), “num_layers”: choice(2, 4, 8) … } Config1= {“learning_rate”: 0.2, “num_layers”: 2, …} Config2= {“learning_rate”: 0.5, “num_layers”: 4, …} Config3= {“learning_rate”: 0.9, “num_layers”: 8, …} …

Slide 34

Slide 34 text

Typical ‘manual’ approach to hyperparameter tuning Dataset Training Algorithm 1 Hyperparameter Values – config 1 Model 1 Hyperparameter Values – config 2 Model 2 Hyperparameter Values – config 3 Model 3 Model Training Infrastructure Training Algorithm 2 Hyperparameter Values – config 4 Model 4 Complex Tedious Repetitive Time consuming Expensive

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Automated ML

Slide 40

Slide 40 text

Mileage Condition Car brand Year of make Regulations … Parameter 1 Parameter 2 Parameter 3 Parameter 4 … Gradient Boosted Nearest Neighbors SVM Bayesian Regression LGBM … Mileage Gradient Boosted Criterion Loss Min Samples Split Min Samples Leaf Others Model Which algorithm? Which parameters? Which features? Car brand Year of make Model creation is typically a time-consuming process

Slide 41

Slide 41 text

Which algorithm? Which parameters? Which features? Mileage Condition Car brand Year of make Regulations … Gradient Boosted Nearest Neighbors SGD Bayesian Regression LGBM … Nearest Neighbors Criterion Loss Min Samples Split Min Samples Leaf XYZ Model Iterate Gradient Boosted N Neighbors Weights Metric P ZYX Mileage Car brand Year of make Car brand Year of make Condition Track Model creation is typically a time-consuming process

Slide 42

Slide 42 text

Track Which algorithm? Which parameters? Which features? Iterate Model creation is typically a time-consuming process

Slide 43

Slide 43 text

Enter data Define goals Apply constraints Output Automated Machine Learning accelerates model development Input Intelligently test multiple models in parallel Optimized model

Slide 44

Slide 44 text

Caution

Slide 45

Slide 45 text

Auto ML should not be an excuse for black-box ML

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Experiment! This is only a taster of what you can do. Experiment with multiple scenarios, techniques and products Get your Azure subscription and claim your $100

Slide 50

Slide 50 text

Useful resources • GitHub Repository : https://github.com/trallard/ML-in-AML • Azure Machine learning • Create development environment for Machine learning • Hyperparameter tuning in AML • AML Python SDK • AML Pipelines

Slide 51

Slide 51 text

Useful resources • Getting started with Auto ML • Intro to AML – MS Learn • Automate model select with AML - MS Learn • Train local model with AML - MS Learn

Slide 52

Slide 52 text

Tania Allard, PhD @ixek 56 Thanks!