Skip to main content

What is an Azure Machine Learning Component?

An Azure Machine Learning component is a self-contained piece of code that performs one step in a machine learning pipeline. Components are the building blocks of machine learning workflows, analogous to functions in programming.
Components enable reusability, versioning, and collaboration across machine learning pipelines and teams.

Component Structure

A component consists of three parts:
1

Metadata

Name, display name, version, type, description, tags
2

Interface

Input/output specifications with name, type, description, and default values
3

Execution

Command, code, and environment needed to run the component

Why Use Components?

Well-Defined Interface

Clear inputs and outputs hide implementation complexity

Reusability

Share components across pipelines, workspaces, and teams

Version Control

Track component versions for compatibility and reproducibility

Unit Testable

Self-contained code is easy to test independently

Component Example

Define a Component

Component Implementation

Build a Pipeline with Components

Connect components to create end-to-end workflows:

Component Input/Output Types

Supported Types

Input Definition

Output Definition

Component Versioning

Manage component versions for reproducibility:

Share Components Across Workspaces

Using Registries

Built-in Components

Azure ML provides pre-built components for common tasks:

Data Processing

  • Select Columns
  • Clean Missing Data
  • Normalize Data
  • Split Data

Feature Engineering

  • Feature Hashing
  • N-Gram Features
  • Filter-Based Selection
  • PCA Transformation

Training

  • Train Classifier
  • Train Regressor
  • Train Clustering Model
  • Train Recommender

Evaluation

  • Evaluate Model
  • Cross Validate Model
  • Tune Hyperparameters
  • Score Model

Using Built-in Components

Component Best Practices

Each component should do one thing well:
  • Data preprocessing
  • Feature engineering
  • Model training
  • Model evaluation
Don’t combine multiple responsibilities in one component.
Always specify version numbers:
  • Use semantic versioning (1.0.0, 1.1.0, 2.0.0)
  • Increment major version for breaking changes
  • Increment minor version for new features
  • Increment patch version for bug fixes
Provide clear descriptions:
Specify input constraints:

Component vs Python Function

Parallel Components

Process data in parallel using the parallel component:

Next Steps

Build Pipelines

Create ML pipelines with components

Component Gallery

Browse pre-built components

Share Components

Use registries for team collaboration

CI/CD Integration

Automate component deployment

Additional Resources