RSVP for your your local TensorFlow Everywhere event today!

tfx.orchestration.experimental.core.pipeline_state.PipelineState

Class for dealing with pipeline state. Can be used as a context manager.

pipeline

Methods

commit

View source

Commits pipeline state to MLMD if there are any mutations.

initiate_node_start

View source

Updates pipeline state to signal that a node should be started.

initiate_node_stop

View source

Updates pipeline state to signal that a node should be stopped.

initiate_stop

View source

Updates pipeline state to signal stopping pipeline execution.

is_node_stop_initiated

View source

Returns True if stopping has been initiated for the given node.

is_stop_initiated

View source

Returns True if pipeline execution stopping has been initiated.

load

View source

Loads pipeline state from MLMD.

Args
mlmd_handle A handle to the MLMD db.
pipeline_uid Uid of the pipeline state to load.

Returns
A PipelineState object.

Raises
status_lib.StatusNotOkError With code=NOT_FOUND if no active pipeline with the given pipeline uid exists in MLMD. With code=INTERNAL if more than 1 active execution exists for given pipeline uid.

load_from_orchestrator_context

View source

Loads pipeline state for active pipeline under given orchestrator context.

Args
mlmd_handle A handle to the MLMD db.
context Pipeline context under which to find the pipeline execution.

Returns
A PipelineState object.

Raises
status_lib.StatusNotOkError With code=NOT_FOUND if no active pipeline exists for the given context in MLMD. With code=INTERNAL if more than 1 active execution exists for given pipeline uid.

new

View source

Creates a PipelineState object for a new pipeline.

No active pipeline with the same pipeline uid should exist for the call to be successful.

Args
mlmd_handle A handle to the MLMD db.
pipeline IR of the pipeline.

Returns
A PipelineState object.

Raises
status_lib.StatusNotOkError If a pipeline with same UID already exists.

remove_property

View source

Removes a custom property of the pipeline execution if exists.

save_property

View source

Saves a custom property to the pipeline execution.

__enter__

View source

__exit__

View source