h2oai / h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
http://h2o.ai
Apache License 2.0
6.89k stars 1.99k forks source link

All REST endpoints have problems with int[], double[] etc. #12453

Open exalate-issue-sync[bot] opened 1 year ago

exalate-issue-sync[bot] commented 1 year ago

Currently, all REST endpoints have a problem with int[], double[] etc.

For example, when trying to split a frame using the REST endpoint {{/3/SplitFrame}}:

{{http://localhost:54321/3/SplitFrame?dataset=frame.hex&ratios=0.75,0.1&destination_frames=firstFrame,secondFrame,thirdFrame}}

There are other REST endpoints that are affected:

h5. Steps to reproduce:

h5. Exception: {noformat} { "__meta": { "schema_version": 3, "schema_name": "H2OErrorV3", "schema_type": "H2OError" }, "timestamp": 1527277904468, "error_url": "/3/SplitFrame", "msg": "\n\nERROR MESSAGE:\n\nIllegal argument for field: ratios of schema: SplitFrameV3: cannot convert \"0.75,0.1\" to type double\n\n", "dev_msg": "\n\nERROR MESSAGE:\n\nIllegal argument for field: ratios of schema: SplitFrameV3: cannot convert \"0.75,0.1\" to type double\n\n", "http_status": 412, "values": {}, "exception_type": "water.exceptions.H2OIllegalArgumentException", "exception_msg": "\n\nERROR MESSAGE:\n\nIllegal argument for field: ratios of schema: SplitFrameV3: cannot convert \"0.75,0.1\" to type double\n\n", "stacktrace": [ "water.exceptions.H2OIllegalArgumentException: Illegal argument for field: ratios of schema: SplitFrameV3: cannot convert \"0.75,0.1\" to type double", " water.api.Schema.parse(Schema.java:415)", " water.api.Schema.parse(Schema.java:473)", " water.api.Schema.setField(Schema.java:356)", " water.api.Schema.fillFromParms(Schema.java:307)", " water.api.Handler.handle(Handler.java:46)", " water.api.RequestServer.serve(RequestServer.java:451)", " water.api.RequestServer.doGeneric(RequestServer.java:296)", " water.api.RequestServer.doPost(RequestServer.java:222)", " javax.servlet.http.HttpServlet.service(HttpServlet.java:707)", " javax.servlet.http.HttpServlet.service(HttpServlet.java:790)", " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)", " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)", " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)", " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)", " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)", " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)", " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)", " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)", " water.JettyHTTPD$LoginHandler.handle(JettyHTTPD.java:198)", " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)", " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)", " org.eclipse.jetty.server.Server.handle(Server.java:499)", " org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)", " org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)", " org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)", " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)", " org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)", " java.lang.Thread.run(Thread.java:748)" ] } {noformat}

h5. Assumption: Have a look at https://github.com/h2oai/h2o-3/blob/25ba51f21c0f3849712b8cf36f3ae1f6cbe7d728/h2o-core/src/main/java/water/api/RequestServer.java#L286.

exalate-issue-sync[bot] commented 1 year ago

Michal Kurka commented: Please note that /3/SplitFrame API is not used anymore in R & Python anymore. It will be marked obsolete and will be removed in the future.

Internal implementation of R/Python of the split frame function does this:

03-25 13:43:44.350 172.16.2.104:54321    13663  #34350-22 INFO: POST /99/Rapids, parms: {ast=(tmp= RTMP_sid_b1c0_4 (rows iris_sid_b1c0_2 (<= (h2o.runif iris_sid_b1c0_2 154936865828) 0.2))), session_id=_sid_b1c0}
hasithjp commented 1 year ago

JIRA Issue Migration Info

Jira Issue: PUBDEV-5592 Assignee: New H2O Bugs Reporter: Bernd Michelberger State: Open Fix Version: N/A Attachments: N/A Development PRs: N/A