Dask logo

Understanding the Task Graph

Everything operation in Dask whether it's dataframe or array or delayed, creates some tasks. Each task knows its dependencies so Dask can create a graph of all the tasks and which depend on which. Put another way: a task graph is a DAG (Directed Acyclyic Graph). Read all about task graphs and high level graphs.

arr is itself a graph, and doing computations on arr produces another graph.

For small enough graphs, we can get a visual representation of the graph. Each layer in the drawing of the task graph (below) corresponds to a layer in the high level graph (above).

Once the graph is constructed it goes through optimization, scheduling, and execution.