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.objectPipelineEndpoint
Constructor
PipelineEndpoint(workspace, id, name, description, status, default_version, endpoint, pipeline_version_list, _pipeline_endpoint_provider=None, _published_pipeline_provider=None, _swaggerurl=None)
Parameters
- default_version
- str
The default version of pipeline in PipelineEndpoint, auto-increments, starts with "0".
- endpoint
- str
The REST endpoint URL for the PipelineEndpoint, which can be used to submit pipeline runs.
- _pipeline_endpoint_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaPublishedPipelineProvider>
The PipelineEndpoint provider.
- _pipeline_endpoint_provider
The PublishedPipeline provider.
- default_version
- str
The default version of pipeline in PipelineEndpoint, auto-increments, starts with "0"
- _pipeline_endpoint_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaPublishedPipelineProvider>
The PipelineEndpoint provider.
- _pipeline_endpoint_provider
The PublishedPipeline provider.
- swaggerendpoint
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
add_default
Add the specified pipeline to PipelineEndpoint and set default version to added pipeline version.
add_default(pipeline)
Parameters
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
- _workflow_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
The workflow provider.
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
- active_only
- bool
If true, only return PipelineEndpoints which are currently active.
- _workflow_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
The workflow provider.
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
- _workflow_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
The workflow provider.
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>
The workflow provider.
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
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
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
- active_only
- bool
If true, only return PipelineEndpoints which are currently active.
- _workflow_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
The workflow provider.
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
- _workflow_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
The workflow provider.
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>
The workflow provider.
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
- _workflow_provider
- <xref:azureml.pipeline.core._aeva_provider._AevaWorkflowProvider>
The workflow provider.
Returns
A new PipelineEndpoint.
Return type
Exceptions
reactivate
Reactivate a PipelineEndpoint that was archived.
reactivate(name)
Parameters
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
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
Exceptions
set_name
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
- pipeline_parameters
- dict
Parameters to use in pipeline execution, passed as a dictionary of {name: value}. See PipelineParameter for more details.
- parent_run_id
- str
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.
Returns
The submitted pipeline run.
Return type
Exceptions
Attributes
default_version
description
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
id
name
pipeline_version_list
status
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
Feedback
Submit and view feedback for