No module named 'worker'
然而,我无法弄清楚我在这里做错了什么...
这是我的代码样例:
import worker
def run(self):
dask_queue = queue.Queue()
remote_queue = self.executor.scatter(dask_queue)
map_queue = self.executor.map(worker.run, remote_queue)
result = self.executor.gather(map_queue)
# Load data into the queue
for option in self.input.get_next_option():
remote_queue.put([self.server, self.arg, option])
以下是在工作端获得的完整回溯信息:
distributed.core - INFO - 失败无法反序列化 b'\x80\x04\x95\x19\x00\x00\x00\x00\x00\x00\x00\x8c\x06worker\x94\x8c\nrun\x94\x93\x94.' Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/distributed/core.py", line 74, in loads return pickle.loads(x) ImportError: No module named 'worker' distributed.worker - WARNING - 无法反序列化任务 追溯信息如下: (most recent call last): File "/usr/local/lib/python3.5/dist-packages/distributed/worker.py", line 496, in compute_one task) File "/usr/local/lib/python3.5/dist-packages/distributed/worker.py", line 284, in deserialize function = loads(function) File "/usr/local/lib/python3.5/dist-packages/distributed/core.py", line 74, in loads return pickle.loads(x) ImportError: No module named 'worker'