Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

h2o package: total cluster memory zero

data1.dl.r2 = vector()
for (i in 1:100) {
if (i==1) {
  data1.hex = as.h2o(data1)
} else {
  data1.hex = nextdata 
}
  data1.dl = h2o.deeplearning    (x=2:1000,y=1,training_frame=data1.hex,nfolds=5,activation="Tanh",hidden=30,seed=5,reproducible=TRUE)
  data1.dl.pred = h2o.predict(data1.dl,data1.hex)
  data1.dl.r2[i] = sum((as.matrix(data1.dl.pred)-mean(as.matrix(data1.hex[,1])))^2)/
sum((as.matrix(data1.hex[,1])-mean(as.matrix(data1.hex[,1])))^2) # R-squared

  prevdata = as.matrix(data1.hex)
  nextpred = as.matrix(h2o.predict(data1.dl,as.h2o(data0[i,])))
  colnames(nextpred) = "response"
  nextdata = as.h2o(rbind(prevdata,cbind(nextpred,data0[i,-1])))

  print(i)
}

This is my code with a dataset (data1) of 100 observations and 1000 features. When I run this, it gave me an error message at 50~60th iteration "

Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page,  : 


ERROR MESSAGE:

Total input file size of 87.5 KB is much larger than total cluster memory of Zero  , please use either a larger cluster or smaller data.

When I run 'h20.init()', it tells me that the total cluster memory is zero.

    H2O cluster total nodes:    1 
    H2O cluster total memory:   0.00 GB 
    H2O cluster total cores:    8 
    H2O cluster allowed cores:  8 
    H2O cluster healthy:        TRUE 

So I wonder why cluster total memory is zero, and why it didn't go wrong at earlier iterations.

like image 282
user67275 Avatar asked Aug 07 '17 01:08

user67275


Video Answer


1 Answers

You need to restart your H2O cluster.

Try h2o.cluster().shutdown() and then h2o.init().

You can also explicitly set the memory allocated to H2O by h2o.init(min_mem_size_GB=8), which depends upon how much memory your machine has of course.

like image 128
David Comfort Avatar answered Sep 17 '22 15:09

David Comfort