Marks an existing execution as success.
tfx.orchestration.portable.execution_publish_utils.publish_succeeded_execution(
metadata_handler: tfx.orchestration.metadata.Metadata
,
execution_id: int,
contexts: Sequence[metadata_store_pb2.Context],
output_artifacts: Optional[MutableMapping[str, Sequence[types.Artifact]]] = None,
executor_output: Optional[execution_result_pb2.ExecutorOutput] = None
) -> Optional[MutableMapping[str, List[types.Artifact]]]
Also publishes the output artifacts produced by the execution. This method
will also merge the executor produced info into system generated output
artifacts. The last_know_state
of the execution will be changed to
COMPLETE
and the output artifacts will be marked as LIVE
.
Args |
metadata_handler
|
A handler to access MLMD.
|
execution_id
|
The id of the execution to mark successful.
|
contexts
|
MLMD contexts to associated with the execution.
|
output_artifacts
|
Output artifacts skeleton of the execution, generated by
the system. Each artifact will be linked with the execution through an
event with type OUTPUT.
|
executor_output
|
Executor outputs. executor_output.output_artifacts will
be used to update system-generated output artifacts passed in through
output_artifacts arg. There are three contraints to the update: 1. The
keys in executor_output.output_artifacts are expected to be a subset
of the system-generated output artifacts dict. 2. An update to a certain
key should contains all the artifacts under that key. 3. An update to an
artifact should not change the type of the artifact.
|
Returns |
The maybe updated output_artifacts, note that only outputs whose key are in
executor_output will be updated and others will be untouched. That said,
it can be partially updated.
|
Raises |
RuntimeError
|
if the executor output to a output channel is partial.
|