From a117bcd5819ec7ecc69e96da0e5c278682e294e7 Mon Sep 17 00:00:00 2001 From: Paul Dittamo <37558497+pvditt@users.noreply.github.com> Date: Thu, 27 Feb 2025 12:09:22 -0800 Subject: [PATCH] update array node model (#3156) * update array node model Signed-off-by: Paul Dittamo * remove union_array_node_spec for now Signed-off-by: Paul Dittamo * update param naming Signed-off-by: Paul Dittamo * set lower bound for flyteidl to be 1.15.1 Signed-off-by: Paul Dittamo --------- Signed-off-by: Paul Dittamo --- flytekit/core/array_node.py | 4 ++++ flytekit/models/core/workflow.py | 3 +++ flytekit/tools/translator.py | 1 + pyproject.toml | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/flytekit/core/array_node.py b/flytekit/core/array_node.py index 466058a791..476c1e0e6f 100644 --- a/flytekit/core/array_node.py +++ b/flytekit/core/array_node.py @@ -228,6 +228,10 @@ def execution_mode(self) -> _core_workflow.ArrayNode.ExecutionMode: def is_original_sub_node_interface(self) -> bool: return True + @property + def bound_inputs(self) -> Set[str]: + return set() + def __call__(self, *args, **kwargs): if not self._bindings: ctx = FlyteContext.current_context() diff --git a/flytekit/models/core/workflow.py b/flytekit/models/core/workflow.py index f9ed52e38e..cd4af0c467 100644 --- a/flytekit/models/core/workflow.py +++ b/flytekit/models/core/workflow.py @@ -395,6 +395,7 @@ def __init__( execution_mode=None, is_original_sub_node_interface=False, data_mode=None, + bound_inputs=None, ) -> None: """ TODO: docstring @@ -407,6 +408,7 @@ def __init__( self._execution_mode = execution_mode self._is_original_sub_node_interface = is_original_sub_node_interface self._data_mode = data_mode + self._bound_inputs = bound_inputs @property def node(self) -> "Node": @@ -421,6 +423,7 @@ def to_flyte_idl(self) -> _core_workflow.ArrayNode: execution_mode=self._execution_mode, is_original_sub_node_interface=BoolValue(value=self._is_original_sub_node_interface), data_mode=self._data_mode, + bound_inputs=self._bound_inputs, ) @classmethod diff --git a/flytekit/tools/translator.py b/flytekit/tools/translator.py index a295f75078..2670f8877c 100644 --- a/flytekit/tools/translator.py +++ b/flytekit/tools/translator.py @@ -621,6 +621,7 @@ def get_serializable_array_node( execution_mode=array_node.execution_mode, is_original_sub_node_interface=array_node.is_original_sub_node_interface, data_mode=array_node.data_mode, + bound_inputs=array_node.bound_inputs, ) diff --git a/pyproject.toml b/pyproject.toml index e451a0a0b3..1ca3ad783e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "diskcache>=5.2.1", "docker>=4.0.0", "docstring-parser>=0.9.0", - "flyteidl>=1.15.0", + "flyteidl>=1.15.1", "fsspec>=2023.3.0", "gcsfs>=2023.3.0", "googleapis-common-protos>=1.57",