cuddly-jelly-27016
05/27/2025, 12:09 AM@task
def mult_sum(my_val: int, my_list: list[int]) -> int:
return sum(my_val * v for v in my_list)
@workflow
def wf() -> list[int]:
my_list = [1, 2, 3]
my_vals = [1, 2]
partial_task = functools.partial(mult_sum, my_list=my_list)
return map_task(partial_task)(my_val=my_vals)
ValueError: Cannot use a partial task with lists as inputs
However if my_list is a default workflow argument like so:
@workflow
def wf(my_list: list[int] = [1, 2, 3]) -> list[int]:
my_vals = [1, 2]
partial_task = functools.partial(mult_sum, my_list=my_list)
return map_task(partial_task)(my_val=my_vals)
No error is shown - in fact it works correctly when you run locally.
When you run remotely you get a somewhat ambiguous error without a traceback"
input arrays have different lengths: expecting '3' found '2'
### Expected behavior
Ideally it would be nice to support partial task with lists as inputs, but if not, it would be great to have a similar compile time/local runtime error ValueError saying that Cannot use a partial task with lists as inputs.
### Additional context to reproduce
No response
### Screenshots
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
05/27/2025, 12:09 AM