https://flyte.org logo
#ask-the-community
Title
# ask-the-community
v

varsha Parthasarathy

12/26/2022, 4:47 PM
Hi team, Can we set timeouts only for a sub-workflow which is defined under dynamic task?
Copy code
ground_truth_workflow = flytekit.LaunchPlan.get_or_create(
    name="ground_truth_workflow",
    workflow=GroundTruthOfflinePCPWorkFlow,
)
Dynamic tasks calls a launch plan.
Copy code
@flytekit.dynamic
def run:
     # Figures out number of iterations
     ground_truth_workflow(..)
for each iteration of “run” - is it possible to safely set a timeout ?
k

Ketan (kumare3)

12/26/2022, 5:18 PM
Timeout for the entire workflow?
v

varsha Parthasarathy

12/26/2022, 5:40 PM
timeout for ground_truth_workflow .. 🙂
s

Samhita Alla

12/27/2022, 4:09 AM
I don’t think it’s possible but there may be a workaround. Will let @Eduardo Apolinario (eapolinario) / @Yee confirm.
k

Ketan (kumare3)

12/27/2022, 5:18 AM
@varsha Parthasarathy / @Samhita Alla it’s possible in the backend just not exposed today. Can we a good feature request
I guess I would call It deadline instead of timeout
v

varsha Parthasarathy

12/27/2022, 6:31 PM
ahh thats great, thank you so much guys! 🙏
k

Ketan (kumare3)

12/27/2022, 6:59 PM
@varsha Parthasarathy actually i am wrong
you can put timeout on the node, i.e. subworkflows
you just have to do it at the node-level when you are using it in the workflow
v

varsha Parthasarathy

12/27/2022, 7:00 PM
that’s still okay, .. I expect the sub-workflows to finish by ~2 hours. if they take more than that, its a problem with one of my tasks not finishing up and stuck somewhere
4 Views