question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'distributed.protocol.core - CRITICAL - Failed to deserialize' -- With Cupy

See original GitHub issue

Here is the code up to the point I get this error message:

import cupy as cp
import numpy as np
import dask.array as da
from dask.bag import read_text
from dask.distributed import Client

def row_to_numpy(row):
    return np.array([np.float(x) for x in row.split()])

client = Client()

S = read_text(my text file).str.strip().map(row_to_numpy)
S = da.stack(S, axis=0).map_blocks(cp.array)

u_old = da.random.random(T) 
u_old = v.map_blocks(cp.array)

_V_  = client.scatter(v, broadcast=True)
v = da.dot(_U_.result(),S).compute()

Basically I am reading in a txt file into a dask cupy array. I get this error message everytime I map as cupy, (numpy results in no errors). I am broadcasing this 1D array to all of the workers before doing this matrix multiplication. I looked at most other tickets and I couldn’t quite see a similar issue. All of my workers are updated and I have read the Serialization page in the docs but wasn’t sure how that would help me.

I am getting this error message:

distributed.protocol.core - CRITICAL - Failed to deserialize
Traceback (most recent call last):
  File "/home/myid/crumleyc/anaconda3/lib/python3.7/site-packages/distributed/protocol/core.py", line 124, in loads
    value = _deserialize(head, fs, deserializers=deserializers)
  File "/home/myid/crumleyc/anaconda3/lib/python3.7/site-packages/distributed/protocol/serialize.py", line 268, in deserialize
    return loads(header, frames)
  File "/home/myid/crumleyc/anaconda3/lib/python3.7/site-packages/distributed/protocol/serialize.py", line 54, in dask_loads
    return loads(header, frames)
  File "/home/myid/crumleyc/anaconda3/lib/python3.7/site-packages/distributed/protocol/cupy.py", line 81, in dask_deserialize_cupy_ndarray
    arr = cuda_deserialize_cupy_ndarray(header, frames)
  File "/home/myid/crumleyc/anaconda3/lib/python3.7/site-packages/distributed/protocol/cupy.py", line 65, in cuda_deserialize_cupy_ndarray
    memptr=cupy.asarray(frame).data,
  File "/home/myid/crumleyc/anaconda3/lib/python3.7/site-packages/cupy/creation/from_data.py", line 66, in asarray
    return core.array(a, dtype, False, order)
  File "cupy/core/core.pyx", line 1692, in cupy.core.core.array
  File "cupy/core/core.pyx", line 1718, in cupy.core.core.array
  File "cupy/core/core.pyx", line 2498, in cupy.core.core._convert_object_with_cuda_array_interface
TypeError: zip argument #2 must support iteration
distributed.core - ERROR - zip argument #2 must support iteration

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:38 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
jakirkhamcommented, Apr 3, 2020

Sorry for the delay. Sounds like the last exception is related to issue ( https://github.com/cupy/cupy/issues/3178 ).

1reaction
crumleyccommented, Mar 4, 2020

I went ahead and added some bad doc strings and fixed the indents!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dask distributed Failed to deserialize with numpy.arrays and ...
Possibly when certain tasks return numpy.array s and scipy.sparse matrices. distributed.protocol.pickle - INFO - Failed to deserialize ...
Read more >
Troubleshooting — Dask-CHTC 0.1.0 documentation
If you get an error with the reason unsupported pickle protocol: 5 , like. distributed.protocol.core - CRITICAL - Failed to deserialize Traceback (most ......
Read more >
NVIDIA Deep Learning TensorRT Documentation
TensorRT measures the amount of memory in use before and after critical operations in builder ... TensorRT allows the use of TF32 Tensor...
Read more >
Efficient MPI-based Communication for GPU-Accelerated ...
For instance, RAPIDS support processing of distributed data stored in cuPy (numPy-like) and cuDF (Pandas-like) formats. An overarching goal for ...
Read more >
Loading Dataframe with string[pyarrow] into Dask
However, I began seeing this error 2022-06-05 17:36:57,107 - distributed.protocol.core - CRITICAL - Failed to deserialize Traceback (most ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found