我是H2O(python包)的早期首发。我的问题是我无法弄清楚如何成功地从Pandas的数据框中创建H2OFrame。
我的环境是:
我用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 pandas'数据框创建我的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
然而,我尝试使用pandas数据框的第一个 6行来创建H2OFrame,并且进展顺利。
hf1 = h2o.H2OFrame(train1.loc[:6,:])
[out] Parse progress: |█████████████████████████████████████████████████████████| 100%
但是当我尝试超过这6行(例如 7行)时,它会再次失败并显示之前的崩溃信息:
hf1 = h2o.H2OFrame(train1.loc[:7,:])
[out] Parse progress: | (failed)
这有什么不妥?
提前致谢。
佩德罗
答案 0 :(得分:0)
添加了:
h2o.cluster().shutdown()
并解决了我的问题。可能是错的,但我认为缺少RAM是我的问题,因此关闭前一个集群有帮助。
找出解决我自己问题的方法,但我会把它留在这里,这样我就可以帮助那些可能遇到同样问题的其他人。