Azure Machine Learning Deployment Workflow

Francesca Lazzeri
Oct 12, 2018 · 4 min read

This blog post is co-authored by Jaya Mathew and Francesca Lazzeri, data scientists at Microsoft.

The Artificial Intelligence Conference in London is a relatively addition to the list of conferences hosted by O’Reilly worldwide. The aim of this conference is to create a forum for the ever-growing AI community to explore the most essential issues and innovations in applied AI. In the conference the various talks covered topics ranging from practical business applications of AI, to compelling AI enabled use cases, to various technical trainings and deep dive into successful AI projects etc.

In our session “A day in the life of a data scientist in an AI company”, we presented a scientific framework to help organizations to systematically discover opportunities to create value from data, qualify new opportunities and assess their fit and potential, then how to build a team to smoothly implement end-to-end advanced analytics pilots and projects, and produce sustainable ongoing business value from data. Specifically we shared a few important concepts, such as the Machine Learning Workflow and the Team Workspace.

In the session, we also introduced the audience to Azure AI’s latest offering Azure Machine Learning Service. Azure Machine Learning Service (Preview) is a cloud service that you can use to develop and deploy machine learning models. Using Azure Machine Learning Service, you can track your models as you build, train, deploy, and manage them, all at the broad scale that the cloud provides.

The Machine Learning Workflow

The Machine Learning workflow is an agile, iterative data science framework to deliver predictive analytics solutions and intelligent applications efficiently. It helps improve team collaboration and learning. It contains a distillation of the best practices and structures that facilitate the successful implementation of data science initiatives.

The goal is to help companies fully realize the benefits of their analytics program. The life cycle outlines the major stages that projects typically execute, often iteratively:

  • Business Understanding
  • Data Acquisition and Understanding
  • Modeling
  • Deployment
  • Customer Acceptance and Consumption

The following diagram provides a view of the tasks (in blue) associated with each stage of the life cycle:

The Team Workspace

In Azure Machine Learning Service, the workspace represents a central location for a team to collaborate and it manages access to compute targets, data storage, models created, docker images created, webservices deployed and it keeps track of all the experiment runs that were performed with it. Data scientists can manage the authorization and creation of workspaces and experiment from the Python SDK.

You can use Python to get started with Azure Machine Learning. In the snippet above, we are creating a workspace called “Demo” in the resource group “Contoso” which resides in the given subscription. The workspace will be created in the Azure region “eastUS2”.

You can create multiple workspaces, and each workspace can be shared by multiple people. When sharing a workspace, control access to the workspace by assigning the following roles to users:

  • Owner
  • Contributor
  • Reader

When you create a new workspace, it automatically creates several Azure resources that are used by the workspace:

Azure Machine Learning Deployment Workflow

With Azure Machine Learning Service, once the data scientist builds a satisfactory model, the trained model can be easily put into production and monitored.

The following diagram illustrates the complete deployment workflow:

In the next few paragraphs, we will show how to perform the following steps:

  1. Register the model in a registry hosted in your Azure Machine Learning Service workspace
  2. Register an image that pairs a model with a scoring script and dependencies in a portable container
  3. Deploy the image as a web service in the cloud or to edge devices

Step 1: Register model

Step 2: Register image

In this second step, you need to create your scoring script, your environment file and your configuration file.

Step 3: Deploy image

You can deploy registered images into the cloud or to edge devices. here we deploy it to Azure Container Instances, that offers a simple way to run a container in Azure, without having to provision any virtual machines and without having to adopt a higher-level service.

Conclusion

In this blog post, we outline the various aspects that need to be addressed from data collection to metrics for a successful AI model to be used in a production environment. In particular, we introduced the audience to Azure’s latest cloud analytics environment that makes it easy to collect data, analyze, experiment, and build a model for any organization to use. In the last part, we showed how to use Azure Machine Learning Service to deploy your models to to Azure Container Instances.

References

Microsoft Azure

Any language. Any platform. Our team is focused on making the world more amazing for developers and IT operations communities with the best that Microsoft Azure can provide. If you want to contribute in this journey with us, contact us at medium@microsoft.com

Francesca Lazzeri

Written by

Senior Machine Learning Scientist at Microsoft. My goal is to make developers like you awesome at applied AI and Machine Learning. @frlazzeri on Twitter.

Microsoft Azure

Any language. Any platform. Our team is focused on making the world more amazing for developers and IT operations communities with the best that Microsoft Azure can provide. If you want to contribute in this journey with us, contact us at medium@microsoft.com