在AWS中,我按照here中的说明使用社区AMI ami-97591381启动了g2.2xlarge EC2
在docker镜像上,我可以毫无问题地运行一个简单的深水教程。然而,当我尝试使用我自己的数据训练深水模型时(使用非GPU加深学习模型可以正常工作),h2o给了我这个例外:
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 <= 186393 < 170807
at water.Futures.blockForPending(Futures.java:88)
at hex.deepwater.DeepWaterDatasetIterator.Next(DeepWaterDatasetIterator.java:99)
at hex.deepwater.DeepWaterTask.setupLocal(DeepWaterTask.java:168)
at water.MRTask.setupLocal0(MRTask.java:550)
at water.MRTask.dfork(MRTask.java:456)
at water.MRTask.doAll(MRTask.java:389)
at water.MRTask.doAll(MRTask.java:385)
at hex.deepwater.DeepWater$DeepWaterDriver.trainModel(DeepWater.java:345)
at hex.deepwater.DeepWater$DeepWaterDriver.buildModel(DeepWater.java:205)
at hex.deepwater.DeepWater$DeepWaterDriver.computeImpl(DeepWater.java:118)
at hex.ModelBuilder$Driver.compute2(ModelBuilder.java:173)
at hex.deepwater.DeepWater$DeepWaterDriver.compute2(DeepWater.java:111)
at water.H2O$H2OCountedCompleter.compute(H2O.java:1256)
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.ArrayIndexOutOfBoundsException: 0 <= 186393 < 170807
at water.fvec.Vec.elem2ChunkIdx(Vec.java:925)
at water.fvec.Vec.chunkForRow(Vec.java:1063)
at hex.deepwater.DeepWaterDatasetIterator$FrameDataConverter.compute2(DeepWaterDatasetIterator.java:76)
... 6 more
这是我的代码,您可以在我将S3链接公开时运行:
library(h2o)
library(jsonlite)
library(curl)
h2o.init()
df.truth <- h2o.importFile("https://s3.amazonaws.com/nw.data.test.us.east/df.truth.zeroed", header = T, sep=",")
df.truth$isFemale <- h2o.asfactor(df.truth$isFemale)
hotnames.truth <- fromJSON("https://s3.amazonaws.com/nw.data.test.us.east/hotnames.json", simplifyVector = T)
# Training and validation sets
splits <- h2o.splitFrame(df.truth, c(0.9), seed=1234)
train.truth <- h2o.assign(splits[[1]], "train.truth.hex")
valid.truth <- h2o.assign(splits[[2]], "valid.truth.hex")
dl.2.balanced <- h2o.deepwater(
training_frame = train.truth, model_id="dl.2.balanced",
x=setdiff(hotnames.truth[1:(length(hotnames.truth)/2)], c("isFemale", "nwtcs")),
y="isFemale", stopping_metric = "AUTO", seed = 1000000,
sparse = F,
balance_classes = T,
mini_batch_size = 20)
h2o版本是3.13.0.356。
更新
我想我发现了h2o bug。如果我将 balance_classes 设置为FALSE,那么它将在没有崩溃的情况下运行。
答案 0 :(得分:0)
请注意,《深水》是一项遗留项目(截至2017年12月),这意味着它不再处于积极开发中。 H2O.ai团队目前没有计划添加新功能,但是,欢迎社区提供(以请求请求的形式)。