Class get_task_stream
Collect task stream within a context block
Declaration
class get_task_stream
source linkDocumentation
This provides diagnostic information about every task that was run during
the time when this block was active.
This must be used as a context manager.
Attributes
Examples
>>> with get_task_stream() as ts:
... x.compute()
>>> ts.data
[...]
Get back a Bokeh figure and optionally save to a file
>>> with get_task_stream(plot='save', filename='task-stream.html') as ts:
... x.compute()
>>> ts.figure
<Bokeh Figure>
To share this file with others you may wish to upload and serve it online.
A common way to do this is to upload the file as a gist, and then serve it
on https://raw.githack.com ::
$ python -m pip install gist
$ gist task-stream.html
https://gist.github.com/8a5b3c74b10b413f612bb5e250856ceb
You can then navigate to that site, click the "Raw" button to the right of
the ``task-stream.html`` file, and then provide that URL to
https://raw.githack.com . This process should provide a sharable link that
others can use to see your task stream plot.
See also
Client.get_task_stream: Function version of this context manager
Methods
▷ def __exit__(self, typ, value, traceback) ▷ def __init__(self, client=None, plot=False, filename="task-stream.html")
Reexports