Writes an execution-centric subgraph to MLMD.
tfx.orchestration.portable.mlmd.execution_lib.put_execution(
metadata_handler: tfx.orchestration.metadata.Metadata
,
execution: metadata_store_pb2.Execution,
contexts: Sequence[metadata_store_pb2.Context],
input_artifacts: Optional[MutableMapping[Text, Sequence[types.Artifact]]] = None,
output_artifacts: Optional[MutableMapping[Text, Sequence[types.Artifact]]] = None,
input_event_type: metadata_store_pb2.Event.Type = metadata_store_pb2.Event.INPUT,
output_event_type: metadata_store_pb2.Event.Type = metadata_store_pb2.Event.OUTPUT
) -> metadata_store_pb2.Execution
This function mainly leverages metadata.put_execution() method to write the
execution centric subgraph to MLMD.
Args |
metadata_handler
|
A handler to access MLMD.
|
execution
|
The execution to be written to MLMD.
|
contexts
|
MLMD contexts to associated with the execution.
|
input_artifacts
|
Input artifacts of the execution. Each artifact will be
linked with the execution through an event with type input_event_type.
Each artifact will also be linked with every context in the contexts
argument.
|
output_artifacts
|
Output artifacts of the execution. Each artifact will be
linked with the execution through an event with type output_event_type.
Each artifact will also be linked with every context in the contexts
argument.
|
input_event_type
|
The type of the input event, default to be INPUT.
|
output_event_type
|
The type of the output event, default to be OUTPUT.
|
Returns |
An MLMD execution that is written to MLMD, with id pupulated.
|