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

Binary Model from Version 3.25.0.4693 #16356

Open
foxmulder42 opened this issue Aug 7, 2024 · 1 comment
Open

Binary Model from Version 3.25.0.4693 #16356

foxmulder42 opened this issue Aug 7, 2024 · 1 comment
Labels

Comments

@foxmulder42
Copy link

H2O version, Operating System and Environment
Dockerimage FROM python:3.9-bookworm
R Version 4.2.2
h2o Version 3.26.0.2

Actual behavior
In the company I am currently working we have to migrate an r-server. The r server is supposed to run on a kubernetes cluster and triggered by an airflow dag. The r server then downloads a csv file, processes it, loads h2o and uses the input csv file to make predictions.
The model itself hast no file extension and seems to be a binary file. In the binary file there is something that looks like a version number 3.25.0.4693. This would corrospond to the version of h2o that is used on the "old" r-server which needs to be depricated.
Since I was not able to find the version 3.25.0.4693 I installed the h2o Version 3.26.0.2 from the archive. The following error message appeares as soon as the model is loaded:

 R is connected to the H2O cluster:
     H2O cluster uptime:         1 seconds 373 milliseconds
     H2O cluster timezone:       Etc/UTC
     H2O data parsing timezone:  UTC
     H2O cluster version:        3.26.0.2
     H2O cluster version age:    5 years and 9 days !!!
     H2O cluster name:           H2O_started_from_R_tui_scj094
     H2O cluster total nodes:    1
     H2O cluster total memory:   1.66 GB
     H2O cluster total cores:    3
     H2O cluster allowed cores:  3
     H2O cluster healthy:        TRUE
     H2O Connection ip:          localhost
     H2O Connection port:        54321
     H2O Connection proxy:       NA
     H2O Internal Security:      FALSE
     H2O API Extensions:         Amazon S3, XGBoost, Algos, AutoML, Core V3, Core V4
     R Version:                  R version 4.2.2 Patched (2022-11-10 r83330)
 Warning message:
 In h2o.clusterInfo() :
 Your H2O cluster version is too old (5 years and 9 days)!
 Please download and install the latest version from http://h2o.ai/download/
 ERROR: Unexpected HTTP Status code: 400 Bad Request (url = http://localhost:54321/99/Models.bin/)
 java.lang.IllegalArgumentException
  [1] "java.lang.IllegalArgumentException: Found version 3.25.0.4693, but running version 3.26.0.2"

Upload logs
Unfortunatelly I am not able to share too much, since this is company data...

Since I am very new to R, I consulted chatgpt how to proceed. But so far the solutions are either to

  • retrain the model with the original data (which I don't have and are nowhere to be found) and save the model with a newer h2o version
  • download the Version 3.25.0.4693 which I tried but cannot find anywhere.

It seems like I am at a deadend and need some help, please. Thank you for your effort in advacne.

@foxmulder42 foxmulder42 added the bug label Aug 7, 2024
@tomasfryda
Copy link
Contributor

Unfortunately, version 3.25 is development version (odd minor version numbers indicate development versions). You can take the closest version (version 3.26 aka rel-yau branch) and disable version check either by starting the backend with -Dsys.ai.h2o.serialization.ignore.version=true or with calling h2o.rapids('(setproperty "sys.h2o.ai.serialization.ignore.version" "true")') before loading the model.
There's no guarantee that it will work but it's very likely.

What could be an issue is using old h2o with new R version. Version 3.26 wasn't tested against R 4.0.0+ and there was quite a few changes, e.g., stringsAsFactors is no longer TRUE by default.

So I'd recommend grabbing the latest h2o version (https://h2o-release.s3.amazonaws.com/h2o/rel-3.46.0/4/index.html) and retraining the model. Also from modeling standpoint there might have been some concept drift during the last ~5 yeast so it'd wise to check the model anyway.

NOTE: you can also use the latest version from CRAN but we usually upload the last minor version from each major version to CRAN since they don't like frequent updates. And in 3.46.0.4 should be some fixes for R 4.0.0+ so I'd recommend using the version from the link I provided.

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