PipelineEndpoint Class

Represents a Pipeline workflow that can be triggered from a unique endpoint URL.

PipelineEndpoints can be used to create new versions of a PublishedPipeline while maintaining the same endpoint. PipelineEndpoints are uniquely named within a workspace.

Using the endpoint attribute of a PipelineEndpoint object, you can trigger new pipeline runs from external applications with REST calls. For information about how to authenticate when calling REST endpoints, see https://aka.ms/pl-restep-auth.

For more information about creating and running machine learning pipelines, see https://aka.ms/pl-first-pipeline.

Initialize PipelineEndpoint.

Inheritance
builtins.object
PipelineEndpoint

Constructor

PipelineEndpoint(workspace, id, name, description, status, default_version, endpoint, pipeline_version_list, _pipeline_endpoint_provider=None, _published_pipeline_provider=None, _swaggerurl=None)

Parameters

workspace
Workspace
Required

The workspace the PipelineEndpoint is defined in.

id
str
Required

The ID of the PipelineEndpoint.

name
str
Required

The name of the PipelineEndpoint.

description
str
Required

The description of the PipelineEndpoint.

status
str
Required

The new status of the PipelineEndpoint: 'Active' or 'Disabled'.

default_version
str
Required

The default version of pipeline in PipelineEndpoint, auto-increments, starts with "0".

endpoint
str
Required

The REST endpoint URL for the PipelineEndpoint, which can be used to submit pipeline runs.

pipeline_version_list
list
Required

The list of PipelineIdVersion objects.

_pipeline_endpoint_provider
<xref:azureml.pipeline.core._aeva_provider._AevaPublishedPipelineProvider>
Required

The PipelineEndpoint provider.

_pipeline_endpoint_provider
Required

The PublishedPipeline provider.

workspace
Workspace
Required

The workspace object this PipelineEndpoint will belong to.

id
str
Required

The ID of the PipelineEndpoint.

name
str
Required

The name of the PipelineEndpoint.

description
str
Required

The description of the PipelineEndpoint.

status
str
Required

The new status of the PipelineEndpoint: 'Active' or 'Disabled'.

default_version
str
Required

The default version of pipeline in PipelineEndpoint, auto-increments, starts with "0"

endpoint
str
Required

The REST endpoint URL for PipelineEndpoint to submit pipeline runs.

pipeline_version_list
list
Required

The list of PipelineIdVersion

_pipeline_endpoint_provider
<xref:azureml.pipeline.core._aeva_provider._AevaPublishedPipelineProvider>
Required

The PipelineEndpoint provider.

_pipeline_endpoint_provider
Required

The PublishedPipeline provider.

swaggerendpoint
Required

The Swagger REST endpoint URL for PipelineEndpoint to submit pipeline runs.

Remarks

A PipelineEndpoint can be created from either a Pipeline or a PublishedPipeline.

An example to publish from a Pipeline or PublishedPipeline is as follows:


   from azureml.pipeline.core import PipelineEndpoint

   # The pipeline argument can be either a Pipeline or a PublishedPipeline
   pipeline_endpoint = PipelineEndpoint.publish(workspace=ws,
                                                name="PipelineEndpointName",
                                                pipeline=pipeline,
                                                description="New Pipeline Endpoint")

Submit a PipelineEndpoint using submit. When submit is called, a PipelineRun is created which in turn creates StepRun objects for each step in the workflow.

An example of how to submit a PipelineEndpoint is as follows:


   from azureml.pipeline.core import PipelineEndpoint

   pipeline_endpoint = PipelineEndpoint.get(workspace=ws, name="PipelineEndpointName")
   pipeline_run = experiment.submit(pipeline_endpoint)

There are a number of optional settings that can be specified when submitting a PipelineEndpoint. These include:

  • pipeline_parameters: Parameters to pipeline execution, dictionary of {name: value}. See PipelineParameter for more details.

  • parent_run_id: You can supply a run ID to set the parent run of this pipeline run, which is reflected in RunHistory. The parent run must belong to the same experiment as the one this pipeline is being submitted to.

  • pipeline_version: The pipeline version to run.

An example to submit a PipelineEndpoint using these settings is as follows:


   from azureml.pipeline.core import PipelineEndpoint

   pipeline_endpoint = PipelineEndpoint.get(workspace=ws, name="PipelineEndpointName")
   pipeline_run = experiment.submit(pipeline_endpoint,
                                    pipeline_parameters={"param1": "value1"},
                                    parent_run_id="<run_id>",
                                    pipeline_version="0")

