dask 2021.10.0

BackRef
order(dsk, dependencies=None)

This produces an ordering over our tasks that we use to break ties when executing. We do this ahead of time to reduce a bit of stress on the scheduler and also to assist in static analysis.

This currently traverses the graph as a single-threaded scheduler would traverse it. It breaks ties in the following ways:

  1. Begin at a leaf node that is a dependency of a root node that has the largest subgraph (start hard things first)

  2. Prefer tall branches with few dependents (start hard things first and try to avoid memory usage)

  3. Prefer dependents that are dependencies of root nodes that have the smallest subgraph (do small goals that can terminate quickly)

Order nodes in dask graph

Examples

This example is valid syntax, but we were not able to check execution
>>> dsk = {'a': 1, 'b': 2, 'c': (inc, 'a'), 'd': (add, 'b', 'c')}
... order(dsk) {'a': 0, 'c': 1, 'b': 2, 'd': 3}
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.order.order

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/order.py#85
type: <class 'function'>
Commit: