If a task returns a tuple, does that count as 2 ta...
# ask-community
l
If a task returns a tuple, does that count as 2 task runs?
k
No, just 1. But note you can’t map with a tuple output
l
Got it
For example, would this only count as 4 task runs?
The final task in that list is a parameter
k
Let me make sure. Will ask the team
s
https://docs.prefect.io/api/latest/core/task.html?#task-2 A bit about this regarding the nout= parameter I think.
That one even states if you return multiple results it will error, but I think you are returning an actual tuple based on the above, so it should be considered one result.
k
Confirmed with the team that the return value of a task doesn’t dictate its number of task runs
s
Hence, you have to use .map()