AML — Azure Machine Learning Introduction

Caio Moreno
3 min readMay 8, 2020

--

Azure Machine Learning is a platform for operating machine learning workloads in the cloud.

Built on the Microsoft Azure cloud platform, Azure Machine Learning enables you to manage:

  • Scalable on-demand compute for machine learning workloads.
  • Data storage and connectivity to ingest data from a wide range sources.
  • Machine learning workflow orchestration to automate model training, deployment, and management processes.
  • Model registration and management, so you can track multiple versions of models and the data on which they were trained.
  • Metrics and monitoring for training experiments, datasets, and published services.
  • Model deployment for real-time and batch inferencing.

What is an Azure Machine Learning Workspaces?

A workspace is a context for the experiments, data, compute targets, and other assets associated with a machine learning workload.

Workspaces for Machine Learning Assets

A workspace defines the boundary for a set of related machine learning assets. You can use workspaces to group machine learning assets based on projects, deployment environments (for example, test and production), teams, or some other organizing principle. The assets in a workspace include:

  • Compute targets for development, training, and deployment.
  • Data for experimentation and model training.
  • Notebooks containing shared code and documentation.
  • Experiments, including run history with logged metrics and outputs.
  • Pipelines that define orchestrated multi-step processes.
  • Models that you have trained.

Workspaces as Azure Resources

Workspaces are Azure resources, and as such they are defined within a resource group in an Azure subscription, along with other related Azure resources that are required to support the workspace.

The Azure resources created alongside a workspace include:

  • A storage account — used to store files used by the workspace as well as data for experiments and model training.
  • An Application Insights instance, used to monitor predictive services in the workspace.
  • An Azure Key Vault instance, used to manage secrets such as authentication keys and credentials used by the workspace.
  • Virtual Machines, and their associated virtual hardware resources, used to provide compute for notebook development in the workspace.
  • A container registry, used to manage containers for deployed models.

Role-Based Access Control

You can assign role-based authorization policies to a workspace, enabling you to manage permissions that restrict what actions specific Azure Active Directory (AAD) principals can perform. For example, you could create a policy that allows only users in the IT Operations group to create compute targets and datastores, while allowing users in the Data Scientists group to create and run experiments and register models.

Azure Machine Learning studio

You can manage the assets in your Azure Machine Learning workspace in the Azure portal, but as this is a general interface for managing all kinds of resources in Azure, data scientists and other users involved in machine learning operations may prefer to use a more focused, dedicated interface.

The Azure Machine Learning SDK

While graphical interfaces like Azure Machine Learning studio make it easy to create and manage machine learning assets, it is often advantageous to use a code-based approach to managing resources. By writing scripts to create and manage resources, you can:

  • Run machine learning operations from your preferred development environment.
  • Automate asset creation and configuration to make it repeatable.
  • Ensure consistency for resources that must be replicated in multiple environments (for example, development, test, and production)
  • Incorporate machine learning asset configuration into developer operations (DevOps) workflows, such as continuous integration / continuous deployment (CI/CD) pipelines.

Azure Machine Learning provides software development kits (SDKs) for Python and R, which you can use to create, manage, and use assets in an Azure Machine Learning workspace.

Installing the Azure Machine Learning SDK for Python

You can install the Azure Machine Learning SDK for Python by using the pip package management utility, as shown in the following code sample:

pip install azureml-sdk

Sample codes:
https://github.com/Azure/MachineLearningNotebooks
https://github.com/caiomsouza/microsoft-aml-azure-machine-learning

Learn more:
https://docs.microsoft.com/en-gb/learn/modules/intro-to-azure-machine-learning-service/1-introduction

--

--

Caio Moreno

Solutions Architect and Data Scientist @databricks | Adjunct Professor at @IEuniversity | PhD @unicomplutense (Opinions are my own)