LightGBM icon indicating copy to clipboard operation
LightGBM copied to clipboard

[python-package] support saving and loading CVBooster (fixes #3556)

Open nyanp opened this issue 4 years ago • 11 comments

This PR resolves #3556 by implementing the following method in CVBooster:

  • save_model
  • model_from_string
  • model_to_string

nyanp avatar Apr 20 '22 14:04 nyanp

CLA assistant check
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.

ghost avatar Apr 20 '22 14:04 ghost

Also note that this does not totally resolve #3556. As mentioned in the discussion there, it should also be possible to pickle a CVBooster and 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.

nyanp avatar Apr 22 '22 14:04 nyanp

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 avatar May 03 '22 12:05 nyanp

@nyanp Sorry about this inconvenience! I believe we can "fix" it via closing-reopenning this PR.

StrikerRUS avatar May 03 '22 16:05 StrikerRUS

@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?

nyanp avatar May 19 '22 03:05 nyanp

The CLA bot is still complaining, but CI seems to have passed. Thanks a lot!

Yeah, I see. Check mark is green

image

I believe this is enough.

StrikerRUS avatar May 21 '22 22:05 StrikerRUS

@jameslamb Hi, could you please review it again? I believe all review points have been resolved. Thanks :)

nyanp avatar Jun 03 '22 13:06 nyanp

Kindly ping @nyanp

StrikerRUS avatar Jun 25 '22 17:06 StrikerRUS

@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 avatar Jul 12 '22 22:07 jameslamb

@jameslamb Sorry for the late reply, I have been off for a while. I will resume today!

nyanp avatar Jul 18 '22 04:07 nyanp

I believe all review content has now been resolved. Please re-review @StrikerRUS @jameslamb

nyanp avatar Jul 30 '22 09:07 nyanp

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 ;)

nyanp avatar Aug 23 '22 22:08 nyanp

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.

github-actions[bot] avatar Aug 19 '23 03:08 github-actions[bot]