Tensorlake Workflows let you compose functions into a Graph and execute them in parallel or serially. Below are the most common questions about how Workflows work.Documentation Index
Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
Use this file to discover all available pages before exploring further.
What is durable execution?
Durable execution is a runtime model where the outputs of each step in a long-running program are checkpointed, so a crash, timeout, or retry can resume from the last completed step instead of restarting from scratch. It’s the foundation behind systems like Temporal, Inngest, and Restate, and is commonly used for AI agents, long-running data pipelines, multi-step orchestration, and workflows that span minutes, hours, or days. Tensorlake Workflows implement durable execution natively in Python: function outputs are checkpointed to object storage, and on failure the scheduler replays the call graph and skips already-completed steps. See Durable Execution for the full model.What are Tensorlake Workflows?
Tensorlake Workflows are a way to automate and orchestrate complex tasks. You define a series of functions that execute in parallel or sequentially, and Tensorlake handles distribution, persistence, and recovery.What is a Graph in a Tensorlake Workflow?
A Graph connects multiple functions together into a workflow. It contains:- Node — a function that operates on data.
- Start Node — the first function executed when the graph is invoked.
- Edges — represent data flow between functions.
- Conditional Edge — evaluates input data from the previous function and decides which edges to take. Like an if-else statement.
Graphs are workflows whose functions can be executed in parallel, while
Pipelines are linear workflows that execute functions serially.
How do I define a function in a Tensorlake Workflow?
Functions are regular Python functions decorated with@tensorlake_function().
A function executes in a distributed manner and its output is stored, so if downstream functions fail they can resume from that output. The decorator accepts parameters to configure retry behavior, placement constraints, and more.
How do I run a sequential pipeline in Tensorlake?
Chain nodes withadd_edge so each function transforms the output of the previous one until reaching the end node.
How do I run workflow steps in parallel in Tensorlake?
Add multiple edges from one start node to different downstream functions. Each branch produces an output for the same input in parallel.How do I parallelize a function across many items (map) in Tensorlake?
When an upstream function returns a sequence and the downstream function accepts a single element of that sequence, Tensorlake automatically parallelizes the downstream function — one invocation per element — across machines and worker processes.How do I aggregate results across many items (reduce) in Tensorlake?
Reduce functions aggregate outputs from one or more functions that return sequences. They have two key properties:- Lazy evaluation — reduce functions are invoked incrementally as elements become available, so they stream over large datasets efficiently.
- Stateful aggregation — the aggregated value persists between invocations. Each call receives the current accumulated state along with the new element to process.
How do I conditionally route data between functions in Tensorlake?
Use@tensorlake_router on a function that returns the list of downstream functions to invoke based on custom logic. The router decides at runtime which branch(es) to take.
How do Tensorlake Workflows compare to durable-execution systems like Temporal or Inngest?
Tensorlake Workflows are a durable-execution runtime in the same category as Temporal, Inngest, and Restate: function outputs are checkpointed, and on failure the scheduler replays the call graph from the last completed checkpoint instead of re-running everything from scratch. The differences are surface and integration:- Authored as plain Python. Functions are decorated with
@tensorlake_function— no separate worker SDK or activity/workflow split. - One runtime for code and isolation. Workflows run on the same platform as Tensorlake Sandboxes, so the durable functions and the isolated environments they call into are managed by one scheduler.
- Output storage built in. Function outputs are persisted to object storage by default, so you can pass large files between steps without external workarounds.