【发布时间】:2020-01-26 18:59:17
【问题描述】:
我的应用程序要求我从其他任务中启动任务,如下所示
def a():
# ... some computation ..
def b():
# ... some computation ..
def c():
client = get_client()
a = client.submit(a)
b = client.submit(b)
[a,b] = client.gather([a,b])
return a+b
client = get_client()
res = client.submit(c)
但是,我想访问中间结果 a 和 b(当调用 c 时),但只有 c 出现在 client.futures 中。
有没有办法告诉 dask 保留 a 和 b 的结果?
我尝试使用 Future.add_done_callback 方法,但它不适用于其他 submit 调用中的 submit 调用。
谢谢
【问题讨论】:
标签: dask distributed