3
내 간단한 코드입니다. 첫 번째 프로그램을 실행하려고합니다. dask.distributed 클러스터에 연결할 때 피클 오류가 발생했습니다.
from dask.distributed import Client
client = Client('192.168.1.102:8786')
def inc(x):
return x + 1
x = client.submit(inc, 10)
print(x.result())
이 명령을 사용하여이 코드를 실행하려고 :
$python3 filename.py
는이 오류를 geing 오전 :
/usr/local/lib/python3.4/dist-packages/distributed/protocol/pickle.py
- INFO - Failed to serialize <function inc at 0x7f678ad05840> Traceback (most recent call last): File
"/usr/local/lib/python3.4/dist-packages/distributed/protocol/pickle.py",
line 33, in dumps
return cloudpickle.dumps(x, protocol=pickle.HIGHEST_PROTOCOL) AttributeError: 'module' object has no attribute 'dumps'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"/usr/local/lib/python3.4/dist-packages/distributed/protocol/pickle.py",
line 43, in dumps
return cloudpickle.dumps(x, protocol=pickle.HIGHEST_PROTOCOL) AttributeError: 'module' object has no attribute 'dumps' Traceback
(most recent call last): File
"/usr/local/lib/python3.4/dist-packages/distributed/protocol/pickle.py",
line 33, in dumps
return cloudpickle.dumps(x, protocol=pickle.HIGHEST_PROTOCOL) AttributeError: 'module' object has no attribute 'dumps'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "dis.py", line 8, in
<module>
x = client.submit(inc, 10) File "/usr/local/lib/python3.4/dist-packages/distributed/client.py", line
643, in submit
loose_restrictions, priority={skey: 0}) File "/usr/local/lib/python3.4/dist-packages/distributed/client.py", line
1235, in _graph_to_futures
'tasks': valmap(dumps_task, dsk3), File "/usr/local/lib/python3.4/dist-packages/toolz/dicttoolz.py", line 84,
in valmap
rv.update(zip(iterkeys(d), map(func, itervalues(d)))) File "/usr/local/lib/python3.4/dist-packages/distributed/worker.py", line
812, in dumps_task
return {'function': dumps_function(task[0]), File "/usr/local/lib/python3.4/dist-packages/distributed/worker.py", line
779, in dumps_function
b = dumps(func) File "/usr/local/lib/python3.4/dist-packages/distributed/protocol/pickle.py",
line 43, in dumps
return cloudpickle.dumps(x, protocol=pickle.HIGHEST_PROTOCOL) AttributeError: 'module' object has no attribute 'dumps'
의 주소를 omiting하여 동일한 프로세스 내에서 로컬 클러스터를 시작할 수는 python3 –
작동하지 BT 나는 또한 클라이언트()에서 IP를 제거하고 ... 동일한 오류가 발생했습니다 ... 실제로 실제로 무슨 일이 일어나고 있는지 모르겠어요 ...이 코드는 ipython에서 잘 실행되고 있습니다. –
아마도 문제가 있습니다. 시스템 파이썬으로 여러 Python 환경을 실행. 대신 아나콘다를 사용해 볼 수 있습니까? 이런 종류의 문제는 사라지는 경향이 있습니다. – MRocklin