Skip to content

Commit

Permalink
update array node model (#3156)
Browse files Browse the repository at this point in the history
* update array node model

Signed-off-by: Paul Dittamo <[email protected]>

* remove union_array_node_spec for now

Signed-off-by: Paul Dittamo <[email protected]>

* update param naming

Signed-off-by: Paul Dittamo <[email protected]>

* set lower bound for flyteidl to be 1.15.1

Signed-off-by: Paul Dittamo <[email protected]>

---------

Signed-off-by: Paul Dittamo <[email protected]>
  • Loading branch information
pvditt authored Feb 27, 2025
1 parent 43a940f commit a117bcd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions flytekit/core/array_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions flytekit/models/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ def __init__(
execution_mode=None,
is_original_sub_node_interface=False,
data_mode=None,
bound_inputs=None,
) -> None:
"""
TODO: docstring
Expand All @@ -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":
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions flytekit/tools/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a117bcd

Please sign in to comment.