Returns a map from key to an ordered list of artifacts for the given execution id.
tfx.orchestration.portable.mlmd.execution_lib.get_artifacts_dict(
metadata_handler: tfx.orchestration.metadata.Metadata
,
execution_id: int,
event_type: "metadata_store_pb2.Event.Type"
) -> Dict[Text, List[types.Artifact]]
The dict is constructed purely from information stored in MLMD for the
execution given by execution_id
. The "key" is the tag associated with the
InputSpec
or OutputSpec
in the pipeline IR.
Args |
metadata_handler
|
A handler to access MLMD.
|
execution_id
|
Id of the execution for which to get artifacts.
|
event_type
|
Event type to filter by.
|
Returns |
A dict mapping key to an ordered list of artifacts.
|
Raises |
ValueError
|
If the events are badly formed and correct ordering of
artifacts cannot be determined or if all the artifacts could not be
fetched from MLMD.
|