Leon Kozlowski

    Leon Kozlowski

    8 months ago
    If a task returns a tuple, does that count as 2 task runs?
    Kevin Kho

    Kevin Kho

    8 months ago
    No, just 1. But note you can’t map with a tuple output
    Leon Kozlowski

    Leon Kozlowski

    8 months ago
    Got it
    For example, would this only count as 4 task runs?
    The final task in that list is a parameter
    Kevin Kho

    Kevin Kho

    8 months ago
    Let me make sure. Will ask the team
    Seth Coussens

    Seth Coussens

    8 months ago
    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.
    Kevin Kho

    Kevin Kho

    8 months ago
    Confirmed with the team that the return value of a task doesn’t dictate its number of task runs
    Seth Coussens

    Seth Coussens

    8 months ago
    Hence, you have to use .map()