Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distributed.core - ERROR #28

Open
temp-abandon opened this issue Dec 3, 2018 · 8 comments
Open

distributed.core - ERROR #28

temp-abandon opened this issue Dec 3, 2018 · 8 comments
Labels
bug Something isn't working dispatched irreproducible

Comments

@temp-abandon
Copy link

temp-abandon commented Dec 3, 2018

/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/arboreto/algo.py:214: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
  expression_matrix = expression_data.as_matrix()
creating dask graph
48 partitions
computing dask graph
distributed.protocol.core - CRITICAL - Failed to deserialize
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/protocol/core.py", line 108, in loads
    msg = loads_msgpack(small_header, small_payload)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/protocol/core.py", line 197, in loads_msgpack
    return msgpack.loads(payload, use_list=False, **msgpack_raw_false)
  File "msgpack/_unpacker.pyx", line 187, in msgpack._cmsgpack.unpackb
ValueError: 102826 exceeds max_map_len(32768)
distributed.core - ERROR - 102826 exceeds max_map_len(32768)
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/core.py", line 386, in handle_stream
    msgs = yield comm.read()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/comm/tcp.py", line 206, in read
    deserializers=deserializers)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/comm/utils.py", line 79, in from_frames
    res = _from_frames()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/comm/utils.py", line 65, in _from_frames
    deserializers=deserializers)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/protocol/core.py", line 108, in loads
    msg = loads_msgpack(small_header, small_payload)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/protocol/core.py", line 197, in loads_msgpack
    return msgpack.loads(payload, use_list=False, **msgpack_raw_false)
  File "msgpack/_unpacker.pyx", line 187, in msgpack._cmsgpack.unpackb
ValueError: 102826 exceeds max_map_len(32768)
shutting down client and local cluster
distributed.core - ERROR - 102826 exceeds max_map_len(32768)
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/core.py", line 346, in handle_comm
    result = yield result
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1147, in run
    yielded = self.gen.send(value)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/scheduler.py", line 2018, in add_client
    yield self.handle_stream(comm=comm, extra={'client': client})
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/core.py", line 386, in handle_stream
    msgs = yield comm.read()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/comm/tcp.py", line 206, in read
    deserializers=deserializers)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/comm/utils.py", line 79, in from_frames
    res = _from_frames()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/comm/utils.py", line 65, in _from_frames
    deserializers=deserializers)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/protocol/core.py", line 108, in loads
    msg = loads_msgpack(small_header, small_payload)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/protocol/core.py", line 197, in loads_msgpack
    return msgpack.loads(payload, use_list=False, **msgpack_raw_false)
  File "msgpack/_unpacker.pyx", line 187, in msgpack._cmsgpack.unpackb
ValueError: 102826 exceeds max_map_len(32768)
tornado.application - ERROR - Exception in Future <Future cancelled> after timeout
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 970, in error_callback
    future.result()
concurrent.futures._base.CancelledError
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33045 remote=tcp://127.0.0.1:58286>
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33435 remote=tcp://127.0.0.1:58286>
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33481 remote=tcp://127.0.0.1:58286>
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33482 remote=tcp://127.0.0.1:58286>
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33483 remote=tcp://127.0.0.1:58286>
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33484 remote=tcp://127.0.0.1:58286>
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:33485 remote=tcp://127.0.0.1:58286>
finished
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/client.py", line 1487, in _gather
    st = self.futures[key]
KeyError: 'finalize-7b1845663f7c382673df6fc49437374f'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "script.py", line 44, in <module>
    adjacencies = grnboost2(ex_matrix, tf_names=tf_names, verbose=True)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/arboreto/algo.py", line 41, in grnboost2
    early_stop_window_length=early_stop_window_length, limit=limit, seed=seed, verbose=verbose)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/arboreto/algo.py", line 135, in diy
    .compute(graph, sync=True) \
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/client.py", line 2492, in compute
    result = self.gather(futures)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/client.py", line 1652, in gather
    asynchronous=asynchronous)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/client.py", line 670, in sync
    return sync(self.loop, func, *args, **kwargs)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/utils.py", line 277, in sync
    six.reraise(*error[0])
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/utils.py", line 262, in f
    result[0] = yield future
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/distributed/client.py", line 1493, in _gather
    None)
  File "/home/user/anaconda3/envs/pyscenic_env/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
