`No dispatch for <class 'numpy.ndarray'>`
See original GitHub issueThis deserialization error then caused https://github.com/dask/distributed/issues/7060:
2022-09-23 19:01:53,760 - distributed.protocol.core - CRITICAL - Failed to deserialize
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/core.py", line 158, in loads
return msgpack.loads(
File "msgpack/_unpacker.pyx", line 194, in msgpack._cmsgpack.unpackb
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/core.py", line 138, in _decode_default
return merge_and_deserialize(
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/serialize.py", line 497, in merge_and_deserialize
return deserialize(header, merged_frames, deserializers=deserializers)
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/serialize.py", line 426, in deserialize
return loads(header, frames)
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/serialize.py", line 58, in dask_loads
loads = dask_deserialize.dispatch(typ)
File "/usr/local/lib/python3.9/site-packages/dask/utils.py", line 632, in dispatch
raise TypeError(f"No dispatch for {cls}")
TypeError: No dispatch for <class 'numpy.ndarray'>
AFAICT, NumPy was installed on the worker. There are plenty of other NumPy keys in memory on the same worker. So I’m not sure why this happened.
Unfortunately, I don’t have more information here. Not sure how easily reproducible it is.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
NEP 18 — A dispatch mechanism for NumPy's high level array ...
In NumPy 1.16, you need to set the environment variable NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1 before importing NumPy to test NumPy function ...
Read more >Numpy use dispatcher for argument displacement
My problem is not really specific to the einsum dispatcher. But it looks it is not possible for the dispatcher to rearrange the...
Read more >Error with dd.utils.make_meta #7731 - dask/dask - GitHub
The error happens only with 2021.05.01 , works fine with 2021.05.0 . Versions. dask/distributed version: '2021.05.1' install method: pip.
Read more >doc/dispatch.py · alkaline-ml/numpy - Gemfury
_dispatch_mechanism: Numpy's dispatch mechanism, introduced in numpy version v1.16 is the recommended approach for writing custom N-dimensional array ...
Read more >Dask and the __array_function__ protocol
In short, the protocol allows a NumPy function call to dispatch the ... in a Dask array as a view ( asarray=True )...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
cc @jakirkham
Just to comment that I have put a PR up at dask/dask#9544 that addresses the problem for me locally. It is a very rough draft, but I’d be interested to know if you think that general approach is worth pursuing.