/azure-machine-learning-bootcamp

Azure Machine Learning Bootcamp

Primary LanguagePython

Azure Machine Learning Bootcamp Materials (Version 1.5)

alt text

Here are the top two resources you'll need this afternoon:

  1. Azure Machine Learning Services documentation
  2. Azure Machine Learning SDK for Python documentation

Challenges

Challenge 1 - Basic model training on Azure

⚡ Here are some hints for this challenge!

In this first challenge, you'll be training a basic machine learning model on Azure. We'll be using the popular MNIST dataset, as it allows us to focus on getting familiar with the mechanics of Azure Machine Learning. MNIST is a data set containing:

  • 60000 hand-written digits as training data
  • 10000 hand-written digits as testing data

Here are some examples:

alt text

The goal is to build a machine learning model, that

  • takes an unseen image as an input (28x28 pixels) and
  • outputs if there was a 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9 on the image

Guidance:

  • Deploy from Azure Portal: Machine Learning service workspace
  • We'll be writing our code in a Jupyter Notebook in a Notebook VM
  • Use this file for loading the MNIST data: utils.py
  • Use Python 3.6 - AzureML as the Notebook type in Jupyter (create a new folder before starting)
  • We'll be using scikit-learn to build a simple LogisticRegression classifier
  • Target accuracy of our model on the test data set: >90%

Challenge 2 - Advanced model training on Azure

⚡ Here are some hints for this challenge!

In this challenge, you'll be training a more advanced machine learning model on Azure (in fact, you'll be training a Deep Convolution Neural Network). We'll be using the same data set, but this time, we'll use Azure Machine Learning Compute for speeding up our training.

Guidance:

  • Make a copy of the Notebook from Challenge 1
  • This time we'll be using Keras with a TensorFlow backend to train a Convolution Neural Network on Azure Machine Learning Compute
  • Target accuracy of our model on the test data set: >99%

Challenge 3 - Model deployment on Azure

⚡ Here are some hints for this challenge!

In this third challenge, you'll be taking the model you've trained in the first or second challenge and deploy it to Azure Container Instances (ACI). Alternatively, you can deploy it to Azure Kubernetes Service (AKS), but you need to have a look at the Azure Machine Learning Services documentation for that.

Guidance:

  • Take the model from challenge 2 and package it as a Docker image (Azure ML will do that for us)
  • Reuse the Notebook from challenge 2 (it will already have the Docker base images cached)
  • Deploy it on ACI as a scoring service

Challenge 4 - Automated Machine Learning

⚡ Here are some hints for this challenge!

In this last challenge, you'll be using Automated Machine Learning to let Azure figure out which Machine Learning algorithm performs best on our dataset. We'll do two examples, one code-driven in your Jupyter notebook and one Portal-driven through the Azure Portal

Guidance for code-driven experience:

Guidance for Portal-driven, graphical experience:

  • Create an Automated Machine Learning experiment in your Azure Machine Learning Workspace
  • Take the pima-indians-diabetes.csv data set as the input
  • Let it figure out the best performing model
  • Bonus points: Deploy the model to ACI as a scoring endpoint

Further Challenges

There's a lot more interesting stuff that Azure Machine Learning can do for us. Most likely, we won't get it to it today due to time constraints:

  • Secure our model endpoint on ACI/AKS with an authentication key (use auth_enabled and see here)
  • Embed Application Insights into our model for monitoring (look here and here)
  • Distributed training in TensorFlow or PyTorch

Recommended Certifications

Recommended Trainings

Further Material