Registry / azure / azureml-pipeline

azureml-pipeline

JSON →
library1.62.0pypypiunverified

The `azureml-pipeline` library is part of the Azure Machine Learning V1 Python SDK, used to build, optimize, and manage complex machine learning workflows as pipelines. It enables users to define sequences of steps, manage data dependencies, and run these pipelines on various Azure compute targets. The current version is 1.62.0, and it generally follows the release cadence of the broader Azure ML V1 SDK, with updates typically occurring monthly or bi-monthly.

pip install azureml-pipeline azureml-core
INSTALL
IMPORT
SIG · AZUREML-PIPELINE
A
azureml-pipeline
azurepythonv1.62.0
Install
25.1s avg
Import
3143ms
Disk
386MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.62.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 25.4s
py 3.11
✕ build_error
✓ 25.25s
py 3.12
✕ build_error
✕ build_error
py 3.13
✓ —
✓ 20.95s
py 3.9
✕ build_error
✓ 28.68s
386MB installed
● package 386MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Workspace
from azureml.core import Workspace
Experiment
from azureml.core import Experiment
ComputeTarget
from azureml.core.compute import ComputeTarget, AmlCompute
Pipeline
from azureml.pipeline.core import Pipeline
PythonScriptStep
from azureml.pipeline.steps import PythonScriptStep
PipelineData
from azureml.pipeline.core import PipelineData

This quickstart demonstrates how to create and submit a simple Azure ML pipeline using `azureml-pipeline`. It involves obtaining a Workspace, defining a compute target, creating a Python script for a step, and then assembling and submitting these into a pipeline. Ensure your Azure ML Workspace details are accessible either via `config.json` or environment variables for authentication.

import os from azureml.core import Workspace, Experiment from azureml.core.compute import ComputeTarget, AmlCompute from azureml.pipeline.core import Pipeline from azureml.pipeline.steps import PythonScriptStep # --- 1. Get Azure ML Workspace --- # Authenticate via config.json or environment variables try: ws = Workspace.from_config() print(f"Workspace loaded from config: {ws.name}") except Exception: print("config.json not found or failed, trying environment variables...") # Replace with your actual subscription_id, resource_group, workspace_name subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "<YOUR_SUBSCRIPTION_ID>") resource_group = os.environ.get("AZURE_RESOURCE_GROUP", "<YOUR_RESOURCE_GROUP>") workspace_name = os.environ.get("AZURE_WORKSPACE_NAME", "<YOUR_WORKSPACE_NAME>") if "<YOUR_SUBSCRIPTION_ID>" in subscription_id: # Check if placeholders are still present raise ValueError("Please set AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, AZURE_WORKSPACE_NAME or provide config.json") ws = Workspace(subscription_id, resource_group, workspace_name) print(f"Workspace loaded from environment: {ws.name}") # --- 2. Define Compute Target --- cpu_cluster_name = "cpu-cluster-qs" # Name for your compute cluster try: cpu_cluster = ComputeTarget(workspace=ws, name=cpu_cluster_name) print(f"Found existing compute target: {cpu_cluster_name}") except Exception: print(f"Creating a new compute target: {cpu_cluster_name}") compute_config = AmlCompute.provisioning_configuration( vm_size="STANDARD_DS3_V2", min_nodes=0, max_nodes=1 ) cpu_cluster = ComputeTarget.create(ws, cpu_cluster_name, compute_config) cpu_cluster.wait_for_completion(show_output=True) # --- 3. Create a Python script for a pipeline step --- script_name = "my_pipeline_step_script.py" with open(script_name, "w") as f: f.write("import os; print(f'Hello from Azure ML Pipeline step on {os.uname().nodename}')") # --- 4. Define a Pipeline Step --- step = PythonScriptStep( name="HelloStep", script_name=script_name, compute_target=cpu_cluster, source_directory=".", # The directory containing the script allow_reuse=True # Allows reuse of previous step runs if inputs/parameters are identical ) # --- 5. Create and Submit the Pipeline --- pipeline = Pipeline(workspace=ws, steps=[step]) print("Submitting pipeline...") pipeline_run = Experiment(ws, 'MyFirstPipelineExperiment').submit(pipeline) print(f"Pipeline submitted. Run ID: {pipeline_run.id}") # Uncomment the line below to wait for the pipeline run to complete # pipeline_run.wait_for_completion(show_output=True)
Debug
Known issues
breaking`azureml-pipeline` is part of the Azure ML V1 SDK. Microsoft's recommended SDK is V2 (`azure.ai.ml`). Mixing V1 and V2 objects or concepts will lead to runtime errors (e.g., `AttributeError`, `TypeError`).
fix
Decide whether to use the V1 SDK (all `azureml-*` packages) or the V2 SDK (`azure.ai.ml`). Do not mix them in the same codebase. For new projects, V2 is generally recommended.
affects: All versions of `azureml-pipeline` (V1 SDK) when attempting to use V2 SDK constructs.
gotchaThe `azureml-pipeline` library requires `azureml-core` for fundamental functionalities like `Workspace`, `ComputeTarget`, and `Experiment`. Installing only `azureml-pipeline` will result in `ModuleNotFoundError` for these core classes.
fix
Always install `azureml-pipeline` alongside `azureml-core` (e.g., `pip install azureml-pipeline azureml-core`). Alternatively, `pip install azureml-sdk` installs a compatible set of V1 SDK components.
affects: All versions
gotcha`azureml-pipeline` has specific Python version requirements. Current versions (1.62.0) support Python `3.8` and `3.9`. Using unsupported Python versions (e.g., Python 3.10+) will lead to installation failures or runtime errors.
fix
Ensure your Python environment is within the supported range (e.g., `python -m venv .venv` and `source .venv/bin/activate` with Python 3.8 or 3.9).
affects: All versions. Refer to PyPI metadata for exact range (`requires_python`).
gotchaPipeline steps rely on Azure ML compute targets and datastores. Errors can occur if the specified compute target does not exist, is not correctly configured, or lacks necessary permissions.
fix
Verify that your compute target (e.g., AmlCompute cluster) is created and running in your Azure ML Workspace. Check permissions of the service principal or user identity used for authentication.
affects: All versions
Upgrade
Version history
1.62.0latest on PyPI · released Feb 25, 2026
Audit
Dependencies
azureml-corerequiredProvides core Azure ML functionalities like Workspace, ComputeTarget, Datastore, and Experiment, which are essential for defining and running pipelines.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
azureml-pipeline — pip install azureml-pipeline · libregistry