Hi team, Can we set timeouts only for a sub-workf...
# ask-the-community
v
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
Timeout for the entire workflow?
v
timeout for ground_truth_workflow .. 🙂
s
I don’t think it’s possible but there may be a workaround. Will let @Eduardo Apolinario (eapolinario) / @Yee confirm.
k
@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
ahh thats great, thank you so much guys! 🙏
k
@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
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
155 Views