To add a new version of a PipelineEndpoint use:


   from azureml.pipeline.core import PipelineEndpoint

   pipeline_endpoint = PipelineEndpoint.get(workspace=ws, name="PipelineEndpointName")
   pipeline_endpoint.add(published_pipeline)

See the following notebook for additional information on creating and using PipelineEndpoints: https://aka.ms/pl-ver-endpoint.

Methods

add

Add the specified pipeline to PipelineEndpoint.

add_default

Add the specified pipeline to PipelineEndpoint and set default version to added pipeline version.

archive

Archive the PipelineEndpoint.

disable

Set the PipelineEndpoint to 'Disabled' and unavailable to run.

enable

Set the PipelineEndpoint to 'Active' and available to run.

get

Get the PipelineEndpoint by name or ID, throws exception if either is not provided.

get_all

Get all active PipelineEndpoints in the current workspace.

Get all active PipelineEndpoints. NOTE: This method is being deprecated in favor of PipelineEndpoint.list().

get_all_pipelines

Get list of pipelines in PipelineEndpoint.

NOTE: This method is being deprecated in favor of list_pipelines()

get_all_versions

Get list of pipelines and corresponding versions in PipelineEndpoint.

NOTE: This method is being deprecated in favor of list_versions()

get_default_version

Get the default version of PipelineEndpoint.

get_pipeline

Get the pipeline of a specified version or the default; throws an exception if the version is not found.

list

List active PipelineEndpoints in the current workspace.

list_pipelines

Get a list of pipelines associated with the PipelineEndpoint.

list_versions

Get a list of pipelines and corresponding versions of the PipelineEndpoint.

publish

Create a PipelineEndpoint with the specified name and pipeline/published pipeline.

The pipeline endpoint is a REST API that can be used from external applications. For information about how to authenticate when calling REST endpoints, see https://aka.ms/pl-restep-auth.

For more information about working with pipeline endpoints, see https://aka.ms/pl-first-pipeline.

Throws Exception if a PipelineEndpoint with the given name already exists.

reactivate

Reactivate a PipelineEndpoint that was archived.

set_default

Set the default version of PipelineEndpoint, throws an exception if the specified pipeline is not found.

set_default_version

Set the default version of PipelineEndpoint, throws an exception if the specified version is not found.

set_name

Set the name of PipelineEndpoint.

submit

Submit a pipeline experiment of given version; if version is none triggers default version of the pipeline.

add

Add the specified pipeline to PipelineEndpoint.

add(pipeline)

Parameters

pipeline
PublishedPipeline
Required

A published pipeline to add.

add_default

Add the specified pipeline to PipelineEndpoint and set default version to added pipeline version.

add_default(pipeline)

Parameters

pipeline
PublishedPipeline
Required

A published pipeline to add as the default version.

archive

Archive the PipelineEndpoint.

archive()

disable

Set the PipelineEndpoint to 'Disabled' and unavailable to run.

disable()

enable

Set the PipelineEndpoint to 'Active' and available to run.

enable()

get

Get the PipelineEndpoint by name or ID, throws exception if either is not provided.

static get(workspace, id=None, name=None, _workflow_provider=None, _service_endpoint=None)

Parameters

workspace
Workspace
Required

The workspace the PipelineEndpoint was created in.

id
str
default value: None

The ID of the PipelineEndpoint.

name
str
default value: None

The name of the PipelineEndpoint.

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The PipelineEndpoint object.

Return type

get_all

Get all active PipelineEndpoints in the current workspace.

Get all active PipelineEndpoints. NOTE: This method is being deprecated in favor of PipelineEndpoint.list().

static get_all(workspace, active_only=True, _workflow_provider=None, _service_endpoint=None)

Parameters

workspace
Workspace
Required

The workspace.

active_only
bool
default value: True

If true, only return PipelineEndpoints which are currently active.

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The list of PipelineEndpoint objects.

Return type

get_all_pipelines

Get list of pipelines in PipelineEndpoint.

NOTE: This method is being deprecated in favor of list_pipelines()

get_all_pipelines(active_only=True, _workflow_provider=None, _service_endpoint=None)

Parameters

active_only
bool
default value: True

Flag to return active only pipelines.

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The list of PublishedPipeline objects.

Return type

get_all_versions

Get list of pipelines and corresponding versions in PipelineEndpoint.

NOTE: This method is being deprecated in favor of list_versions()

get_all_versions(_workflow_provider=None, _service_endpoint=None)

Parameters

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The list of PipelineVersion objects.

Return type

get_default_version

Get the default version of PipelineEndpoint.

get_default_version()

Returns

The default version of the pipeline endpoint.

Return type

str

get_pipeline

