Skip to content

How to access a wrapped function from a Delayed object? #7174

Answered by jrbourbeau
andersy005 asked this question in Q&A
Discussion options

You must be logged in to vote

You should be able to inspect the task graph for the delayed object to get the wrapped function. Something along the lines of

In [1]: import dask

In [2]: def mul(a, b):
   ...:     return a * b
   ...:

In [3]: delayed_mul = dask.delayed(mul)

In [4]: delayed_mul.dask[delayed_mul.key]
Out[4]: <function __main__.mul(a, b)>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@andersy005
Comment options

Answer selected by andersy005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants