Menu

1 / 3

How do you run training longer than Modal's function timeout?

DEV Community: machinelearning·Viswaretas Kotra·19 days ago
#vJvYqkyn
Long article (2217 words) — no AI summary yet.
Reading 0:00
15s threshold

To train past Modal's 24-hour function timeout, make the run resumable: checkpoint to a Modal Volume, stop each call just before the limit, and spawn a fresh call that resumes. Nodus takes the other route: a Nodus Job's time limit is optional, and Nodus checkpoints and restores your state directory itself, so a 72-hour run is one Job instead of a chain of calls.

The chain works well on Modal once it is built. The rest of this post is the working pattern, the three ways it loses money, the cost of those losses on a 72-hour run, and when we would stop building it.

What exactly does Modal's timeout limit?

Every Modal Function execution has a default timeout of 300 seconds, and you can set anything from 1 second to 24 hours ( Modal timeouts guide ). The limit is per execution attempt. With modal.Retries , each retry gets a fresh timeout, and once retries run out the caller gets a modal.exception.FunctionTimeoutError .

Two other limits shape the design.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.