ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tfx.v1.dsl.Resolver

Definition for TFX Resolver.

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=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'],
    ...)

strategy_class Optional ResolverStrategy which contains the artifact resolution logic. One of strategy_class or function argument should be set.
config Optional dict of key to Jsonable type for constructing resolver_strategy.
function Optional ResolverFunction which contains the artifact resolution logic. User should not use this parameter directly but use @resolver_stem decorated function instead. One of strategy_class or function argument should be set.
**channels Input channels to the Resolver node as keyword arguments.

outputs Output Channel dict that contains resolved artifacts.