Definition for TFX Resolver.
Inherits From: BaseNode
tfx.v1.dsl.Resolver(
strategy_class: Optional[Type[ResolverStrategy]] = None,
config: Optional[Dict[str, json_utils.JsonableType]] = None,
**channels
)
Used in the notebooks
Used in the tutorials |
---|
Resolver is a special TFX node which handles special artifact resolution logics that will be used as inputs for downstream nodes.
To use Resolver, pass the followings to the Resolver constructor:
- Name of the Resolver instance
- A subclass of ResolverStrategy
- Configs that will be used to construct an instance of ResolverStrategy
- Channels to resolve with their tag, in the form of kwargs
Here is an example:
example_gen = ImportExampleGen(...)
examples_resolver = Resolver(
strategy_class=tfx.dsl.experimental.SpanRangeStrategy,
config={'range_config': range_config},
examples=Channel(type=Examples, producer_component_id=example_gen.id)
).with_id('Resolver.span_resolver')
trainer = Trainer(
examples=examples_resolver.outputs['examples'],
...)
You can find experimental ResolverStrategy
classes under
tfx.v1.dsl.experimental
module, including LatestArtifactStrategy
,
LatestBlessedModelStrategy
, SpanRangeStrategy
, etc.
Attributes | |
---|---|
outputs
|
Output Channel dict that contains resolved artifacts. |
Methods
with_node_execution_options
with_node_execution_options(
node_execution_options: utils.NodeExecutionOptions
) -> typing_extensions.Self