Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h2o.infogram throws error in R #16008

Open
ditopcu opened this issue Jan 7, 2024 · 2 comments
Open

h2o.infogram throws error in R #16008

ditopcu opened this issue Jan 7, 2024 · 2 comments
Assignees
Labels

Comments

@ditopcu
Copy link

ditopcu commented Jan 7, 2024

Hi,

I wrote detailes as follows:

Many thanks

H2O version, Operating System and Environment

R is connected to the H2O cluster:
H2O cluster uptime: 3 seconds 363 milliseconds
H2O data parsing timezone: UTC
H2O cluster version: 3.44.0.3
H2O cluster version age: 18 days
H2O cluster total nodes: 1
H2O cluster total memory: 3.95 GB
H2O cluster total cores: 12
H2O cluster allowed cores: 12
H2O cluster healthy: TRUE
H2O Connection ip: localhost
H2O Connection port: 54321
H2O Connection proxy: NA
H2O Internal Security: FALSE
R Version: R version 4.3.2 (2023-10-31 ucrt)

Actual behavior
With the given example in the documentation, I got the following error:

h2o.infogram throws error :

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

ERROR MESSAGE:

Algorithm 'infogram' is not registered. Available algos: [ınfogram,targetencoder,deeplearning,glm,glrm,kmeans,naivebayes,pca,svd,drf,gbm,ısolationforest,extendedısolationforest,aggregator,word2vec,stackedensemble,coxph,generic,gam,anovaglm,psvm,rulefit,upliftdrf,modelselection,ısotonicregression,dt,adaboost]

Steps to reproduce

 
library(h2o)

h2o.init()


f <- "https://erin-data.s3.amazonaws.com/admissible/data/taiwan_credit_card_uci.csv"

col_types <- list(by.col.name = c("SEX", "MARRIAGE", "default_payment_next_month"),
                  types = c("factor", "factor", "factor"))

df <- h2o.importFile(path = f, col.types = col_types)


splits <- h2o.splitFrame(df, seed = 1)
train <- splits[[1]]
test <- splits[[2]]


y <- "default_payment_next_month"
x <- setdiff(names(train), y)


pcols <- c("SEX", "MARRIAGE", "AGE")


ig <- h2o.infogram(y = y, x = x, training_frame = train, protected_columns = pcols)
plot(ig)

Upload logs

ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/3/ModelBuilders/infogram)

java.lang.IllegalStateException
[1] "java.lang.IllegalStateException: Algorithm 'infogram' is not registered. Available algos: [ınfogram,targetencoder,deeplearning,glm,glrm,kmeans,naivebayes,pca,svd,drf,gbm,ısolationforest,extendedısolationforest,aggregator,word2vec,stackedensemble,coxph,generic,gam,anovaglm,psvm,rulefit,upliftdrf,modelselection,ısotonicregression,dt,adaboost]"
[2] " hex.ModelBuilder.lambda$make$1(ModelBuilder.java:168)"
[3] " java.base/java.util.Optional.orElseThrow(Optional.java:403)"
[4] " hex.ModelBuilder.make(ModelBuilder.java:163)"
[5] " water.api.ModelBuildersHandler.fetch(ModelBuildersHandler.java:35)"
[6] " java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)"
[7] " java.base/java.lang.reflect.Method.invoke(Method.java:578)"
[8] " water.api.Handler.handle(Handler.java:60)"
[9] " water.api.RequestServer.serve(RequestServer.java:472)"
[10] " water.api.RequestServer.doGeneric(RequestServer.java:303)"
[11] " water.api.RequestServer.doGet(RequestServer.java:225)"
[12] " javax.servlet.http.HttpServlet.service(HttpServlet.java:687)"
[13] " javax.servlet.http.HttpServlet.service(HttpServlet.java:790)"
[14] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)"
[15] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)"
[16] " org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)"
[17] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)"
[18] " org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)"
[19] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)"
[20] " org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)"
[21] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)"
[22] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)"
[23] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)"
[24] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)"
[25] " water.webserver.jetty9.Jetty9ServerAdapter$LoginHandler.handle(Jetty9ServerAdapter.java:130)"
[26] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)"
[27] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)"
[28] " org.eclipse.jetty.server.Server.handle(Server.java:516)"
[29] " org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)"
[30] " org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)"
[31] " org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)"
[32] " org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)"
[33] " org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)"
[34] " org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)"
[35] " org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)"
[36] " org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)"
[37] " org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)"
[38] " org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)"
[39] " org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)"
[40] " org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)"
[41] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)"
[42] " org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)"
[43] " java.base/java.lang.Thread.run(Thread.java:1623)"

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

ERROR MESSAGE:

Algorithm 'infogram' is not registered. Available algos: [ınfogram,targetencoder,deeplearning,glm,glrm,kmeans,naivebayes,pca,svd,drf,gbm,ısolationforest,extendedısolationforest,aggregator,word2vec,stackedensemble,coxph,generic,gam,anovaglm,psvm,rulefit,upliftdrf,modelselection,ısotonicregression,dt,adaboost]

@ditopcu ditopcu added the bug label Jan 7, 2024
@tomasfryda tomasfryda self-assigned this Jan 8, 2024
@tomasfryda
Copy link
Contributor

Hello @ditopcu,
thank you for reporting this issue. I think it's the "Turkish i issue". The workaround is to set different locale. You can do this when starting the h2o like:

h2o.init(jvm_custom_args = "-Duser.language=en -Duser.country=US")

For my h2o collegues:

I can reproduce the issue by using Turkish locale.

h2o.init(jvm_custom_args = "-Duser.language=tr -Duser.country=TR")

The issue is likely caused by using toLowerCase and similar functions without fixed locale (IIRC in Turkish I -> ı and İ -> i and since we have Infogram we convert it to ınfogram etc).

@ditopcu
Copy link
Author

ditopcu commented Jan 10, 2024

Hi @tomasfryda,

Many thanks for the fast reply and recommendation. It worked like a charm. I used
For clarification, I have exactly used:

h2o.init(jvm_custom_args = "-Duser.language=tr -Duser.country=US")

Cheers
Deniz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants