我是H2O(python包)的早期初学者。我的问题是,我不知道如何才能成功地从熊猫的数据帧创建一个H2OFrame。
我的环境是:
Windows 10家庭版,内部版本15063.540,内存16.0 GB
Java SE开发工具包8u144(64位)
Java SE运行时环境(构建1.8.0_144-b01)
蟒蛇3.5.4
我用h2o.init()启动服务器:
H2O cluster uptime: 19 hours 14 mins
H2O cluster version: 3.14.0.1
H2O cluster version age: 12 days
H2O cluster name: H2O_from_python_pedro_23i63g
H2O cluster total nodes: 1
H2O cluster free memory: 3.456 Gb
H2O cluster total cores: 4
H2O cluster allowed cores: 4
H2O cluster status: locked, healthy
H2O connection url: http://localhost:54321
H2O connection proxy: None
H2O internal security: False
H2O API Extensions: Algos, AutoML, Core V3, Core V4
Python version: 3.5.4 final
我正试图通过以下命令从train1熊猫数据帧创建我的H2OFrame:
hf1 = h2o.H2OFrame(train1)
崩溃信息:
OSError: Job with key $03017f00000132d4ffffffff$_8ef7ebc5204725b046d7b31ca7194c71 failed with an exception: DistributedException from /127.0.0.1:54321: 'null', caused by java.lang.AssertionError
stacktrace:
DistributedException from /127.0.0.1:54321: 'null', caused by java.lang.AssertionError
at water.MRTask.getResult(MRTask.java:478)
at water.MRTask.getResult(MRTask.java:486)
at water.MRTask.doAll(MRTask.java:402)
at water.parser.ParseDataset.parseAllKeys(ParseDataset.java:245)
at water.parser.ParseDataset.access$000(ParseDataset.java:26)
at water.parser.ParseDataset$ParserFJTask.compute2(ParseDataset.java:194)
at water.H2O$H2OCountedCompleter.compute(H2O.java:1255)
at jsr166y.CountedCompleter.exec(CountedCompleter.java:468)
at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263)
at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974)
at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477)
at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Caused by: java.lang.AssertionError
at water.parser.Categorical.addKey(Categorical.java:41)
at water.parser.FVecParseWriter.addStrCol(FVecParseWriter.java:133)
at water.parser.CsvParser.parseChunk(CsvParser.java:126)
at water.parser.ParseDataset$MultiFileParseTask$DistributedParse.map(ParseDataset.java:888)
at water.MRTask.compute2(MRTask.java:637)
at water.MRTask.compute2(MRTask.java:591)
at water.MRTask.compute2(MRTask.java:591)
at water.MRTask.compute2(MRTask.java:591)
at water.MRTask.compute2(MRTask.java:591)
at water.MRTask.compute2(MRTask.java:591)
at water.MRTask.compute2(MRTask.java:591)
at water.H2O$H2OCountedCompleter.compute1(H2O.java:1258)
at water.parser.ParseDataset$MultiFileParseTask$DistributedParse$Icer.compute1(ParseDataset$MultiFileParseTask$DistributedParse$Icer.java)
at water.H2O$H2OCountedCompleter.compute(H2O.java:1254)
... 5 more
然而,我试图通过使用熊猫数据框的前6行来创建H2OFrame,结果很顺利。
hf1 = h2o.H2OFrame(train1.loc[:6,:])
[out] Parse progress: |█████████████████████████████████████████████████████████| 100%
但是,当我尝试超过这6行(例如7行)时,它将再次失败,并显示以前的崩溃信息:
hf1 = h2o.H2OFrame(train1.loc[:7,:])
[out] Parse progress: | (failed)
这里面有什么问题?
提前谢谢。
佩德罗
最佳答案
补充:
h2o.cluster().shutdown()
解决了我的问题。可能是错误的,但我认为内存不足是我的问题,所以关闭以前的集群有帮助。
找到了解决我自己问题的方法,但我会把这个留在这里,这样我就能帮助其他有同样问题的人。