get_task_stream(self, start=None, stop=None, count=None, plot=False, filename='task-stream.html', bokeh_resources=None)
This collects the data present in the diagnostic "Task Stream" plot on the dashboard. It includes the start, stop, transfer, and deserialization time of every task for a particular duration.
Note that the task stream diagnostic does not run by default. You may wish to call this function once before you start work to ensure that things start recording, and then again after you have completed.
When you want to start recording If a number it should be the result of calling time() If a string then it should be a time difference before now, like '60s' or '500 ms'
When you want to stop recording
The number of desired records, ignored if both start and stop are specified
If true then also return a Bokeh figure If plot == 'save' then save the figure to a file
The filename to save to if you set plot='save'
Specifies if the resource component is INLINE or CDN
Get task stream data from scheduler
get_task_stream
a context manager version of this method
>>> client.get_task_stream() # prime plugin if not already connected
... x.compute() # do some work
... client.get_task_stream() [{'task': ..., 'type': ..., 'thread': ..., ...}]
Pass the plot=True
or plot='save'
keywords to get back a Bokeh figure
>>> data, figure = client.get_task_stream(plot='save', filename='myfile.html')
Alternatively consider the context manager
This example is valid syntax, but we were not able to check execution>>> from dask.distributed import get_task_streamSee :
... with get_task_stream() as ts:
... x.compute()
... ts.data [...]
The following pages refer to to this document either explicitly or contain code examples using this.
distributed.client.Client.get_task_stream
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