Dask client.gather未给出任何结果并保持运行

Dask client.gather未给出任何结果并保持运行,dask,Dask,我第一次看到达斯克。按照本网站上的教程进行操作: 长话短说:除了最后一个例子外,Jupyter中的一切都正常。 保持运行,不会出现错误。作为一个Dask新手:你能马上看出这段代码有什么错误或遗漏吗?或者另一个建议? 我也尝试了这个脚本,将最后一行代码改为result=etc。 谢谢 %%time # Use Dask client to parallelize the workload. # Create a futures array to store the futures return

我第一次看到达斯克。按照本网站上的教程进行操作:

长话短说:除了最后一个例子外,Jupyter中的一切都正常。 保持运行,不会出现错误。作为一个Dask新手:你能马上看出这段代码有什么错误或遗漏吗?或者另一个建议? 我也尝试了这个脚本,将最后一行代码改为result=etc。 谢谢

%%time
# Use Dask client to parallelize the workload.

# Create a futures array to store the futures returned by Dask
futures = []

# Scatter the dataframe beforehand
df_future = client.scatter(df)

for index in df.index:
    for date in dates:
        # Submit tasks to the dask client in parallel
        future = client.submit(do_operation, df_future, index, date)
        # Store the returned future in futures list
        futures.append(future)

# Gather the results.
_ = client.gather(futures)