Peter-Devine / test_repo_0

A repo purely for testing Github API functions
0 stars 0 forks source link

Too long string #15

Open Peter-Devine opened 4 years ago

Peter-Devine commented 4 years ago

when i use XGBoostPredictor load one model to do a test, one exception happenned. How can i sovle it?

Predictor predictor = new Predictor(
                new `java.io.FileInputStream("./model/ransom.pickle"));

Exception in thread "main" java.io.IOException: Too long string: 7887331693998180980 at biz.k11i.xgboost.util.ModelReader.readString(ModelReader.java:185) at biz.k11i.xgboost.Predictor.readParam(Predictor.java:108) at biz.k11i.xgboost.Predictor.(Predictor.java:43) at biz.k11i.xgboost.Predictor.(Predictor.java:26) at HowToUseXgboostPredictor.main(HowToUseXgboostPredictor.java:16)

Peter-Devine commented 4 years ago

Hi, I have the same issue. Did you find out what the problem was ?

Peter-Devine commented 4 years ago

I guess u guys save the model with a wrong format.

Predictor seems only accept models saved by booster

if you use sklearn.joblib to save or directly pickle it down, it may cannot be loaded coz its formatting is not acceptable

Peter-Devine commented 4 years ago

@itmayi Hi, Did you find a workaround?