flytekit.models.interface
flytekit.models.interface
Directory
Classes
flytekit.models.interface.Parameter
def Parameter (
var,
default,
required,
artifact_query: typing. Optional[flyteidl. core. artifact_id_pb2. ArtifactQuery],
artifact_id: typing. Optional[flyteidl. core. artifact_id_pb2. ArtifactID],
):
Declares an input parameter. A parameter is used as input to a launch plan and has
the special ability to have a default value or mark itself as required.
Parameter
Type
var
default
required
artifact_query
typing.Optional[flyteidl.core.artifact_id_pb2.ArtifactQuery]
artifact_id
typing.Optional[flyteidl.core.artifact_id_pb2.ArtifactID]
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object,
):
Parameter
Type
pb2_object
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
artifact_id
artifact_query
behavior
default
is_empty
required
var
flytekit.models.interface.ParameterMap
def ParameterMap (
parameters,
):
A map of Parameters
Parameter
Type
parameters
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object,
):
Parameter
Type
pb2_object
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty
parameters
flytekit.models.interface.TypedInterface
def TypedInterface (
inputs,
outputs,
):
Please note that this model is slightly incorrect, but is more user-friendly. The underlying inputs and
outputs are represented directly as Python dicts, rather than going through the additional VariableMap layer.
Parameter
Type
inputs
outputs
Methods
from_flyte_idl()
def from_flyte_idl (
proto: flyteidl. core. interface_pb2. TypedInterface,
):
Parameter
Type
proto
flyteidl.core.interface_pb2.TypedInterface
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
def transform_interface_to_list (
bound_inputs: typing. Set[str],
excluded_inputs: typing. Set[str],
):
Takes a single task interface and interpolates it to an array interface - to allow performing distributed
python map like functions
Parameter
Type
bound_inputs
typing.Set[str]
excluded_inputs
typing.Set[str]
verbose_string()
Properties
Property
Type
Description
inputs
is_empty
outputs
flytekit.models.interface.Variable
def Variable (
type,
description,
artifact_partial_id: typing. Optional[flyteidl. core. artifact_id_pb2. ArtifactID],
artifact_tag: typing. Optional[flyteidl. core. artifact_id_pb2. ArtifactTag],
):
Parameter
Type
type
description
artifact_partial_id
typing.Optional[flyteidl.core.artifact_id_pb2.ArtifactID]
artifact_tag
typing.Optional[flyteidl.core.artifact_id_pb2.ArtifactTag]
Methods
from_flyte_idl()
def from_flyte_idl (
variable_proto,
):
Parameter
Type
variable_proto
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
to_flyte_idl_list()
verbose_string()
Properties
Property
Type
Description
artifact_partial_id
artifact_tag
description
is_empty
type
flytekit.models.interface.VariableMap
def VariableMap (
variables,
):
A map of Variables
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object,
):
Parameter
Type
pb2_object
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty
variables