Legacy channel interface.
Inherits From: BaseChannel
tfx.v1.dsl.Channel(
type: Type[Artifact],
additional_properties: Optional[Dict[str, Property]] = None,
additional_custom_properties: Optional[Dict[str, Property]] = None,
artifacts: Optional[Iterable[Artifact]] = None,
producer_component_id: Optional[str] = None,
output_key: Optional[str] = None
)
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.
Attributes | |
---|---|
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
as_optional() -> typing_extensions.Self
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
future() -> ChannelWrappedPlaceholder
get_data_dependent_node_ids
get_data_dependent_node_ids() -> Set[str]
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__
__eq__(
other
)
Return self==value.