-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
What happened:
Calling dask.graph_manipulation.clone on the result of a dask.array.blockwise operation with a (iterable) literal argument results in a ValueError.
What you expected to happen:
The dask.graph_manipulation.clone operation to succeed.
Minimal Complete Verifiable Example:
import dask.array as da
from dask.graph_manipulation import clone
if __name__ == "__main__":
x = da.ones(10)
y = (1,)
z = da.blockwise(lambda x, y: x + y[0], "r",
x, "r",
y, None)
clone(z)Anything else we need to know?:
The above produces:
TypeError: unhashable type: 'list'
I have traced the problem to:
Lines 812 to 817 in 1ccd1a4
| numblocks = {} | |
| for k, nbv in self.numblocks.items(): | |
| if k in names: | |
| is_leaf = False | |
| k = clone_key(k, seed) | |
| numblocks[k] = nbv |
In the above, the conditional if k in names causes the ValueError when k is not hashable.
Environment:
- Dask version: 2022.4.1
- Python version: 3.8.10
- Operating System: Ubuntu 20.04
- Install method (conda, pip, source): pip
Reactions are currently unavailable