java.lang.ClassCastException: hex.GridSearch cannot be cast to hex.gbm.GBM$GBMModel

JIRA | Nidhi Mehta | 3 years ago
  1. 0

    While trying to run the following R code on nunes release get the following error java.lang.ClassCastException: hex.deeplearning.DeepLearningModel cannot be cast to hex.GridSearch at hex.GridSearch$GridSearchProgress.serve(GridSearch.java:74) at water.api.Request.serveGrid(Request.java:165) at water.Request2.superServeGrid(Request2.java:490) at water.Request2.serveGrid(Request2.java:411) at water.api.Request.serve(Request.java:142) at water.api.RequestServer.serve(RequestServer.java:518) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:425) at java.lang.Thread.run(Thread.java:745) R script : # The following two commands remove any previously installed H2O packages for R. if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) } if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") } # Next, we download, install and initialize the H2O package for R. install.packages("h2o", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-nunes/2/R", getOption("repos")))) library(h2o) h = h2o.init() pathToFile = "/Users/paragsanghavi/Documents/h2o/smalldata/airlines/AirlinesTrain.csv.zip" data.hex = h2o.importFile(h, pathToFile) ## Summary stats, columns to ignore, quantiles and histograms summary(data.hex) # Constructing test and train sets by sampling data.split = h2o.splitFrame(data = data.hex,ratios = 0.85) data.train = data.split[[1]] data.test = data.split[[2]] # Set predictor and response variables # Print the header of the dataset myY = "IsDepDelayed" myX = c("Origin", "Dest", "fDayofMonth", "fYear", "UniqueCarrier", "fDayOfWeek", "fMonth", "DepTime", "ArrTime", "Distance") ## Deep Learning epoch = 10 data.dl = h2o.deeplearning(y = "IsDepDelayed", x = myX, data = data.train, classification=TRUE, hidden=c(1000), hidden_dropout_ratios= c(0.5), epochs = 1) Apparently , specifying c(0.5) in the hidden dropout ratio causes this problem

    JIRA | 2 years ago | Parag Sanghavi
    java.lang.ClassCastException: hex.deeplearning.DeepLearningModel cannot be cast to hex.GridSearch
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    While trying to run the following R code on nunes release get the following error java.lang.ClassCastException: hex.deeplearning.DeepLearningModel cannot be cast to hex.GridSearch at hex.GridSearch$GridSearchProgress.serve(GridSearch.java:74) at water.api.Request.serveGrid(Request.java:165) at water.Request2.superServeGrid(Request2.java:490) at water.Request2.serveGrid(Request2.java:411) at water.api.Request.serve(Request.java:142) at water.api.RequestServer.serve(RequestServer.java:518) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:425) at java.lang.Thread.run(Thread.java:745) R script : # The following two commands remove any previously installed H2O packages for R. if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) } if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") } # Next, we download, install and initialize the H2O package for R. install.packages("h2o", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-nunes/2/R", getOption("repos")))) library(h2o) h = h2o.init() pathToFile = "/Users/paragsanghavi/Documents/h2o/smalldata/airlines/AirlinesTrain.csv.zip" data.hex = h2o.importFile(h, pathToFile) ## Summary stats, columns to ignore, quantiles and histograms summary(data.hex) # Constructing test and train sets by sampling data.split = h2o.splitFrame(data = data.hex,ratios = 0.85) data.train = data.split[[1]] data.test = data.split[[2]] # Set predictor and response variables # Print the header of the dataset myY = "IsDepDelayed" myX = c("Origin", "Dest", "fDayofMonth", "fYear", "UniqueCarrier", "fDayOfWeek", "fMonth", "DepTime", "ArrTime", "Distance") ## Deep Learning epoch = 10 data.dl = h2o.deeplearning(y = "IsDepDelayed", x = myX, data = data.train, classification=TRUE, hidden=c(1000), hidden_dropout_ratios= c(0.5), epochs = 1) Apparently , specifying c(0.5) in the hidden dropout ratio causes this problem

    JIRA | 2 years ago | Parag Sanghavi
    java.lang.ClassCastException: hex.deeplearning.DeepLearningModel cannot be cast to hex.GridSearch
  4. 0

    Upsource Analyzer has crashed

    YouTrack | 2 years ago
    java.lang.ClassCastException: cannot be cast to com.jetbrains.upsource.backend.server.core.tree.DbFileTreeNodeBase

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      hex.GridSearch cannot be cast to hex.gbm.GBM$GBMModel

      at water.api.GBMModelView.serve()
    2. water.api
      Request.serveGrid
      1. water.api.GBMModelView.serve(GBMModelView.java:31)
      2. water.api.Request.serveGrid(Request.java:129)
      2 frames
    3. water
      Request2.serveGrid
      1. water.Request2.superServeGrid(Request2.java:466)
      2. water.Request2.serveGrid(Request2.java:387)
      2 frames
    4. water.api
      RequestServer.serve
      1. water.api.Request.serve(Request.java:108)
      2. water.api.RequestServer.serve(RequestServer.java:314)
      2 frames
    5. water
      NanoHTTPD$HTTPSession.run
      1. water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421)
      1 frame
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:744)
      1 frame