调试 dask - 未能检测到客户端

debugging dask - failed to detect client

我的 dask groupby 脚本失败 (Memory Error) 所以我开始调试脚本。我 运行 在一台独立的计算机上。
我已将 config.yaml 文件中的 logging 更新为
logging: distributed: debug bokeh: debug tornado: info

我是 运行 dask distributed example computation,更新如下:

from distributed import LocalCluster  
c=LocalCluster()  

和更新后的脚本,其中 range 修改为 range(10000) .

当脚本运行(并成功完成)时,我在 Jupyter Notebook 中看到以下日志,它会重复自身,直到脚本完成。

bokeh.server.tornado - DEBUG - [pid 3088] 0 clients connected
bokeh.server.tornado - DEBUG - [pid 3088] /system has 0 sessions with 0 unused bokeh.server.tornado - DEBUG - [pid 3088] /stealing has 0 sessions with 0 unused bokeh.server.tornado - DEBUG - [pid 3088] /workers has 0 sessions with 0 unused bokeh.server.tornado - DEBUG - [pid 3088] /events has 0 sessions with 0 unused bokeh.server.tornado - DEBUG - [pid 3088] /counters has 0 sessions with 0 unused bokeh.server.tornado - DEBUG - [pid 3088] /tasks has 0 sessions with 0 unused bokeh.server.tornado - DEBUG - [pid 3088] /status has 0 sessions with 0 unused

为什么我看不到 运行 的工作人员?

当 运行 c = LocalCluster()

时,我得到以下日志

bokeh.server.server - INFO - Starting Bokeh server version 0.12.4
bokeh.server.server - WARNING - Host wildcard '' can expose the application to HTTP host header attacks. Host wildcard should only be used for testing purpose. bokeh.server.server - WARNING - Host wildcard '' can expose the application to HTTP host header attacks. Host wildcard should only be used for testing purpose. bokeh.server.tornado - DEBUG - Allowed Host headers: [''] bokeh.server.tornado - DEBUG - These host origins can connect to the websocket: [''] bokeh.server.tornado - DEBUG - Patterns are: bokeh.server.tornado - DEBUG - [('/system/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/system/ws'}), bokeh.server.tornado - DEBUG - ('/system/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/system/ws'}), bokeh.server.tornado - DEBUG - ('/system/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/system/ws'}), bokeh.server.tornado - DEBUG - ('/stealing/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/stealing/ws'}), bokeh.server.tornado - DEBUG - ('/stealing/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/stealing/ws'}), bokeh.server.tornado - DEBUG - ('/stealing/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/stealing/ws'}), bokeh.server.tornado - DEBUG - ('/workers/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/workers/ws'}), bokeh.server.tornado - DEBUG - ('/workers/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/workers/ws'}), bokeh.server.tornado - DEBUG - ('/workers/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/workers/ws'}), bokeh.server.tornado - DEBUG - ('/events/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/events/ws'}), bokeh.server.tornado - DEBUG - ('/events/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/events/ws'}), bokeh.server.tornado - DEBUG - ('/events/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/events/ws'}), bokeh.server.tornado - DEBUG - ('/counters/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/counters/ws'}), bokeh.server.tornado - DEBUG - ('/counters/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/counters/ws'}), bokeh.server.tornado - DEBUG - ('/counters/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/counters/ws'}), bokeh.server.tornado - DEBUG - ('/tasks/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/tasks/ws'}), bokeh.server.tornado - DEBUG - ('/tasks/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/tasks/ws'}), bokeh.server.tornado - DEBUG - ('/tasks/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/tasks/ws'}), bokeh.server.tornado - DEBUG - ('/status/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/status/ws'}), bokeh.server.tornado - DEBUG - ('/status/ws', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG -
{'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/status/ws'}), bokeh.server.tornado - DEBUG - ('/status/autoload.js', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'application_context': , bokeh.server.tornado - DEBUG -
'bokeh_websocket_path': '/status/ws'}), bokeh.server.tornado - DEBUG - ('/?', bokeh.server.tornado - DEBUG - , bokeh.server.tornado - DEBUG - {'applications': {'/counters': , bokeh.server.tornado - DEBUG -
'/events': , bokeh.server.tornado - DEBUG -
'/status': , bokeh.server.tornado - DEBUG -
'/stealing': , bokeh.server.tornado - DEBUG -
'/system': , bokeh.server.tornado - DEBUG -
'/tasks': , bokeh.server.tornado - DEBUG -
'/workers': }, bokeh.server.tornado - DEBUG -
'prefix': '', bokeh.server.tornado - DEBUG - 'use_redirect': True}), bokeh.server.tornado - DEBUG - ('/static/(.*)', bokeh.server.tornado - DEBUG - )]

您看到的日志消息来自 Bokeh 诊断仪表板。他们基本上是在说没有人在看诊断网页。您可能希望降低 Bokeh 日志记录的冗长程度。我认为这些消息与您无关。

调试级别的日志记录对于任何用户来说几乎总是过于冗长。它往往被开发人员在调试时使用。