Create and run machine learning pipelines using components with the Azure Machine Learning studio

APPLIES TO: Azure CLI ml extension v2 (current)

In this article, you'll learn how to create and run machine learning pipelines by using the Azure Machine Learning studio and Components. You can create pipelines without using components, but components offer better amount of flexibility and reuse. Azure ML Pipelines may be defined in YAML and run from the CLI, authored in Python, or composed in Azure ML Studio Designer with a drag-and-drop UI. This document focuses on the AzureML studio designer UI.

Prerequisites

Register component in your workspace

Note

Designer supports two type of components, classic prebuilt components and custom components. These two types of components are not compatible.

Classic prebuilt components provides prebuilt components majorly for data processing and traditional machine learning tasks like regression and classification. This type of component continues to be supported but will not have any new components added.

Custom components allow you to provide your own code as a component. It supports sharing across workspaces and seamless authoring across Studio, CLI, and SDK interfaces.

This article applies to custom components.

To build pipeline using components in UI, you need to register components to your workspace first. You can use CLI or SDK to register components to your workspace, so that you can share and reuse the component within the workspace. Registered components support automatic versioning so you can update the component but assure that pipelines that require an older version will continue to work.

In the example below take using CLI for example. If you want to learn more about how to build a component, see Create and run pipelines using components with CLI.

  1. From the cli/jobs/pipelines-with-components/basics directory of the azureml-examples repository, navigate to the 1b_e2e_registered_components subdirectory.

  2. Register the components to AzureML workspace using following commands. Learn more about ML components.

    az ml component create --file train.yml
    az ml component create --file score.yml
    az ml component create --file eval.yml
    
  3. After register component successfully, you can see your component in the studio UI.

Screenshot showing registered component in component page.

Create pipeline using registered component

  1. Create a new pipeline in the designer.

    Screenshot showing creating new pipeline in designer homepage.

  2. Set the default compute target of the pipeline.

    Select the Gear icon Screenshot of the gear icon that is in the UI. at the top right of the canvas to open the Settings pane. Select the default compute target for your pipeline.

    Screenshot showing setting default compute for the pipeline.

    Important

    Attached compute is not supported, use compute instances or clusters instead.

  3. In asset library, you can see Data assets and Components tabs. Switch to Components tab, you can see the components registered from previous section.

    Screenshot showing registered component in asset library.

    Drag the components and drop on the canvas. By default it will use the default version of the component, and you can change to a specific version in the right pane of component if your component has multiple versions.

    Screenshot showing changing version of component.

  4. Connect the upstream component output ports to the downstream component input ports.

  5. Select one component, you'll see a right pane where you can configure the component.

    For components with primitive type inputs like number, integer, string and boolean, you can change values of such inputs in the component detailed pane.

    You can also change the output settings and compute target where this component run in the right pane.

    Screenshot showing component parameter settings.

Note

Currently registered components and the designer built-in components cannot be used together.

Submit pipeline

  1. Select submit, and fill in the required information for your pipeline job.

    Screenshot of set up pipeline job with submit highlighted.

  2. After submit successfully, you'll see a job detail page link in the left page. Select Job detail to go to pipeline job detail page for checking status and debugging.

    Screenshot showing the submitted jobs list.

    Note

    The Submitted jobs list only contains pipeline jobs submitted during an active session. A page reload will clear out the content.

Next steps