在 jupyter 笔记本中启动 ray 1.2.0 时:
import ray
ray.init(num_cpus = 8)
Run Code Online (Sandbox Code Playgroud)
日志显示仪表板可用于:
2021-02-25 16:21:23,636 INFO services.py:1174 -- View the Ray dashboard at http://127.0.0.1:8265
Run Code Online (Sandbox Code Playgroud)
但我在浏览器中收到“ERR_CONNECTION_REFUSED”。
我发现了问题,我将日志置于调试模式:
import ray
import logging
ray.init(num_cpus = 8, ignore_reinit_error=True, logging_level=logging.DEBUG)
Run Code Online (Sandbox Code Playgroud)
这给了你线索:
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
Run Code Online (Sandbox Code Playgroud)
在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'
Run Code Online (Sandbox Code Playgroud)
如果您用 google 搜索此错误,您会发现这是 Windows 中的一个已知错误。
https://github.com/ray-project/ray/issues/9114
观点:
[TODO] 仪表板在 Windows 上不起作用(与节点不兼容有关)