-
Notifications
You must be signed in to change notification settings - Fork 27
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
saveRDS / readRDS issue with 'lightgbm' engine #145
Comments
Thanks for the issue and reprex! You're correct that stacks—and tidymodels generally—doesn't currently support native serialization like lightgbm's We're actively working on better infrastructure for supporting native serialization methods. That work currently lives at simonpcouch/bundle if you'd like to follow our development, but we hope to integrate this functionality under the hood in objects outputted by tidymodels / vetiver soon. I'd anticipate this work to reach our CRAN packages before the end of the year.👍 |
Thank you for the information & swift reply! I'll keep an eye on the bundle package and appreciate the added details. Looking forward to leveraging the solution & appreciate all the work you've done on stacks! Great job on the pesto presentation too, as it inspired our team to do these types of ensembles in the first place. 🥳 P.S. my pesto has tasted better ever since! 😜 |
Hahaha great to hear, @frankiethull! Glad yall appreciated the talk. :) |
An update from the bundle side: We've opted to remove the lightgbm bundle method in light of the upcoming feature in lightgbm. This should "just work" in good time. :) |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
The Problem: saveRDS / readRDS for lightgbm engine
I'm having trouble when stacking an ensemble model with "set_engine = 'lightgbm'", if we want to save the model as an RDS and read in later, the model will not predict.
Error message: "Error in predictor$predict(data = data, start_iteration = start_iteration, :
Attempting to use a Booster which no longer exists. This can happen if you have called Booster$finalize() or if this Booster was saved with saveRDS(). To avoid this error in the future, use saveRDS.lgb.Booster() or Booster$save_model() to save lightgbm Boosters."
Seems to be an underlying issue with lightgbm but hoping this could be handled in stacks, maybe this bug should be posted on bonsai. Would like to easily stack cubist + lightgbm without doing a workaround.
Reproducible example
Created on 2022-08-03 by the reprex package (v2.0.1)
Session info
The text was updated successfully, but these errors were encountered: