tfx.v1.types.BaseChannel

An abstraction for component (BaseNode) artifact inputs.

BaseChannel is often interchangeably used with the term 'channel' (not capital Channel which points to the legacy class name).

Component takes artifact inputs distinguished by each "input key". For example:

trainer = Trainer(
    examples=example_gen.outputs['examples'])
    ^^^^^^^^
    input key
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             channel

Here "examples" is the input key of the Examples artifact type. example_gen.outputs['examples'] is a channel. Typically a single channel refers to a list of Artifact of a homogeneous type. Since channel is a declarative abstraction it is not strictly bound to the actual artifact, but is more of an input selector.

The most commonly used channel type is an OutputChannel (in the form of component.outputs["key"], which selects the artifact produced by the component in the same pipeline run (in synchronous execution mode; more information on OutputChannel docstring), and is typically a single artifact.

type The artifact type class that the Channel takes.
type_name Name of the artifact type class that Channel takes.

Methods

future

get_data_dependent_node_ids

Get data dependent nodes of this channel.

Currently only the OutputChannel directly imposes the data dependency, but other channels can also indirectly have a data dependency if they depend on the OutputChannel. Use this abstract method to define transitive data dependency.

Returns
A set of data-dependent node IDs.

__eq__

Return self==value.