我能够将工人添加到dasch-scheduler中,并且它们会出现在Web ui中,但是这些工人是按其IP地址列出的,而不是我给他们提供的名称。
当我创建工作程序(使用Python脚本)时,我确实设置了名称:
import dask
import dask.dataframe as dd
from dask.distributed import Client as Dask_Client
from distributed import Worker
dask_client = Dask_Client('192.168.0.162:8786')
loop = IOLoop.current()
t = threading.Thread(target=loop.start, daemon=True)
t.start()
w = Worker('tcp://192.168.0.162:8786', loop=loop, name=socket.gethostname())
w.start()
当我运行print(json.dumps(dask_client.scheduler_info(),sort_keys = True,indent = 4))时,工作人员姓名确实出现了-摘录如下:
"tcp://192.168.0.198:39619": {
"host": "192.168.0.198",
"id": "alana1",
"last_seen": 1558707665.9223647,
"local_directory": "[omitted]",
"memory_limit": 8243511296,
"metrics": {
"cpu": 4.0,
"executing": 0,
"in_flight": 0,
"in_memory": 330,
"memory": 245129216,
"num_fds": 26,
"read_bytes": 3020.000227124918,
"ready": 0,
"time": 1558707665.9237077,
"write_bytes": 3484.3077504469734
},
"name": "alana1",
"ncores": 4,
"resources": {},
"services": {
"bokeh": 37993,
"nanny": 35817
},
"type": "Worker"
在上面的示例中,我希望名称“ alana1”将出现在Dask Web UI中,而不是出现的名称:“ tcp://192.168.0.198:39619”
答案 0 :(得分:1)
是的。更改Dask代码库是有可能的。
听起来好像您是在请求功能请求。我建议提出一个github问题。