调用dask调度程序故事功能时出错
因此,我在Dask文档中遵循此示例几乎逐字 https://dasteributed.dask.orgg/en/stable/ logging.html#task-transition-logs 但不能让它起作用。以下是我的代码:
import dask
import time
import random
from dask_jobqueue import SLURMCluster
from distributed import Client
def dummy(x):
time.sleep(5)
return x
cluster = SLURMCluster(...) # you will need to put your queue name, cores, mem, etc...
client = Client(cluster)
f = client.submit(dummy, 2)
# we can sleep for a while for it to be finished
client.scheduler.story(f.key)
# client.scheduler.story(f) yields the same error
我收到此错误:
typeError:send_recv_from_rpc()获取0个位置参数,但在行
client> client.scheduler.story(f.key) >。
So I am following this example from dask documentation almost verbatim
https://distributed.dask.org/en/stable/logging.html#task-transition-logs
and but could not get it to work. Below is my code:
import dask
import time
import random
from dask_jobqueue import SLURMCluster
from distributed import Client
def dummy(x):
time.sleep(5)
return x
cluster = SLURMCluster(...) # you will need to put your queue name, cores, mem, etc...
client = Client(cluster)
f = client.submit(dummy, 2)
# we can sleep for a while for it to be finished
client.scheduler.story(f.key)
# client.scheduler.story(f) yields the same error
and I get this error:
TypeError: send_recv_from_rpc() takes 0 positional arguments but 1 was given
on the line client.scheduler.story(f.key)
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您非常接近,访问调度程序使用
client.cluster.scheduler
,因此相关代码看起来像这样:You are very close, to access the scheduler use the
client.cluster.scheduler
, so the relevant code would look like this: