flytekit.models.interface
Directory
Classes
Class | Description |
---|---|
Parameter |
|
ParameterMap |
|
TypedInterface |
|
Variable |
|
VariableMap |
flytekit.models.interface.Parameter
class 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
Method | Description |
---|---|
from_flyte_idl() |
. |
serialize_to_string() |
|
short_string() |
:rtype: Text. |
to_flyte_idl() |
:rtype: flyteidl. |
verbose_string() |
:rtype: Text. |
from_flyte_idl()
def from_flyte_idl(
pb2_object,
) -> e: Parameter
Parameter | Type |
---|---|
pb2_object |
serialize_to_string()
def serialize_to_string()
short_string()
def short_string()
:rtype: Text
to_flyte_idl()
def to_flyte_idl()
:rtype: flyteidl.core.interface_pb2.Parameter
verbose_string()
def verbose_string()
:rtype: Text
Properties
Property | Type | Description |
---|---|---|
artifact_id |
||
artifact_query |
||
behavior |
:rtype: T |
|
default |
This is the default literal value that will be applied for this parameter if not user specified. :rtype: flytekit.models.literals.Literal |
|
is_empty |
||
required |
If True, this parameter must be specified. There cannot be a default value. :rtype: bool |
|
var |
The variable definition for this input parameter. :rtype: Variable |
flytekit.models.interface.ParameterMap
class ParameterMap(
parameters,
)
A map of Parameters
Parameter | Type |
---|---|
parameters |
Methods
Method | Description |
---|---|
from_flyte_idl() |
. |
serialize_to_string() |
|
short_string() |
:rtype: Text. |
to_flyte_idl() |
:rtype: flyteidl. |
verbose_string() |
:rtype: Text. |
from_flyte_idl()
def from_flyte_idl(
pb2_object,
) -> e: ParameterMap
Parameter | Type |
---|---|
pb2_object |
serialize_to_string()
def serialize_to_string()
short_string()
def short_string()
:rtype: Text
to_flyte_idl()
def to_flyte_idl()
:rtype: flyteidl.core.interface_pb2.ParameterMap
verbose_string()
def verbose_string()
:rtype: Text
Properties
Property | Type | Description |
---|---|---|
is_empty |
||
parameters |
:rtype: dict[Text, Parameter] |
flytekit.models.interface.TypedInterface
class 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
Method | Description |
---|---|
from_flyte_idl() |
. |
serialize_to_string() |
|
short_string() |
:rtype: Text. |
to_flyte_idl() |
|
transform_interface_to_list() |
Takes a single task interface and interpolates it to an array interface - to allow performing distributed. |
verbose_string() |
:rtype: Text. |
from_flyte_idl()
def from_flyte_idl(
proto: flyteidl.core.interface_pb2.TypedInterface,
) -> TypedInterface
Parameter | Type |
---|---|
proto |
flyteidl.core.interface_pb2.TypedInterface |
serialize_to_string()
def serialize_to_string()
short_string()
def short_string()
:rtype: Text
to_flyte_idl()
def to_flyte_idl()
transform_interface_to_list()
def transform_interface_to_list(
bound_inputs: typing.Set[str],
excluded_inputs: typing.Set[str],
) -> TypedInterface
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()
def verbose_string()
:rtype: Text
Properties
Property | Type | Description |
---|---|---|
inputs |
||
is_empty |
||
outputs |
flytekit.models.interface.Variable
class 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
Method | Description |
---|---|
from_flyte_idl() |
. |
serialize_to_string() |
|
short_string() |
:rtype: Text. |
to_flyte_idl() |
:rtype: flyteidl. |
to_flyte_idl_list() |
:rtype: flyteidl. |
verbose_string() |
:rtype: Text. |
from_flyte_idl()
def from_flyte_idl(
variable_proto,
) -> flyteidl.core.interface_pb2.Variable
Parameter | Type |
---|---|
variable_proto |
serialize_to_string()
def serialize_to_string()
short_string()
def short_string()
:rtype: Text
to_flyte_idl()
def to_flyte_idl()
:rtype: flyteidl.core.interface_pb2.Variable
to_flyte_idl_list()
def to_flyte_idl_list()
:rtype: flyteidl.core.interface_pb2.Variable
verbose_string()
def verbose_string()
:rtype: Text
Properties
Property | Type | Description |
---|---|---|
artifact_partial_id |
||
artifact_tag |
||
description |
This is a help string that can provide context for what this variable means in relation to a task or workflow. :rtype: Text |
|
is_empty |
||
type |
This describes the type of value that must be provided to satisfy this variable. :rtype: flytekit.models.types.LiteralType |
flytekit.models.interface.VariableMap
class VariableMap(
variables,
)
A map of Variables
Parameter | Type |
---|---|
variables |
Methods
Method | Description |
---|---|
from_flyte_idl() |
. |
serialize_to_string() |
|
short_string() |
:rtype: Text. |
to_flyte_idl() |
:rtype: dict[Text, Variable]. |
verbose_string() |
:rtype: Text. |
from_flyte_idl()
def from_flyte_idl(
pb2_object,
) -> e: VariableMap
Parameter | Type |
---|---|
pb2_object |
serialize_to_string()
def serialize_to_string()
short_string()
def short_string()
:rtype: Text
to_flyte_idl()
def to_flyte_idl()
:rtype: dict[Text, Variable]
verbose_string()
def verbose_string()
:rtype: Text
Properties
Property | Type | Description |
---|---|---|
is_empty |
||
variables |
:rtype: dict[Text, Variable] |