Long-running tasks

ML tasks can be fairly time-consuming. Processing audio, video, and images can take minutes, sometimes even hours. While BaseTen already supported processing of up to 5 minutes per python node invocation, even that can be limiting.

We're happy to announce that long-running tasks are now a first-class citizen in BaseTen. Each python node invocation can take up to 4 hours, as long as you invoke the worklet in async mode.

Worklet run as background task

If your worklet has long-running tasks, i.e. tasks that take more than a few minutes, we highly recommend marking the worklet for background execution. Then, the worklet will always execute in async mode.

Alternatively, you can pass the async flag in the API request to execute any worklet in async mode:

curl -X POST https://app.baseten.co/applications/{YOUR_APP_ID}/worklets/{YOUR_WORKLET_ID}/invoke -H 'Authorization: Api-Key YOUR_API_KEY' -d '{ "worklet_input": WORKLET_INPUT , "async": true}'