cuddly-jelly-27016
02/27/2025, 8:09 PM@task
def demo_task(strings: List[str], num: int) -> str:
return f"{num}".join(strings)
@workflow
def demo_wf(strings: List[str], nums: List[int]) -> None:
map_task(functools.partial(demo_task, strings=strings))(num=nums)
This example works only if the length of strings is equal to the length of nums. This limitation seems arbitrary to the user and should either not be supported at all or support lists of different sizes aswell. This feature request aims for the latter.
### Goal: What should the final outcome look like, ideally?
Given the example:
@task
def demo_task(strings: List[str], num: int) -> str:
return f"{num}".join(strings)
@workflow
def demo_wf(strings: List[str], nums: List[int]) -> None:
map_task(functools.partial(demo_task, strings=strings))(num=nums)
Input: ["a", "b", "c"], [1, 2]
Output: ["a1b1c", "a2b2c"]
### Describe alternatives you've considered
As an alternative, the old pattern of input/output preparation tasks can be used, which the partial task aimed to eliminate.
### Propose: Link/Inline OR Additional context
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
02/27/2025, 8:09 PMcuddly-jelly-27016
03/11/2025, 8:36 AMcuddly-jelly-27016
03/12/2025, 4:30 PM