Aml Pipelines How To Use Pipeline Drafts
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
![]()
How to Use Pipeline Drafts
In this notebook, we will show you how you can use Pipeline Drafts. Pipeline Drafts are mutable pipelines which can be used to submit runs and create Published Pipelines.
Prerequisites and AML Basics
If you are using an Azure Machine Learning Notebook VM, you are all set. Otherwise, make sure you go through the configuration Notebook first if you haven't. This sets you up with a working config file that has information on your workspace, subscription id, etc.
Initialization Steps
Compute Target
Retrieve an already attached Azure Machine Learning Compute to use in the Pipeline.
Note that if you have an AzureML Data Scientist role, you will not have permission to create compute resources. Talk to your workspace or IT admin to create the compute targets described in this section, if they do not already exist.
Build a Pipeline
Build a simple pipeline to use to create a PipelineDraft.
Create a Pipeline Draft
Create a PipelineDraft by specifying a name, description, experiment_name and Pipeline. You can also specify tags, properties and pipeline_parameter values.
In this example we use the previously created Pipeline object to create the Pipeline Draft. You can also create a Pipeline Draft from an existing Pipeline Run, Published Pipeline, or other Pipeline Draft.
List Pipeline Drafts in a Workspace
Use the PipelineDraft.list() function to list all PipelineDrafts in a Workspace. You can use the optional tags parameter to filter on specified tag values.
Get a Pipeline Draft by Id
Update a Pipeline Draft
The update() function of a pipeline draft can be used to update the name, description, experiment name, pipeline parameter assignments, continue on step failure setting and Pipeline associated with the PipelineDraft.
Submit a Pipeline Run from a Pipeline Draft
Use the pipeline_draft.submit() function to submit a PipelineRun. After the run is submitted, the PipelineDraft can still be edited and used to submit new runs.
Create a Published Pipeline from a Pipeline Draft
Use the pipeline_draft.publish() function to create a Published Pipeline from the Pipeline Draft. After creating a Published Pipeline, the Pipeline Draft can still be edited and used to create other Published Pipelines.