tfx.v1.dsl.Channel

Legacy channel interface.

Inherits From: BaseChannel

Used in the notebooks

Used in the tutorials

Channel used to represent the BaseChannel concept in the early TFX code, but due to having too much features in the same class, we refactored it to multiple classes:

  • BaseChannel for the general input abstraction
  • OutputChannel for component.outputs['key'].
  • MLMDQueryChannel for simple filter-based input resolution.

Please do not use this class directly, but instead use the alternatives. This class won't be removed in TFX 1.x due to backward compatibility guarantee though.

type Subclass of Artifact that represents the type of this Channel.
additional_properties (Optional) A mapping of properties which will be added to artifacts when this channel is used as an output of components. This is experimental and is subject to change in the future.
additional_custom_properties (Optional) A mapping of custom_properties which will be added to artifacts when this channel is used as an output of components. This is experimental and is subject to change in the future.
artifacts Deprecated and ignored, kept only for backward compatibility.
producer_component_id (Optional) Producer component id of the Channel. This argument is internal/experimental and is subject to change in the future.
output_key (Optional) The output key when producer component produces the artifacts in this Channel. This argument is internal/experimental and is subject to change in the future.

is_optional If this is an "optional" channel. Changes Pipeline runtime behavior.
type

type_name Name of the artifact type class that Channel takes.

Methods

as_optional

Creates an optional version of self.

By default component input channels are considered required, meaning if the channel does not contain at least 1 artifact, the component will be skipped. Making channel optional disables this requirement and allows componenst to be executed with no artifacts from this channel.

Returns
A copy of self which is optional.

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.