Reader small image

You're reading from  Azure Data Scientist Associate Certification Guide

Product typeBook
Published inDec 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800565005
Edition1st Edition
Languages
Right arrow
Authors (2):
Andreas Botsikas
Andreas Botsikas
author image
Andreas Botsikas

Andreas Botsikas is an experienced advisor working in the software industry. He has worked in the finance sector, leading highly efficient DevOps teams, and architecting and building high-volume transactional systems. He then traveled the world, building AI-infused solutions with a group of engineers and data scientists. Currently, he works as a trusted advisor for customers onboarding into Azure, de-risking and accelerating their cloud journey. He is a strong engineering professional with a Doctor of Philosophy (Ph.D.) in resource optimization with artificial intelligence from the National Technical University of Athens.
Read more about Andreas Botsikas

Michael Hlobil
Michael Hlobil
author image
Michael Hlobil

Michael Hlobil is an experienced architect focused on quickly understanding customers' business needs, with over 25 years of experience in IT pitfalls and successful projects, and is dedicated to creating solutions based on the Microsoft Platform. He has an MBA in Computer Science and Economics (from the Technical University and the University of Vienna) and an MSc (from the ESBA) in Systemic Coaching. He was working on advanced analytics projects in the last decade, including massive parallel systems and Machine Learning systems. He enjoys working with customers and supporting the journey to the cloud.
Read more about Michael Hlobil

View More author details
Right arrow

Chapter 6: Visual Model Training and Publishing

Azure Machine Learning (AzureML) Studio offers a designer experience when developing a model by allowing you to drag, drop, and configure training and inference pipelines. In this chapter, you will get an overview of the designer. You will then create a training process. Once you have seen the overall flow that's used with the designer, we will close this chapter by creating an inference pipeline and publishing the trained model artifact as a service endpoint.

In this chapter, we will cover the following topics:

  • Overview of the designer
  • Designing a training process
  • Creating a batch and real-time inference pipeline
  • Deploying a real-time inference pipeline

Technical requirements

You will need to have access to an Azure subscription. Within that subscription, you will need a resource group named packt-azureml-rg. In addition, you will need to have either a Contributor or Owner access control (IAM) role at the resource group level. Within that resource group, you should have deployed a machine learning resource named packt-learning-mlw, as described in Chapter 2, Deploying Azure Machine Learning Workspace Resources.

You will also need to have registered churn-dataset within your workspace, which you created in Chapter 5, Letting the Machines Do the Model Training.

Overview of the designer

AzureML Studio offers a graphical designer that allows you to author pipelines visually. As per the definition, a pipeline is an independently executable flow of subtasks that describes a machine learning task. There are three types of pipelines that you can create within the designer:

  • Training pipelines: These pipelines are used for training models.
  • Batch inference pipelines: These pipelines are used to operationalize pre-trained models for batch prediction.
  • Real-time inference pipelines: These pipelines are used to expose a REST API that allows third-party applications to make real-time predictions using pre-trained models.

To create a batch and a real-time pipeline, you need to author a training pipeline. In the following sections, you will learn how to create a training pipeline and then produce a batch and real-time pipeline on top of it. In Chapter 11, Working with Pipelines, you will learn how to author similar pipelines through...

Building the pipeline with the designer

In this section, we will create a training pipeline to train a machine learning model against the churn dataset you used in the previous chapter.

When you start designing a training pipeline, we recommend leveraging the 7 Steps of Machine Learning approach shown in the following diagram, which contains all the steps needed to create a machine learning model:

Figure 6.5 – 7 Steps of Machine Learning

This 7-step journey is a valuable checklist for real-life end-to-end scenarios to ensure you are not missing anything. In this journey, you will need various components, transformations, and models, which you can find in the asset library. To keep things simple, we will skip a couple of steps in the pipeline that you are going to design. In this section, you will start with a dataset that you will prepare to train a model. You will then evaluate the model and store it. In the next section, you will use that model...

Creating a batch and real-time inference pipeline

This section will discuss the two options of deploying an inference pipeline from the designer: batch and real time:

  • With batch predictions, you asynchronously score large datasets.
  • With real-time prediction, you score a small dataset or a single row in real time.

When you create an inference pipeline, either batch or real time, AzureML takes care of the following things:

  • AzureML stores the trained model and all the trained data processing modules as an asset in the asset library under the Datasets category.
  • It removes unnecessary modules such as Train Model and Split Data automatically.
  • It adds the trained model to the pipeline.

Especially for real-time inference pipelines, AzureML will add a web service input and a web service output in the final pipeline.

Let's start by creating a batch pipeline, something you will do in the next section.

Creating a batch pipeline

In this section...

Deploying a real-time inference pipeline

In this section, you will deploy the sample real-time inference pipeline you created in the Real-time inference pipeline designer tab. Let's get started:

  1. Click on the Deploy button. This will bring up the Set up real-time endpoint popup shown in the following screenshot.
  2. On the Set up real-time endpoint popup, select the Deploy new real-time endpoint radio button option.
  3. In the Name text field, enter first-real-time-endpoint.
  4. In the Description text field, enter Container Deployment of the first real-time pipeline.
  5. Click on the Compute type drop-down list and select Azure Container Instance.
  6. You won't need to modify the Advanced settings. The completed popup should look as follows:

    Figure 6.21 – Set up real-time endpoint popup

  7. Click on the Deploy button to provision your real-time endpoint. This will take a couple of minutes.

After successfully deploying the pipeline, you will find the newly...

Summary

This chapter introduced the pipeline designer, which allows us to create AzureML pipelines via drag and drop. You built your first training pipeline based on the churn dataset and the Two-Class Decision Forest model. We discussed three pipeline types, authored the training pipeline, created a batch pipeline, and developed and deployed a real-time pipeline.

This chapter concludes the no-code, low-code features that AzureML provides. In the next chapter, you will start working on the AzureML Python SDK. The AzureML Python SDK allows you to train models and create machine learning pipelines through code, which is critical for the DP-100 exam.

Question

What are the options for deploying real-time pipelines?

  • Azure Container Instances only
  • Azure Container Instances and Azure Kubernetes Services
  • Azure Container Instances and Azure Virtual Machines
  • Azure Virtual Machines only

Further reading

This section offers a list of helpful web resources to help you augment your AzureML designer knowledge:

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Azure Data Scientist Associate Certification Guide
Published in: Dec 2021Publisher: PacktISBN-13: 9781800565005
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Andreas Botsikas

Andreas Botsikas is an experienced advisor working in the software industry. He has worked in the finance sector, leading highly efficient DevOps teams, and architecting and building high-volume transactional systems. He then traveled the world, building AI-infused solutions with a group of engineers and data scientists. Currently, he works as a trusted advisor for customers onboarding into Azure, de-risking and accelerating their cloud journey. He is a strong engineering professional with a Doctor of Philosophy (Ph.D.) in resource optimization with artificial intelligence from the National Technical University of Athens.
Read more about Andreas Botsikas

author image
Michael Hlobil

Michael Hlobil is an experienced architect focused on quickly understanding customers' business needs, with over 25 years of experience in IT pitfalls and successful projects, and is dedicated to creating solutions based on the Microsoft Platform. He has an MBA in Computer Science and Economics (from the Technical University and the University of Vienna) and an MSc (from the ESBA) in Systemic Coaching. He was working on advanced analytics projects in the last decade, including massive parallel systems and Machine Learning systems. He enjoys working with customers and supporting the journey to the cloud.
Read more about Michael Hlobil