-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
R XGBoost: No longer producing predictions on .RData or .model files when supplied a matrix #5815
Comments
Did you use |
I did not. I used base R's |
Hmm, that's odd, since you say you used |
As an example the file path looks like 'C:/Users/me/models/' as seen below.
When I load this file in now like this..
..it yields this error:
|
@tmbluth The error is different from your original post? Wasn't it As for the new error message |
The first error message appeared when I tried to load in the .RData file ( load() after save() ). The second error message was when I tried to load in the .model file ( new xgb.load() after old xgb.save() ) In the sessionInfo() above under "other attached packages" it shows "xgboost_1.1.1.1" That's the version that has been throwing these errors |
@tmbluth The first error is expected, since the .RData file may become unreadable when XGBoost is upgraded. The As for the second error, it might be related to a past bug #5699. Can you share the .model file so that we can try to diagnose the issue? |
I can't in this case since the model is company property and proprietary. Is there anything else I can do? |
@tmbluth Do you have another model file that you can share and is experiencing the same issue? (Check failed: base_score > 0.0f && base_score < 1.0f) |
I do not. It would have to be artificially simulated by training a model with the old XGBoost (I'm wanting to say v 0.9.0?) and loading it in with the latest version |
Please understand that it is quite difficult for us developers to diagnose the problem without an example at hand. I’m afraid there’s not much we can do at this moment. I’ll keep this issue open for now and will update if I happen to run into the same error. |
OH. Great. I just came across the same issue. Glad to know this news. But, when I checked the latest version of xgboost in the CRAN (https://cran.r-project.org/web/packages/xgboost/index.html), it's still v1.1.1.1. Can I use the install.package to install the v1.2.0.1? Or I have to compile by myself? Thanks :) |
Just a couple of months back I was able to run the code below to predict test data outcomes after loading in .RData or .model XGBoost files. These models were able to predict outcomes on .csv data loaded in with
read.csv()
which was then transformed to a matrix withas.matrix()
. After updating to the latest R version and the latest XGBoost version I was no longer able to predict my test data with this code:predict(object=model1_proto, newdata=as.matrix(test_set[,model1_proto_inputs]))
I was instead greeted by a somewhat confusing error message:
After double-checking my inputs and my model to make sure the integrity of each was intact it was hard to tell what could have been the issue. After scouring the web for any similar issues the closest thing I could find was #5599 though I'm not sure its exactly the same issue
Here is my
sessionInfo()
:I'm trying to discover if this is a bug or if the new version is requiring a different method of prediction. If so, it's not immediately obvious after reviewing the release notes
The text was updated successfully, but these errors were encountered: