Skip to content

Tutorial for training PyTorch and Scikit-Learn machine learning models, converting them to onnx format, inferencing the converted model with onnxruntime and finally deploying them to Azure.

Notifications You must be signed in to change notification settings

prabhat00155/onnx-odsc-tutorial

Repository files navigation

Performant cross-platform ML/DNN model inferencing on cloud and edge with ONNX Runtime

In this workshop, we will train Machine Learning models using popular frameworks and convert them to the interoperable ONNX format, then inference the converted model using the open sourced ONNX Runtime. We'll then demonstrate how to deploy the ONNX model as a hosted webservice using Azure Machine Learning.

Pre-Requisites

You will need an Azure subscription for this workshop. For attendees of ODSC Europe 2019, we have provided complimentary $50 Azure passes. Go to www.microsoftazurepass.com to redeem your Azure credit. The value is good for 30 days or until all credit has been used up. You will need a Microsoft Account to redeem your Azure credit. You can use your existing Microsoft Account or create a new one. Please follow the instructions on the page, and refer to this page for full details on how to redeem your pass.

Note: the credit cannot be redeemed for existing Azure subscriptions

Alternatively, when you sign up for a new Azure trial, you can get $200 free credit for the first 30 days. Credit card information is required for identity validation, and you will not be automatically charged after the credits are used up and/or the trial period ends. You must explicitly upgrade your free account to a pay-as-you-go plan to continue using Azure after the 30-day trial. For more questions about the free trial, please check the Azure Free Account FAQ.

Getting Started

  1. Log into the Azure Portal and create a new AzureML workspace.
  • Create a Resource
  • AI and Machine Learning
  • Machine Learning
    • name = choose a name for your workspace...e.g. "odsc-[yourname]"
    • subscription = your subscription name
    • resource group -> create a new resource group, you can name it something like "my-rg"
  1. Open your Machine Learning workspace. You may launch the new Azure Machine Learning studio from there. We then click on Compute tab on the left hand side(under 'Manage' in the new portal and under 'Assets' in the old). Now we will create a NotebookVM by clicking new, naming the notebook VM and selecting a notebook configuration. The NotebookVM has Python and Jupyter Notebooks pre-installed to make it an easy ready-to-use workspace.
  • Select a name for your Notebook VM
  • Select the VM type: we suggest using STANDARD_D3_V2 --- 4 vCPUs, 14 GB memory, 200 GB storage
  1. Open Jupyter on the Notebook VM
  2. From Jupyter, click on "New" -> "Terminal" and then clone this repository by copy/pasting or typing `git clone https://github.com/prabhat00155/onnx-odsc-tutorial.git'
  3. Open up pytorch experiment-exercise.ipynb and let's begin!

Additional Resources

About

Tutorial for training PyTorch and Scikit-Learn machine learning models, converting them to onnx format, inferencing the converted model with onnxruntime and finally deploying them to Azure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •