问题描述
在 jupyter notebook 中启动 ray 1.2.0 时:
import ray
ray.init(num_cpus = 8)
日志显示仪表板在以下位置可用:
2021-02-25 16:21:23,636 INFO services.py:1174 -- View the Ray dashboard at http://127.0.0.1:8265
但我在浏览器中收到“ERR_CONNECTION_REFUSED”。
解决方法
我发现了问题,我将日志置于调试模式:
import ray
ray.init(num_cpus = 8,ignore_reinit_error=True,**logging_level=logging.DEBUG**)
这给了你线索:
2021-02-25 16:21:23,641 DEBUG node.py:844 -- Process STDOUT and STDERR is being redirected to C:\tmp\ray\session_2021-02-25_16-21-22_158008_35392\logs
在日志文件夹中有一个带有错误的dashboard.log:
FileNotFoundError: [Errno 2] Dashboard build directory not found. If installing from source,please follow the additional steps required to build the dashboard(cd python/ray/new_dashboard/client && npm install && npm ci && npm run build): 'E:\\Development\\Anaconda3\\lib\\site-packages\\ray\\new_dashboard\\client\\build'
如果你用谷歌搜索这个错误,你会发现这是 Windows 中的一个已知错误。
https://github.com/ray-project/ray/issues/9114
要点:
[TODO] 仪表板在 Windows 上不起作用(与节点不兼容有关)