R - H20 - ERROR: Unexpected HTTP Status code: 500 Server Error
R - H20 - ERROR: Unexpected HTTP Status code: 500 Server Error
我正在尝试使用 H2O 包中的 h2o.automl
。
但是,我不断收到错误 ERROR: Unexpected HTTP Status code: 500 Server Error
每当我设置
时都会出现此错误
max_runtime_secs = 0, # Max time (sec.)
max_models = NULL,
这是输出:
> model_automl = h2o.automl(x = features,
+ y = target,
+ training_frame = h_train,
+ validation_frame = NULL, # Optional; Early Stopping of individual models
+ leaderboard_frame = NULL, # If provided, then Leaderboard scored using this dataframe
+ nfolds = 10,
+ fold_column = NULL, # Column with cross-validation fold index assignment per observation
+ weights_column = NULL, # 0 = excluding; 2 = repeating that row twice
+ balance_classes = TRUE, # Over/under-sampling available
+ class_sampling_factors = NULL,
+ max_after_balance_size = 10,
+ max_runtime_secs = 0, # Max time (sec.)
+ max_models = NULL, # Max no. of models
+ stopping_metric = "AUC", # Metric to optimize #'AUC'
+ stopping_tolerance = NULL,
+ stopping_rounds = 5,
+ seed = n_seed,
+ project_name = "final1",
+ exclude_algos = NULL, # If you want to exclude any algo
+ keep_cross_validation_predictions = TRUE,
+ keep_cross_validation_models = FALSE,
+ sort_metric = "AUTO")
ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/99/AutoML/final1)
java.lang.ArrayIndexOutOfBoundsException
[1] "java.lang.ArrayIndexOutOfBoundsException: 0"
[2] " ai.h2o.automl.Leaderboard.toTwoDimTable(Leaderboard.java:735)"
[3] " ai.h2o.automl.Leaderboard.toTwoDimTable(Leaderboard.java:727)"
[4] " water.automl.api.schemas3.AutoMLV99.fillFromImpl(AutoMLV99.java:78)"
[5] " water.automl.api.AutoMLHandler.fetch(AutoMLHandler.java:17)"
[6] " sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
[7] " sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
[8] " sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
[9] " java.lang.reflect.Method.invoke(Method.java:498)"
[10] " water.api.Handler.handle(Handler.java:63)"
[11] " water.api.RequestServer.serve(RequestServer.java:451)"
[12] " water.api.RequestServer.doGeneric(RequestServer.java:296)"
[13] " water.api.RequestServer.doGet(RequestServer.java:220)"
[14] " javax.servlet.http.HttpServlet.service(HttpServlet.java:735)"
[15] " javax.servlet.http.HttpServlet.service(HttpServlet.java:848)"
[16] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)"
[17] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)"
[18] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)"
[19] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)"
[20] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)"
[21] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)"
[22] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[23] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[24] " water.JettyHTTPD$LoginHandler.handle(JettyHTTPD.java:197)"
[25] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[26] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[27] " org.eclipse.jetty.server.Server.handle(Server.java:370)"
[28] " org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)"
[29] " org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)"
[30] " org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)"
[31] " org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)"
[32] " org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)"
[33] " org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)"
[34] " org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)"
[35] " org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)"
[36] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)"
[37] " org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:543)"
[38] " java.lang.Thread.run(Thread.java:748)"
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
0
报错说无法进入排行榜。正如劳伦所说,这可能是一个错误,但它是一个极端情况。相反,不要这样做:
max_runtime_secs = 0,
max_models = NULL,
将其中之一(或两者)设置为非零值。否则永远不会构建任何模型,调用 h2o.automl()
也毫无意义。参见 http://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html#required-stopping-parameters
设置 max_models=1
似乎是最简单的解决方法,如果您希望 h2o.automl()
进行最少的机器操作。
我正在尝试使用 H2O 包中的 h2o.automl
。
但是,我不断收到错误 ERROR: Unexpected HTTP Status code: 500 Server Error
每当我设置
时都会出现此错误 max_runtime_secs = 0, # Max time (sec.)
max_models = NULL,
这是输出:
> model_automl = h2o.automl(x = features,
+ y = target,
+ training_frame = h_train,
+ validation_frame = NULL, # Optional; Early Stopping of individual models
+ leaderboard_frame = NULL, # If provided, then Leaderboard scored using this dataframe
+ nfolds = 10,
+ fold_column = NULL, # Column with cross-validation fold index assignment per observation
+ weights_column = NULL, # 0 = excluding; 2 = repeating that row twice
+ balance_classes = TRUE, # Over/under-sampling available
+ class_sampling_factors = NULL,
+ max_after_balance_size = 10,
+ max_runtime_secs = 0, # Max time (sec.)
+ max_models = NULL, # Max no. of models
+ stopping_metric = "AUC", # Metric to optimize #'AUC'
+ stopping_tolerance = NULL,
+ stopping_rounds = 5,
+ seed = n_seed,
+ project_name = "final1",
+ exclude_algos = NULL, # If you want to exclude any algo
+ keep_cross_validation_predictions = TRUE,
+ keep_cross_validation_models = FALSE,
+ sort_metric = "AUTO")
ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/99/AutoML/final1)
java.lang.ArrayIndexOutOfBoundsException
[1] "java.lang.ArrayIndexOutOfBoundsException: 0"
[2] " ai.h2o.automl.Leaderboard.toTwoDimTable(Leaderboard.java:735)"
[3] " ai.h2o.automl.Leaderboard.toTwoDimTable(Leaderboard.java:727)"
[4] " water.automl.api.schemas3.AutoMLV99.fillFromImpl(AutoMLV99.java:78)"
[5] " water.automl.api.AutoMLHandler.fetch(AutoMLHandler.java:17)"
[6] " sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
[7] " sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
[8] " sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
[9] " java.lang.reflect.Method.invoke(Method.java:498)"
[10] " water.api.Handler.handle(Handler.java:63)"
[11] " water.api.RequestServer.serve(RequestServer.java:451)"
[12] " water.api.RequestServer.doGeneric(RequestServer.java:296)"
[13] " water.api.RequestServer.doGet(RequestServer.java:220)"
[14] " javax.servlet.http.HttpServlet.service(HttpServlet.java:735)"
[15] " javax.servlet.http.HttpServlet.service(HttpServlet.java:848)"
[16] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)"
[17] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)"
[18] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)"
[19] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)"
[20] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)"
[21] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)"
[22] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[23] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[24] " water.JettyHTTPD$LoginHandler.handle(JettyHTTPD.java:197)"
[25] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[26] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[27] " org.eclipse.jetty.server.Server.handle(Server.java:370)"
[28] " org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)"
[29] " org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)"
[30] " org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)"
[31] " org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)"
[32] " org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)"
[33] " org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)"
[34] " org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)"
[35] " org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)"
[36] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)"
[37] " org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:543)"
[38] " java.lang.Thread.run(Thread.java:748)"
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
0
报错说无法进入排行榜。正如劳伦所说,这可能是一个错误,但它是一个极端情况。相反,不要这样做:
max_runtime_secs = 0,
max_models = NULL,
将其中之一(或两者)设置为非零值。否则永远不会构建任何模型,调用 h2o.automl()
也毫无意义。参见 http://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html#required-stopping-parameters
设置 max_models=1
似乎是最简单的解决方法,如果您希望 h2o.automl()
进行最少的机器操作。