concurrent.futures._base.CancelledError: finalize-7b1845663f7c382673df6fc49437374f

How could I resolve this issue?
Any suggestion helps..
Thank you very much.
EL

@HichamAffia
Copy link

HichamAffia commented Dec 3, 2018

I have the same issue (distributed.protocol.core - CRITICAL - Failed to deserialize AND _concurrent.futures._base.CancelledError), look like tornado package is involved but I have the latest version?
Any help would be very appreciated, thank you!

@bramvds
Copy link
Contributor

bramvds commented Dec 3, 2018

Dear,

I did some research and the problem potentially resides in the dask.distributed package (see dask/distributed#1830). The author of the dask framework, Matthew Rocklin, advises to downgrade the version of the tornado package to version 4.5.

Could you create a virgin (miniconda) environment in the following way and check if the problem persists?

For Linux OS:

conda create -n pyscenic python=3.6
. activate pyscenic
pip install tornado==4.5
pip install pyscenic

For Windows:

conda create -n pyscenic python=3.6
activate pyscenic
pip install tornado==4.5
pip install pyscenic

If this resolves the issue I'll put the fix in the source code and create a new release of pyscenic. Many thanks.

Kindest regards,
Bram

@bramvds bramvds added the bug Something isn't working label Dec 4, 2018
@bramvds bramvds self-assigned this Dec 4, 2018
@HichamAffia
Copy link

HichamAffia commented Dec 4, 2018

Hi , thanks for the quick answear. I downgraded tornado to 4.5 but now I get another error with tornado:

tornado.application - ERROR - Exception in callback functools.partial(<function wrap..null_wrapper at 0x2b6d1ffb3598>,
<tornado.concurrent.Future object at 0x2b6d0a203630>)
Traceback (most recent call last):
...
BufferError: Existing exports of data: object cannot be re-sized
Best,
Hicham

@bramvds
Copy link
Contributor

bramvds commented Dec 4, 2018

Dear Hicham,

I tried to reproduce the problem using a fresh installation of pyscenic (version 0.8.16) in a virgin miniconda environment (on a Linux RedHat distribution running on a dual Intel Xeon E5-2680 v3 machine). I installed the latest version of tornado (5.1.1) and ran grnboost from the command line. I failed to get this error message.

This is my list of packages installed:

arboreto==0.1.5
attrs==18.2.0
boltons==18.0.1
certifi==2018.10.15
Click==7.0
cloudpickle==0.6.1
cycler==0.10.0
cytoolz==0.9.0.1
dask==0.20.2
decorator==4.3.0
dill==0.2.8.2
distributed==1.24.2
frozendict==1.2
h5py==2.8.0
HeapDict==1.0.0
interlap==0.2.6
kiwisolver==1.0.1
llvmlite==0.25.0
loompy==2.0.2
matplotlib==3.0.2
msgpack==0.5.6
multiprocessing-on-dill==3.5.0a4
networkx==2.2
numba==0.40.1
numpy==1.15.4
pandas==0.23.4
psutil==5.4.8
pyarrow==0.11.1
pyparsing==2.3.0
pyscenic==0.8.16
python-dateutil==2.7.5
pytz==2018.7
PyYAML==3.13
scikit-learn==0.20.1
scipy==1.1.0
six==1.11.0
sortedcontainers==2.1.0
tblib==1.3.2
toolz==0.9.0
tornado==5.1.1
tqdm==4.28.1
typing==3.6.6
umap-learn==0.3.6
zict==0.1.3

Anyhow, this problem is related to the GRNBoost2 step of pySCENIC which is provided through the arboreto package. This issue is already registered there: https://github.com/tmoerman/arboreto/issues/12 .

Kindest regards,
Bram

@HichamAffia
Copy link

HichamAffia commented Dec 6, 2018

Dear Bram,
Thank you for the kind advices. I still have a tornado error with this list of package:

arboreto 0.1.5
arrow-cpp 0.11.1 py36h3bd774a_0 conda-forge
asn1crypto 0.22.0 py36h265ca7c_1 https://repo.continuum.io/pkgs/main
attrs 18.2.0
blas 1.0 mkl anaconda
boost-cpp 1.68.0 h3a22d5f_0 conda-forge
bzip2 1.0.6 h470a237_2 conda-forge
ca-certificates 2017.08.26 h1d4fec5_0 https://repo.continuum.io/pkgs/main
certifi 2017.7.27.1 py36h8b7b77e_0 https://repo.continuum.io/pkgs/main
certifi 2018.10.15
cffi 1.10.0 py36had8d393_1 https://repo.continuum.io/pkgs/main
chardet 3.0.4 py36h0f667ec_1 https://repo.continuum.io/pkgs/main
Click 7.0
cloudpickle 0.6.1
conda 4.5.11 py36_0 anaconda
conda-env 2.6.0 h36134e3_1 anaconda
cryptography 2.0.3 py36ha225213_1 https://repo.continuum.io/pkgs/main
cycler 0.10.0
dask 0.20.2
dask-jobqueue 0.4.1
dill 0.2.8.2
distributed 1.24.2
docrep 0.2.4
frozendict 1.2
h5py 2.8.0
HeapDict 1.0.0
icu 58.2 hfc679d8_0 conda-forge
idna 2.6 py36h82fb2a8_1 https://repo.continuum.io/pkgs/main
intel-openmp 2019.1 144 anaconda
interlap 0.2.6
kiwisolver 1.0.1
libedit 3.1 heed3624_0 https://repo.continuum.io/pkgs/main
libffi 3.2.1 h4deb6c0_3 https://repo.continuum.io/pkgs/main
libgcc-ng 8.2.0 hdf63c60_1 anaconda
libgfortran-ng 7.3.0 hdf63c60_0 anaconda
libstdcxx-ng 8.2.0 hdf63c60_1 anaconda
llvmlite 0.25.0
loompy 2.0.2
matplotlib 3.0.2
mkl 2019.1 144 anaconda
mkl_fft 1.0.4 py36h4414c95_1 anaconda
mkl_random 1.0.1 py36h4414c95_1 anaconda
msgpack 0.5.6
multiprocessing-on-dill 3.5.0a4
ncurses 6.0 h06874d7_1 https://repo.continuum.io/pkgs/main
numba 0.40.1
numpy 1.15.2
numpy 1.15.4 py36h1d66e8a_0 anaconda
numpy-base 1.15.4 py36h81de0dd_0 anaconda
openssl 1.0.2l h9d1a558_3 https://repo.continuum.io/pkgs/main
pandas 0.23.4 py36h04863e7_0 anaconda
parquet-cpp 1.5.1 2 conda-forge
pip 18.1
pip 9.0.1 py36h30f8307_2 https://repo.continuum.io/pkgs/main
psutil 5.4.8
pyarrow 0.11.1 py36hfc679d8_0 conda-forge
pycosat 0.6.3 py36h14c3975_0 anaconda
pycparser 2.18 py36hf9f622e_1 https://repo.continuum.io/pkgs/main
pyopenssl 17.2.0 py36h5cc804b_0 https://repo.continuum.io/pkgs/main
pyparsing 2.3.0
pyscenic 0.8.16
pysocks 1.6.7 py36hd97a5b1_1 https://repo.continuum.io/pkgs/main
python 3.6.2 h02fb82a_12 https://repo.continuum.io/pkgs/main
python-dateutil 2.7.5 py36_0 anaconda
pytz 2018.7 py36_0 anaconda
PyYAML 3.13
readline 7.0 hac23ff0_3 https://repo.continuum.io/pkgs/main
requests 2.18.4 py36he2e5f8d_1 https://repo.continuum.io/pkgs/main
ruamel_yaml 0.11.14 py36ha2fb22d_2 https://repo.continuum.io/pkgs/main
scikit-learn 0.20.1 py36h4989274_0 anaconda
scipy 1.1.0
scipy 1.1.0 py36hfa4b5c9_1 anaconda
setuptools 36.5.0 py36he42e2e1_0 https://repo.continuum.io/pkgs/main
six 1.11.0
six 1.10.0 py36hcac75e4_1 https://repo.continuum.io/pkgs/main
sqlite 3.20.1 h6d8b0f3_1 https://repo.continuum.io/pkgs/main
tblib 1.3.2
tk 8.6.7 h5979e9b_1 https://repo.continuum.io/pkgs/main
tornado 5.1.1
tqdm 4.28.1
typing 3.6.6
umap-learn 0.3.7
urllib3 1.22 py36hbe7ace6_0 https://repo.continuum.io/pkgs/main
wheel 0.29.0 py36he7f4e38_1 https://repo.continuum.io/pkgs/main
xz 5.2.4 h470a237_1 conda-forge
yaml 0.1.7 h96e3832_1 https://repo.continuum.io/pkgs/main
zict 0.1.3
zlib 1.2.11 hfbfcf68_1 https://repo.continuum.io/pkgs/main
<
and this python script:

import pandas as pd
from distributed import Client, LocalCluster
from arboreto.utils import load_tf_names
from arboreto.algo import grnboost2
if name == 'main':
in_file='DGE.tsv'
tf_file='TFs.txt'
out_file='grnboost2_output.csv'
# ex_matrix is a DataFrame with gene names as column names
ex_matrix = pd.read_csv(in_file, sep='\t')
# tf_names is read using a utility function included in Arboreto
tf_names = load_tf_names(tf_file)
# instantiate a custom Dask distributed Client
client = Client(LocalCluster(n_workers=28,memory_limit=4e9))
# compute the GRN
network = grnboost2(expression_data=ex_matrix,
tf_names=tf_names,
client_or_address=client)
# write the GRN to file
network.to_csv(out_file, sep='\t', index=False, header=False)
<

I will open an issue on arboreto github, thanks again!

Hicham

@yingyonghui
Copy link

Dear Hicham,

I tried to reproduce the problem using a fresh installation of pyscenic (version 0.8.16) in a virgin miniconda environment (on a Linux RedHat distribution running on a dual Intel Xeon E5-2680 v3 machine). I installed the latest version of tornado (5.1.1) and ran grnboost from the command line. I failed to get this error message.

This is my list of packages installed:

arboreto==0.1.5
attrs==18.2.0
boltons==18.0.1
certifi==2018.10.15
Click==7.0
cloudpickle==0.6.1
cycler==0.10.0
cytoolz==0.9.0.1
dask==0.20.2
decorator==4.3.0
dill==0.2.8.2
distributed==1.24.2
frozendict==1.2
h5py==2.8.0
HeapDict==1.0.0
interlap==0.2.6
kiwisolver==1.0.1
llvmlite==0.25.0
loompy==2.0.2
matplotlib==3.0.2
msgpack==0.5.6
multiprocessing-on-dill==3.5.0a4
networkx==2.2
numba==0.40.1
numpy==1.15.4
pandas==0.23.4
psutil==5.4.8
pyarrow==0.11.1
pyparsing==2.3.0
pyscenic==0.8.16
python-dateutil==2.7.5
pytz==2018.7
PyYAML==3.13
scikit-learn==0.20.1
scipy==1.1.0
six==1.11.0
sortedcontainers==2.1.0
tblib==1.3.2
toolz==0.9.0
tornado==5.1.1
tqdm==4.28.1
typing==3.6.6
umap-learn==0.3.6
zict==0.1.3

Anyhow, this problem is related to the GRNBoost2 step of pySCENIC which is provided through the arboreto package. This issue is already registered there: tmoerman/arboreto#12 .

Kindest regards,
Bram

Hi Bram,
I followed the instruction in https://pyscenic.readthedocs.io/en/latest/#run-genie3-or-grnboost-from-arboreto-to-infer-co-expression-modules, and ended up with the error "concurrent.futures._base.CancelledError" mentioned above when running the grnboost2 function.
I'm quite new to tornado. And what I want to know is that is there any alternative function or certain workaround to avoid this error?
Thanks!
Best regards,
Yingyong

@bramvds bramvds removed their assignment Jul 7, 2019
@ghost
Copy link

ghost commented Jul 7, 2021

I also have this issue. Has anyone found a solution to it?

Updated:
I managed to run it in a different cluster in the end (no conda)

@HichamAffia
Copy link

HichamAffia commented Jul 7, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dispatched irreproducible
Projects
None yet
Development

No branches or pull requests

4 participants