Getting started
Install Component SDK/CLI
Find the latest version
Currently component SDK & CLI are under active development. We will release a stable version to the stable pypi index regularly (current about monthly cadence). Between two stable version, we might release several preview versions which contains new features and bugfix. You can find the latest preview version in the preview pypi index. For CLI, we only provide preview version. We recommend customer to use same version of CLI & SDK to achieve consistent behavior.
SDK Changelog contains the history of stable releases. Feature set of upcomming release will also be in this page. You can also find the preview version number of critical bugfix in this page.
Install component SDK
Install the latest version of the Azure ML SDK including the APIs to work with components and pipelines.
As for component SDK, we have 3 choices to install: install the latest stable version, a specific version, or the latest preview version.
Please ensure you have a working python environment (python>=3.6,<3.10), a new conda environment is preferred. The python version requirements comes from azureml-core package.
# Install the latest stable version
pip install "azure-ml-component[notebooks]" --upgrade
# Install compatible version of specific version
# pip install "azure-ml-component[notebooks]~=0.9.17" --upgrade
# Install the latest preview version: which has the latest bugfix
# pip install "azure-ml-component[notebooks]==0.1.0.*" --extra-index-url https://azuremlsdktestpypi.azureedge.net/modulesdkpreview --upgrade
We also recommend user to install dataset runtime package. This enables dataset registration before you construct and submit a pipeline.
pip install azureml-dataset-runtime[fuse] --upgrade
Verify information about current installed package:
pip show azure-ml-component
If you failed to setup SDK environment, check our FAQ to get help.
IMPORTANT NOTICE:
We recommend users to only depend on stable version for production workload. Component SDK team will ship post fix for stable version, while there is no such support for preview version. For example version 0.9.16 could have postfix version 0.9.16.post1 .
Recommended pip requirements to auto receive such post fixes:
azure-ml-component~=0.9.16
matches post fixes, as it means: >= 0.9.16, == 0.9.16*
learn more: compatible-release
azure-ml-component==0.9.16.*
which also matches for any post fix: 0.9.16.post1
learn more: version-matching
If there is a bug exists for preview version, user will need to upgrade their package version manually to a new version which has the fix.
Install component CLI
The az ml component CLI provides commands to manage Azure ML components.
Install Azure CLI
If you do not have the Azure CLI installed, follow the installation instructions at https://docs.microsoft.com/cli/azure/install-azure-cli.
Verify installation:
az version
The Azure ML extension requires CLI version >= 2.30. To upgrade your CLI installation, please run the below command.
az upgrade
If “upgrade” is not found in “az” command group, you may need to reinstall it.
NOTE: If you met any issue when using latest azure-cli version, consider downgrade to our recommend version 2.34.
Install component CLI: azure-cli-ml extension
# Login
az login -o none
# Uninstall any previously installed extensions: azure-cli-ml (the `az ml` commands), ml (the vNext extension)
az extension remove -n ml; az extension remove -n azure-cli-ml
# Install remote version of azure-cli-ml (which includes `az ml component` commands)
# This might take several minutes depends on your network, thanks for your patience.
# Install specific stable version (recommended)
az extension add --source https://azuremlsdktestpypi.blob.core.windows.net/wheels/componentsdk/azure_cli_ml-0.9.17-py3-none-any.whl --pip-extra-index-urls https://azuremlsdktestpypi.azureedge.net/componentsdk/0.9.17 --yes --verbose
# Install specific preview version (**notice index URL is not the same as the stable version**)
# az extension add --source https://azuremlsdktestpypi.blob.core.windows.net/wheels/modulesdkpreview/azure_cli_ml-0.1.0.48138292-py3-none-any.whl --pip-extra-index-urls https://azuremlsdktestpypi.azureedge.net/modulesdkpreview/0.1.0.48138292 --yes --verbose
Verify installation:
az ml component -h
You should see the following output:
Group
az ml component : Component subgroup commands (preview).
Reference https://aka.ms/component-cli-walk-through for common use cases.
For detailed help docs, use "az ml component command -h". For example: "az ml component
create -h".
Commands:
archive : Archive a component to exclude it in list result by default.
build : Build a local snapshot of a component.
create : Create a version of the component in workspace based on the provided file.
download : Download snapshot of the component.
list : List components in a workspace.
restore : Restore a component that was previously archived.
show : Show the yaml representation of a component version.
update : Update a version of the component based on the provided file.
validate : Validate the component definition in the provided file.
If you failed to setup CLI environment, check our FAQ to get help.
You can also reference CLI cheat sheet for typical commands.
Getting Started Samples
Below are some samples to help you get started:
Get started - This tutorial goes through how to create pipeline using the component SDK.
Create azureml pipelines with sub pipelines - Demonstrates how to construct azureml pipelines using sub pipelines.
How to use component CLI - A quick walk through to the azure cli extension that manipulates the component.
Interactive development in ITP job instance with component SDK - Describe how to interactive development in ITP job instance with component SDK.
Samples Repo
There are more component & pipeline samples hosted in DesignerPrivatePreviewFeatures github repo.
How to access
The repo is currently a private Github repo.
For Microsoft Internal customers, if you see a 404 when trying to access. You need to do the following to ensure you have a GitHub account that is linked to your Microsoft identity, and be part of Azure organization. Here are the steps:
If you don’t already have a GitHub account, go to github.com and register one for free. You can use any email address you want. It doesn’t have to be your Microsoft corporate email address.
Go to http://aka.ms/azuregithub, and link your GitHub account with your @microsoft.com identity. It may require you to set up 2-factor authentication on your GitHub account.
Join the “Azure” organization.
Now you should have read access to the private repo. If you need write access, please contact us at amlcomponentsdk@microsoft.com with your GitHub id.
Clone Repo with PAT token in AzureML Notebooks
Usually (like in local dev box) you should be able to clone samples repo with below command:
git clone https://github.com/Azure/DesignerPrivatePreviewFeatures.git
In some scenario (like in AzureML Notebooks), you may need to clone the repo with PAT token:
Generate a Personal access token in github token page. Suggested scope is repo (full control).
Open terminal in your preferred notebook folder from Notebook UI
Clone the repo: Replace
${TOKEN}with your PAT token and run below commandgit clone https://${TOKEN}:x-oauth-basic@github.com/Azure/DesignerPrivatePreviewFeatures.git
Follow the command line output to enable SSO for your token and retry if you haven’t done this before.