Get the pipeline of a specified version or the default; throws an exception if the version is not found.

get_pipeline(version=None)

Parameters

version
str
default value: None

The version of the pipeline to return.

Returns

A published pipeline.

Return type

list

List active PipelineEndpoints in the current workspace.

static list(workspace, active_only=True, max_results=100, _workflow_provider=None, _service_endpoint=None)

Parameters

workspace
Workspace
Required

The workspace.

active_only
bool
default value: True

If true, only return PipelineEndpoints which are currently active.

max_results
int
default value: 100

max lines of returned PipelineEndpoints

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The list of PipelineEndpoint objects.

Return type

list_pipelines

Get a list of pipelines associated with the PipelineEndpoint.

list_pipelines(active_only=True, _workflow_provider=None, _service_endpoint=None)

Parameters

active_only
bool
default value: True

Indicates whether to return only active pipelines.

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The list of PublishedPipeline objects.

Return type

list_versions

Get a list of pipelines and corresponding versions of the PipelineEndpoint.

list_versions(_workflow_provider=None, _service_endpoint=None)

Parameters

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

_service_endpoint
str
default value: None

The service endpoint.

Returns

The list of PipelineVersion objects.

Return type

publish

Create a PipelineEndpoint with the specified name and pipeline/published pipeline.

The pipeline endpoint is a REST API that can be used from external applications. For information about how to authenticate when calling REST endpoints, see https://aka.ms/pl-restep-auth.

For more information about working with pipeline endpoints, see https://aka.ms/pl-first-pipeline.

Throws Exception if a PipelineEndpoint with the given name already exists.

static publish(workspace, name, description, pipeline, _workflow_provider=None, _service_endpoint=None)

Parameters

workspace
Workspace
Required

The workspace to create the PipelineEndpoint in.

name
str
Required

The name of the PipelineEndpoint.

description
str
Required

The description of the PipelineEndpoint.

pipeline
PublishedPipeline or Pipeline
Required

The published pipeline or pipeline.

_service_endpoint
str
default value: None

The service endpoint.

_workflow_provider
<xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
default value: None

The workflow provider.

Returns

A new PipelineEndpoint.

Return type

Exceptions

reactivate

Reactivate a PipelineEndpoint that was archived.

reactivate(name)

Parameters

name
str
Required

The name to set.

Returns

A PipelineEndpoint object.

Return type

set_default

Set the default version of PipelineEndpoint, throws an exception if the specified pipeline is not found.

set_default(pipeline)

Parameters

pipeline
PublishedPipeline
Required

The published pipeline to set as the default.

Exceptions

set_default_version

Set the default version of PipelineEndpoint, throws an exception if the specified version is not found.

set_default_version(version)

Parameters

version
str
Required

The version to set as the default version in PipelineEndpoint.

Exceptions

set_name

Set the name of PipelineEndpoint.

set_name(name)

Parameters

name
str
Required

The name to set.

submit

Submit a pipeline experiment of given version; if version is none triggers default version of the pipeline.

submit(experiment_name, pipeline_parameters=None, parent_run_id=None, pipeline_version=None)

Parameters

experiment_name
str
Required

The name of the experiment to submit the pipeline in.

pipeline_parameters
dict
default value: None

Parameters to use in pipeline execution, passed as a dictionary of {name: value}. See PipelineParameter for more details.

parent_run_id
str
default value: None

You can supply a run ID to set the parent run of this pipeline run, which is reflected in RunHistory. The parent run must belong to the same experiment as this pipeline is being submitted to.

pipeline_version
str
default value: None

The version of pipeline to run.

Returns

The submitted pipeline run.

Return type

Exceptions

Attributes

default_version

Get the default version of the PipelineEndpoint.

Returns

The default version.

Return type

str

description

Get the description of the PipelineEndpoint.

Returns

The description.

Return type

str

endpoint

Get the REST endpoint URL of the PipelineEndpoint.

The endpoint can be used to trigger runs of the pipeline.

Returns

REST endpoint for PipelineEndpoint to run pipeline.

Return type

str

id

Get the ID of the PipelineEndpoint.

Returns

The ID of the PipelineEndpoint.

Return type

str

name

Get the name of the PipelineEndpoint.

Returns

The name.

Return type

str

pipeline_version_list

Get the pipeline version list.

Returns

The list of PipelineIdVersion objects.

Return type

status

Get the status of the PipelineEndpoint.

Returns

The status.

Return type

str

swaggerurl

Get the REST Swagger URL of the PipelineEndpoint.

The Swagger url can be view schema of the pipeline endpoint.

Returns

REST Swagger for PipelineEndpoint to run pipeline.

Return type

str