Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix map_task sensitive to argument order #1888

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions flytekit/core/map_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,15 @@ def _raw_execute(self, **kwargs) -> Any:
outputs_expected = False
outputs = []

any_input_key = (
list(self._run_task.interface.inputs.keys())[0]
if self._run_task.interface.inputs.items() is not None
else None
)
mapped_input_value_len = 0
if self._run_task.interface.inputs.items():
for k in self._run_task.interface.inputs.keys():
v = kwargs[k]
if isinstance(v, list) and k not in self.bound_inputs:
mapped_input_value_len = len(v)
break

for i in range(len(kwargs[any_input_key])):
for i in range(mapped_input_value_len):
single_instance_inputs = {}
for k in self.interface.inputs.keys():
v = kwargs[k]
Expand Down