由于xgboost导致r-h2o.init错误



我在R(Windows机器(中使用了h2o包,最近更新了该包后无法通过h2o.init对其进行初始化。

错误消息如下所示。我想问题的原因是h2o-xgboost不支持Windows(http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/xgboost.html)。我的猜测正确吗?如果是这样,我如何要求h2o包在初始化时排除xgboost以避免错误?

提前非常感谢。

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b30)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode)
Starting H2O JVM and connecting: ............................................................Cannot load library from path lib/windows_32/xgboost4j_gpu.dll
Cannot load library from path lib/xgboost4j_gpu.dll
Failed to load library from both native path and jar!
Cannot load library from path lib/windows_32/xgboost4j_omp.dll
Cannot load library from path lib/xgboost4j_omp.dll
Failed to load library from both native path and jar!
Cannot load library from path lib/windows_32/xgboost4j_minimal.dll
Cannot load library from path lib/xgboost4j_minimal.dll
Failed to load library from both native path and jar!
07-27 11:24:19.197 127.0.0.1:54321       14488  main      INFO: Cannot initialize XGBoost backend! Xgboost (enabled GPUs) needs: 
07-27 11:24:19.197 127.0.0.1:54321       14488  main      INFO:   - CUDA 8.0
07-27 11:24:19.197 127.0.0.1:54321       14488  main      INFO: XGboost (minimal version) needs: 
07-27 11:24:19.197 127.0.0.1:54321       14488  main      INFO:   - GCC 4.7+
07-27 11:24:19.197 127.0.0.1:54321       14488  main      INFO: For more details, run in debug mode: `java -Dlog4j.configuration=file:///tmp/log4j.properties -jar h2o.jar`
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: ----- H2O started  -----
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Build git branch: rel-wright
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Build git hash: 24410cf788602f231fd699037bdaff0ad20b4d1a
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Build git describe: jenkins-3.20.0.1-26-g24410cf
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Build age: 1 month and 11 days
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Built by: 'jenkins'
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Built on: '2018-06-15 18:39:02'
07-27 11:24:19.230 127.0.0.1:54321       14488  main      INFO: Watchdog Build git branch: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: Watchdog Build git hash: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: Watchdog Build git describe: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: Watchdog Build project version: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: Watchdog Built by: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: Watchdog Built on: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: KrbStandalone Build git branch: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: KrbStandalone Build git hash: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: KrbStandalone Build git describe: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: KrbStandalone Build project version: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: KrbStandalone Built by: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: KrbStandalone Built on: (unknown)
07-27 11:24:19.231 127.0.0.1:54321       14488  main      INFO: Processed H2O arguments: [-name, H2O_started_from_R_534474366_nnz606, -ip, 127.0.0.1, -port, 54321, -ice_root, C:/Users/534474~1/AppData/Local/Temp/RtmpCc9kQI]
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Java availableProcessors: 4
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Java heap totalMemory: 15.5 MB
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Java heap maxMemory: 989.9 MB
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Java version: Java 1.7.0_51 (from Oracle Corporation)
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: JVM launch parameters: [-Xmx1g, -ea]
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: OS version: Windows 7 6.1 (x86)
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Machine physical memory: 4.00 GB
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: X-h2o-cluster-id: 1532705056352
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: User name: '534474366'
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: IPv6 stack selected: false
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Possible IP Address: lo (Software Loopback Interface 1), 127.0.0.1
07-27 11:24:19.232 127.0.0.1:54321       14488  main      INFO: Possible IP Address: lo (Software Loopback Interface 1), 0:0:0:0:0:0:0:1
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:net0 (WAN Miniport (SSTP))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:net1 (WAN Miniport (L2TP))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:net2 (WAN Miniport (PPTP))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:ppp0 (WAN Miniport (PPPOE))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth0 (WAN Miniport (IPv6))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth1 (WAN Miniport (Network Monitor))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth2 (WAN Miniport (IP))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:ppp1 (RAS Async Adapter)
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:net3 (WAN Miniport (IKEv2))
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Possible IP Address: eth3 (Intel(R) Ethernet Connection I217-LM), 10.95.108.135
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth4 (Intel(R) Ethernet Connection I217-LM-McAfee NDIS Light-Weight Filter-0000)
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth5 (Intel(R) Ethernet Connection I217-LM-WFP LightWeight Filter-0000)
07-27 11:24:19.233 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth6 (Intel(R) Ethernet Connection I217-LM-QoS Packet Scheduler-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth7 (WAN Miniport (Network Monitor)-McAfee NDIS Light-Weight Filter-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth8 (WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth9 (WAN Miniport (IP)-McAfee NDIS Light-Weight Filter-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth10 (WAN Miniport (IP)-QoS Packet Scheduler-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth11 (WAN Miniport (IPv6)-McAfee NDIS Light-Weight Filter-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      INFO: Network interface is down: name:eth12 (WAN Miniport (IPv6)-QoS Packet Scheduler-0000)
07-27 11:24:19.234 127.0.0.1:54321       14488  main      FATAL: On /127.0.0.1 some of the required ports 54321, 54322 are not available, change -port PORT and try again. 
[1] "127.0.0.1"
[1] 54321
[1] TRUE
[1] -1
[1] "Failed to connect to 127.0.0.1 port 54321: Connection refused"
curl: (1) Protocol "'http" not supported or disabled in libcurl
[1] 1 

已编辑响应

如果您查看错误消息的底部:

07-27 11:24:19.234 127.0.0.1:54321 14488 main FATAL: On /127.0.0.1 some of the required ports 54321, 54322 are not available, change -port PORT and try again. [1] "127.0.0.1" [1] 54321 [1] TRUE [1] -1 [1] "Failed to connect to 127.0.0.1 port 54321: Connection refused" curl: (1) Protocol "'http" not supported or disabled in libcurl [1] 1

您可以看到,该问题不应该与XGBoost有关。此外,在Windows上的预期行为是XGBoost被自动禁用,您无需执行任何操作。

要解决您的问题,请尝试使用h2o.init()中的port =参数指定一个不同的端口,看看是否可以让h2o.init()为您工作。

原始响应

我将保留之前的答案,以防它帮助其他遇到禁用xgboost:问题的人

可以通过将-Dsys.ai.h2o.ext.core.toggle.XGBoost设置为False来禁用xgboost

有关更多详细信息,请参阅文档:http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/xgboost.html#disabling-xgboost

最新更新