【发布时间】:2018-01-10 03:24:00
【问题描述】:
这是我之前关于使用 Dask 计算到 access one element in a large array 的问题之一的潜在答案的后续问题。
为什么使用 Dask 计算会导致执行在下面挂起? 这是工作代码 sn-p:
#Suppose you created a scheduler at the ip address of 111.111.11.11:8786
from dask.distributed import Client
import dask.array as da
# client1
client1 = Client("111.111.11.11:8786")
x = da.ones(10000000, chunks=(100000,)) # 1e7 size array cut into 1e5 size chunks
x = x.persist()
client1.publish_dataset(x=x)
# client2
client2 = Client("111.111.11.11:8786")
x = client2.get_dataset('x') #get the lazy collection x
result = x[0].compute() #code execution hangs here
print(result)
【问题讨论】:
标签: dask dask-distributed dask-delayed