[python-package] support saving and loading CVBooster (fixes #3556)
This PR resolves #3556 by implementing the following method in CVBooster:
- save_model
- model_from_string
- model_to_string
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
:x: nyanp sign now
You have signed the CLA already but the status is still pending? Let us recheck it.
Also note that this does not totally resolve #3556. As mentioned in the discussion there, it should also be possible to pickle a
CVBoosterand load one from a pickle file. I think that work should be picked up in a follow-up PR after this one.
This can be solved by simply defining __getstate__ and __setstate__ in CVBooster, which I will try to solve together in this PR.
I signed the CLA and once the status was OK, but at some point, the bot status changed again to "not signed yet". When I access the CLA page (https://cla.opensource.microsoft.com/microsoft/LightGBM?pullRequest=5160) again, it says "You have signed the CLA for multiple repositories or organizations" and I cannot re-sign. Can anyone help me?
@nyanp Sorry about this inconvenience! I believe we can "fix" it via closing-reopenning this PR.
@StrikerRUS The CLA bot is still complaining, but CI seems to have passed. Thanks a lot!
@jameslamb All you pointed out have been fixed. Could you please review them again?
The CLA bot is still complaining, but CI seems to have passed. Thanks a lot!
Yeah, I see. Check mark is green

I believe this is enough.
@jameslamb Hi, could you please review it again? I believe all review points have been resolved. Thanks :)
Kindly ping @nyanp
@nyanp are you interested in continuing this pull request? This is a really useful addition to the library and we're very grateful for your work so far. I'd love to see this completed.
@jameslamb Sorry for the late reply, I have been off for a while. I will resume today!
I believe all review content has now been resolved. Please re-review @StrikerRUS @jameslamb
I just re-reviewed. All of my and other reviewers' comments have been addressed, and I don't have any other suggestions.
EXCELLENT work @nyanp 🎉 🎉 🎉
We really appreciate your hard work on this very impactful feature, and your patience with the review process. I hope you'll consider contributing to LightGBM more in the future.
@jameslamb Thank you very much for the kind and polite review! I am very happy to contribute to my favorite library. I have enjoyed this long journey ;)
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.