In this workshop we will look at the life-cycle of your projects: from data, to model and model to consumption in the real world. You can follow along with code samples shared, as well as use these examples to help you replicate this workshop with your own projects after the event.
Feedback on the content below is welcome 😊👍 please reach out to me on Twitter: @AmyKateNicho or submit an issue/pull request on github
Always remember to delete your resources - click here to see how
The example model used in the code below is how to classify clothing into categories such as dresses, t-shirts, sandals, trainers etc. The dataset used is the Fashion MNIST dataset from Zalando the online fashion brand, find out more about this dataset here: https://github.com/zalandoresearch/fashion-mnist
Azure Machine Learning is a platform for developing and deploying your machine learning models. Use your favourite frameworks, libraries and tools to build and deploy your machine learning experiments with the help of the cloud. https://docs.microsoft.com/en-us/azure/machine-learning/service/overview-what-is-azure-ml
You have many options for development environments to use with Azure Machine Learning - so take a look at the one your used to using or looking to setup: https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-choose-a-dev-environment
Once you have chosen an environment - follow the instructions here to configure this environment: https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-configure-environment
For these samples specifically I have tested:
The code files below are listed in order of demonstration and reusability
- FashionMNISTImageClassification-Model.ipynb
- Fashion MNIST Image Classification - Azure ML SDK Training.ipynb
- Fashion MNIST Image Classification - Azure ML SDK Deployment.ipynb
In the Fashion MNIST model notebook you will see the code for a standard Keras and Tensorflow Convolutional Neural Network (CNN). This symbolises the fact that the Azure ML SDK can be used and intergrated with any model, no matter what framework or setup you are using.
If you run this code on your local machine, its likely to run slowly as it churns through 60,000 training images 24 times. Therefore with the Azure ML SDK I will show you how to setup your target compute and use a GPU machine to train the model quicker
Run through this code to see what the model does and whats it predicting
In this Fashion MNIST notebook we introduce how to instrument your training process with the Azure ML SDK.
This code will show how Azure ML SDK can support your machine learning project with:
- A central repository for your machine learning project
- Creating a cloud computer target and running your training in the cloud
- Whilst running your training in the cloud, add logging to the code to see in real time in your notebook the outputs and progress of the training on the remote compute in the cloud
- Saving your large datasets to azure storage so your training models can mount the data to the assigned training compute and have a 'one-source-of-truth' dataset for all your data science team to be using
- Finally registering this model with versioning so others can leverage it easily
In this Fashion MNIST notebook we introduce how to take the models you have registered and versioned, deploy them to production and monitor them
This code will show how Azure ML SDK can support your machine learning project with:
- creating a training and scoring script for your model
- creating a bespoke environment for your model to run in (libraries and packages to install)
- setting up a container service to host your model
- deploying your model to the cloud container service
- retrieving the service scoring URL for your hosted model
- sending test data to your hosted model to be scored and returned to compare for the accuracy of your model on your validation set
Make sure you delete the compute when you are not using it to save money
A couple of options ...
- make sure you delete the batch AI cluster and any container instances you created in your resource group.
- Go to your resource group in the Azure Portal (left panel 'resource groups' and select your resource group name)
- Next select the compute resources (such as the 'batch AI' cluster) and choose delete