Interface(inputs: Optional[Dict[str, Union[Type, Tuple[Type, Any]]]] = None, outputs: Optional[Dict[str, Type]] = None, output_tuple_name: Optional[str] = None)¶
A Python native interface object, like inspect.signature but simpler.
__init__(inputs: Optional[Dict[str, Union[Type, Tuple[Type, Any]]]] = None, outputs: Optional[Dict[str, Type]] = None, output_tuple_name: Optional[str] = None)¶
outputs – Output variables and their types as a dictionary
inputs – Map of input name to either a tuple where the first element is the python type, and the second value is the default, or just a single value which is the python type. The latter case is used by tasks for which perhaps a default value does not make sense. For consistency, we turn it into a tuple.
output_tuple_name – This is used to store the name of a typing.NamedTuple when the task or workflow returns one. This is also used as a proxy for better or for worse for the presence of a tuple return type, primarily used when handling one-element NamedTuples.
__init__([inputs, outputs, output_tuple_name])
- param outputs
Output variables and their types as a dictionary
This method is useful in removing some variables from the Flyte backend inputs specification, as these are implicit local only inputs or will be supplied by the library at runtime.
Use this to add additional inputs to the interface.
This method allows addition of extra outputs are expected from a task specification