Hi, I am trying to do task level parallelism by mapping. I was wondering how to set it up so each task is independent say that one of task’s failure would not affect other tasks being paralleled. Thanks in advance!
k
Kathryn Klarich
06/22/2021, 2:07 PM
Hi Estelle, are you talking about tasks downstream of your mapped task? If so, you can change the trigger rule so that they will run regardless of whether the mapped tasks upstream fail https://docs.prefect.io/api/latest/triggers.html#functions
👍 1
e
Estelle Yao
06/22/2021, 2:10 PM
Not exactly. I am referring to all tasks at the same level (let’s say that there is no downstreem tasks for now).
k
Kevin Kho
06/22/2021, 2:23 PM
What executor are you using? Local or Dask?
e
Estelle Yao
06/22/2021, 2:23 PM
Dask cluster
k
Kevin Kho
06/22/2021, 2:25 PM
It should be independently executed and continue even if one of them fails. Are you seeing your entire flow just stop?
e
Estelle Yao
06/22/2021, 2:29 PM
I see, the flow run indicated as failure even if only one task failed. Thanks
k
Kathryn Klarich
06/24/2021, 1:59 PM
i think this is the intended behavior. if you want to change it after the task runs complete you may be able to make a task that changes the state of the previous task or something like that. I'm not sure why you would want the parent to show up as succeeded if one if its mapped tasks failed though