Closed VictorP10 closed 1 year ago
r2pmml_0.26.0 xgboost_1.7.3.1
Caused by: com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 18 path $.L
This error means that the XGBoost parser is expecting to read the model in JSON data format, but the RDS file contains the model in Universal Binary JSON (aka UBJSON, UBJ) data format instead.
This issue can be solved by:
r2pmml_0.26.0
This is the latest R2PMML package version, which was published to CRAN on 19th of March, 2021 (two years ago!). No wonder that it doesn't know about UBJSON.
In the R2PMML GitHub repository there are 0.26.1 and 0.26.2 versions available. But I'm not sure, if they already include a sufficiently new JPMML-XGBoost library or not.
TLDR: The R code example is perfectly valid. The problem is that the XGBoost library has changed its default data persistence format from JSON to UBJSON about a year ago (and a two year old R2PMML package doesn't know about it).
In the R2PMML GitHub repository there are 0.26.1 and 0.26.2 versions available.
R2PMML version 0.26.2 includes JPMML-XGBoost version 1.7.0, which knows about the UBJSON data format.
Therefore, if you upgrade your R2PMML package version as shown below, this error should go away:
library("devtools")
install_github("jpmml/r2pmml")
Even so, looks like a new R2PMML release version is warranted here.
Seems that it works now ! Thanks a lot !
I've prepared R2PMML version 0.27.0, and submitted it for CRAN review queue. No idea if it gets accepted or rejected this time.
Anyway, the GitHub install will be always available.
I've prepared R2PMML version 0.27.0, and submitted it for CRAN review queue
The R2PMML version 0.27.0 didn't get approved, but the corrected 0.27.1 did!
So, in a day or two, there will be a new R2PMML package available in CRAN that works fine with newest 1.6.X and 1.7.X versions (UBJSON data format, categorical data).
Hi, I have an issue for 2 months. It used to work perfectly and now I can't use r2pmml with any xgboost model. Here is the code (it is the iris example)
My session infos are : R version 4.2.2 r2pmml_0.26.0
xgboost_1.7.3.1
And here is the result of the execution of the script :
Thanks in advance for your help !