gpt4 book ai didi

r - 为什么连接终止

转载 作者:行者123 更新时间:2023-12-04 09:11:04 30 4
gpt4 key购买 nike

我正在尝试使用 H2O 的随机森林分类模型R 中包含 7000 万行和 25 个数字特征的训练集的库。总文件大小为 5.6 GB。

验证文件的大小为 1 GB。

我的系统上有 16 GB RAM 和 8 核 CPU。

系统成功地能够读取 H2O 对象中的两个文件。

然后我给出以下命令来构建模型:

model <- h2o.randomForest(x = c(1:18,20:25), y = 19, training_frame = traindata, 
validation_frame = testdata, ntrees = 150, mtries = 6)

但是几分钟后(没有生成任何树),我收到以下错误:

"Error in .h2o.doSafeREST(conn = conn, h2oRestApiVersion = h2oRestApiVersion, : Unexpected CURL error: Recv failure: Connection reset by peer"



但是,如果我用 1 棵树尝试了上面的代码,它会成功运行。

出现上述错误是因为内存问题吗?任何帮助将不胜感激。

最佳答案

它是一个 OutOfMemoryError。 R 端此错误消息的一个变体是:

Error in .h2o.doSafeREST(conn = conn, h2oRestApiVersion = h2oRestApiVersion,  : 
Unexpected CURL error: Empty reply from server

检查 h2o 服务器日志(您也应该这样做)会告诉您:
10-08 20:11:57.165 192.168.0.4:54321     2125   #58072-18 INFO: Total file size: 1.81 GB
10-08 20:11:57.165 192.168.0.4:54321 2125 #58072-18 INFO: Parse chunk size 4194304
onExCompletion for water.parser.ParseDataset$MultiFileParseTask@3588360e
java.lang.OutOfMemoryError: Java heap space
:
:
Exception in thread "FJ-0-11" java.lang.OutOfMemoryError: Java heap space
2015-10-08 20:13:14.493:WARN:oejut.QueuedThreadPool:1 threads could not be stopped
10-08 20:13:23.033 192.168.0.4:54321 2125 FJ-0-5 ERRR: Out of Memory, Heap Space exceeded, increase Heap Size, from /192.168.0.4:54321
10-08 20:13:23.458 192.168.0.4:54321 2125 FJ-0-3 ERRR: Out of Memory, Heap Space exceeded, increase Heap Size, from /192.168.0.4:54321
10-08 20:13:23.033 192.168.0.4:54321 2125 FJ-0-13 ERRR: Out of Memory, Heap Space exceeded, increase Heap Size, from /192.168.0.4:54321
10-08 20:13:23.033 192.168.0.4:54321 2125 FJ-0-7 ERRR: Out of Memory, Heap Space exceeded, increase Heap Size, from /192.168.0.4:54321
10-08 20:13:26.541 192.168.0.4:54321 2125 FJ-0-5 FATAL: Exiting.
10-08 20:13:26.574 192.168.0.4:54321 2125 FJ-0-7 FATAL: Exiting.
10-08 20:13:26.575 192.168.0.4:54321 2125 FJ-0-3 FATAL: Exiting.
10-08 20:13:26.575 192.168.0.4:54321 2125 FJ-0-13 FATAL: Exiting.

我在 h2o Slater (3.2.0.5) 上运行它,所以根据你的版本,这可能会有所不同。

关于r - 为什么连接终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30882686/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com