Resolver that return the latest n artifacts in a given channel.
Inherits From: BaseResolver
tfx.dsl.experimental.latest_artifacts_resolver.LatestArtifactsResolver(
desired_num_of_artifacts: Optional[int] = 1
)
Note that this Resolver is experimental and is subject to change in terms of
both interface and implementation.
Methods
resolve
View source
resolve(
pipeline_info: tfx.orchestration.data_types.PipelineInfo
,
metadata_handler: tfx.orchestration.metadata.Metadata
,
source_channels: Dict[Text, tfx.types.Channel
]
) -> tfx.dsl.resolvers.base_resolver.ResolveResult
Resolves artifacts from channels by querying MLMD.
Args |
pipeline_info
|
PipelineInfo of the current pipeline. We do not want to
query artifacts across pipeline boundary.
|
metadata_handler
|
a read-only handler to query MLMD.
|
source_channels
|
a key -> channel dict which contains the info of the
source channels.
|
Returns |
a ResolveResult instance.
|
Raises |
DeprecationWarning
|
when it is called.
|
resolve_artifacts
View source
resolve_artifacts(
metadata_handler: tfx.orchestration.metadata.Metadata
,
input_dict: Dict[Text, List[types.Artifact]]
) -> Optional[Dict[Text, List[types.Artifact]]]
Resolves artifacts from channels by querying MLMD.
Args |
metadata_handler
|
A metadata handler to access MLMD store.
|
input_dict
|
The input_dict to resolve from.
|
Returns |
If min_count for every input is met, returns a
Dict[Text, List[Artifact]]. Otherwise, return None.
|