dask 2021.10.0

ParametersReturnsBackRef
unpack_collections(expr)

Parameters

expr : object

The object to be normalized. This function knows how to handle dask collections, as well as most builtin python types.

Returns

task : normalized task to be run
collections : a tuple of collections

Normalize a python object and merge all sub-graphs.

Examples

This example is valid syntax, but we were not able to check execution
>>> import dask
... a = delayed(1, 'a')
... b = delayed(2, 'b')
... task, collections = unpack_collections([a, b, 3])
... task ['a', 'b', 3]
This example is valid syntax, but we were not able to check execution
>>> collections
(Delayed('a'), Delayed('b'))
This example is valid syntax, but we were not able to check execution
>>> task, collections = unpack_collections({a: 1, b: 2})
... task (<class 'dict'>, [['a', 1], ['b', 2]])
This example is valid syntax, but we were not able to check execution
>>> collections
(Delayed('a'), Delayed('b'))
See :

Back References

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

dask.delayed.unpack_collections

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/delayed.py#46
type: <class 'function'>
Commit: