When using dask to visualise a graph, the produced graph has 2 kinds of nodes. The square nodes and the circular nodes.
Generally speaking, square nodes seems to be actual values. While the circles are functions producing those values. However these seems to be some complexities here.
The square nodes are always suffixed with a number like #1
or #0
. I want to know why some square nodes are #0
and some square nodes are #1
. Sometimes a DelayedLeaf
gets visualised with #0
. But other times the output of a task is visualised as #1
. What are the rules governing this suffix?
@dask.delayed(nout=2)
def twothings():
return (3, 4)
twothings.visualize(filename='twothings.png')
# fst and snd are just Delayed (however they proceed via getitem call)
# twothings is DelayedLeaf
result = twothings()
(fst, snd) = result
fst.visualize(filename='fst.png')
snd.visualize(filename='snd.png')
dask.visualize(fst, snd, filename='output.png')
fst.png:
snd.png:
output.png:
Interestingly, this labelling has been removed in the most recent versions of Dask, partly because of confusion along the lines that you are describing. Also, we found that the boxes, showing intermediate results, were not informative. So, the very short answer to your question is "don't worry about it" :)