flyte icon indicating copy to clipboard operation
flyte copied to clipboard

Implement deadline (timeout)

Open kumare3 opened this issue 1 month ago • 2 comments

The union engine supports deadline, implement it in Flyte v2 oss https://www.union.ai/docs/v2/union/user-guide/tasks/task-configuration/retries-and-timeouts/#deadline-bound-the-total-wall-clock

kumare3 avatar Oct 07 '26 23:10 kumare3

Flyte v2 OSS already supports the deadline timeout via the flyte.Timeout object. You can set the deadline parameter in the @env.task decorator to bound the total wall-clock time across all attempts; once the deadline fires, no further retries are made and the task is terminated as Timed out. This matches the Union engine's behavior as described in the linked documentation. See example:

from datetime import timedelta
import flyte

env = flyte.TaskEnvironment(name="example")
@env.task(timeout=flyte.Timeout(deadline=timedelta(hours=2)))
async def my_task():
    ...

According to Union.ai Docs: deadline, this is fully supported in Flyte v2 OSS.

Would you like more detail on how deadline interacts with retries or error handling?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @herald to ask follow-up questions. See runllm.com for more!

runllm avatar Oct 07 '26 23:10 runllm

Reopening: OSS doesn't implement deadline's documented meaning yet.

AdilFayyaz avatar Oct 27 '26 22:10 AdilFayyaz