Azure Machine Learning Designer CLI Quickstart

Create and manage ML pipelines using the Azure ML CLI v2.

Introduction

This quickstart guide will walk you through the essential steps to get started with the Azure Machine Learning designer using the Azure CLI v2. The designer provides a visual interface for building, testing, and deploying machine learning models without extensive coding.

Prerequisites

  1. Azure Subscription: You need an active Azure account.
  2. Azure CLI v2: Ensure you have the Azure CLI installed and updated to the latest version. Install it here.
  3. Azure ML Extension: Install the Azure Machine Learning extension for the CLI:
    az extension add -n ml
  4. Azure ML Workspace: You need an Azure Machine Learning workspace. If you don't have one, you can create it using the CLI or the Azure portal.

Step 1: Set up your Azure ML Workspace

Log in to your Azure account and set your default subscription.

az login
az account set --subscription ""

Create a resource group if you don't have one:

az group create --name  --location 

Create an Azure Machine Learning workspace:

az ml workspace create --name  --resource-group  --location 

Configure the CLI to use your workspace:

az ml workspace set --name  --resource-group 

Step 2: Explore the Designer

The Azure ML designer can be accessed through the Azure portal. Navigate to your Azure Machine Learning workspace, and then select "Designer" from the left-hand navigation menu.

Step 3: Create a New Pipeline

In the Designer canvas, click + New pipeline to start building your machine learning workflow.

Adding Components

The left pane of the Designer contains various pre-built modules (components) that you can drag and drop onto the canvas:

Connecting Components

Click and drag the output port of one component to the input port of another to connect them.

Configuring Components

Select a component on the canvas to open its configuration pane on the right. Here you can set parameters, select algorithms, and define training settings.

Step 4: Train and Deploy a Model

Training the Model

Once your pipeline is designed, click the Submit button at the top of the canvas. This will trigger a training job. You can choose to create a new experiment or use an existing one.

Tip: Configure compute targets for your training jobs. You can use the Azure ML managed compute or attach your own compute resources.

Deploying the Model

After the training job completes successfully, you can deploy your trained model as a web service. Select the trained model component in your pipeline and click the Deploy button. You'll be prompted to configure deployment settings, including the endpoint name and compute type (e.g., Azure Kubernetes Service or managed online endpoints).

Step 5: Using the CLI to Manage Designer Artifacts

While the designer provides a visual interface, the Azure CLI can be used to manage its artifacts programmatically.

Creating a Pipeline Job from a YAML file

Designer pipelines can be exported as YAML files. You can then use the CLI to submit these pipelines as jobs.

az ml job create --file 

Managing Datasets

Register and manage datasets that can be used in your designer pipelines:

az ml data create --file 

Managing Endpoints

List and manage your deployed endpoints:

az ml online-endpoint list
az ml online-endpoint show --name 
az ml online-deployment delete --endpoint  --name 

Next Steps

Note: The Azure ML CLI v2 offers a powerful way to automate and manage your Azure ML resources. Familiarizing yourself with its commands will enhance your productivity.