recreate_error_locally(self, future)
This operation should be performed after a future (result of gather
, compute
, etc) comes back with a status of "error", if the stack- trace is not informative enough to diagnose the problem. The specific task (part of the graph pointing to the future) responsible for the error will be fetched from the scheduler, together with the values of its inputs. The function will then be executed, so that pdb
can be used for debugging.
The same thing as was given to gather
, but came back with an exception/stack-trace. Can also be a (persisted) dask collection containing any errored futures.
For a failed calculation, perform the blamed task locally for debugging.
>>> future = c.submit(div, 1, 0) # doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... future.status # doctest: +SKIP 'error'
>>> c.recreate_error_locally(future) # doctest: +SKIP ZeroDivisionError: division by zero
If you're in IPython you might take this opportunity to use pdb
This example does not not appear to be valid Python Syntax>>> %pdb # doctest: +SKIP Automatic pdb calling has been turned ONThis example is valid syntax, but we were not able to check execution
>>> c.recreate_error_locally(future) # doctest: +SKIP ZeroDivisionError: division by zero 1 def div(x, y): ----> 2 return x / y ipdb>See :
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