tfx.components.ResolverNode

View source on GitHub

Class ResolverNode

Definition for TFX ResolverNode.

Inherits From: BaseNode

Aliases: tfx.components.common_nodes.resolver_node.ResolverNode

ResolverNode is a special TFX node which handles special artifact resolution logics that will be used as inputs for downstream nodes.

To use ResolverNode, pass the followings to the ResolverNode constructor: a. name of the ResolverNode instance g. a subclass of BaseResolver c. the configs that will be used to construct an instance of (a) d. channels to resolve with their tag, in the form of kwargs Here is an example:

... example_gen = ImportExampleGen(...) latest_five_examples_resolver = ResolverNode( instance_name='latest_five_examples_resolver', resolver_class=latest_artifacts_resolver.LatestArtifactsResolver, resolver_config={'desired_num_of_artifacts' : 5}, examples=example_gen.outputs['examples']) trainer = MyTrainer( examples=latest_model_resolver.outputs['examples'], user_module=...) ...

Attributes:

  • _resolver_class: the class of the resolver.
  • _resolver_configs: the configs that will be used to construct an instance of _resolver_class.

__init__

View source

__init__(
    instance_name,
    resolver_class,
    resolver_configs=None,
    **kwargs
)

Init function for ResolverNode.

Args:

  • instance_name: the name of the ResolverNode instance.
  • resolver_class: the URI to the resource that needs to be registered.
  • resolver_configs: a dict of key to JsonableType representing configs that will be used to construct the resolver.
  • **kwargs: a key -> Channel dict, describing what are the Channels to be resolved. This is set by user through keyword args.

Child Classes

class DRIVER_CLASS

Properties

component_id

DEPRECATED FUNCTION

component_type

DEPRECATED FUNCTION

downstream_nodes

exec_properties

id

Node id, unique across all TFX nodes in a pipeline.

If instance name is available, node_id will be: . otherwise, node_id will be:

Returns:

node id.

inputs

outputs

type

upstream_nodes

Methods

add_downstream_node

View source

add_downstream_node(downstream_node)

add_upstream_node

View source

add_upstream_node(upstream_node)

from_json_dict

View source

from_json_dict(
    cls,
    dict_data
)

Convert from dictionary data to an object.

to_json_dict

View source

to_json_dict()

Convert from an object to a JSON serializable dictionary.

Class Members

  • EXECUTOR_SPEC