Repository navigation
[python-package] allow use of early_stopping_round<=0 to turn off early stopping (fixes #6401) - #6406
Conversation
|
@microsoft-github-policy-service agree company="Grubhub" |
|
Thanks! I've added the statement "fixes #6401" to the description. In case you're not familiar with GitHub... that's helpful for 2 reasons:
More details on that: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue |
|
Ah, looks like I forgot to run some linting pre-commit hooks? I can try to fix those. Also, we typically rebase to one commit in our PRs as we make changes. Do you have any problem with that? |
jameslamb
left a comment
There was a problem hiding this comment.
Thanks so much for doing this! I left one comment for you to consider. Will try to provide a more thorough review later.
Yep. You can do this from the root of the repo to run them. pip install pre-commit
pre-commit run --all-files
We squash all commits into 1 when merging here, so we end up with 1 commit per PR. Check this out: https://github.com/microsoft/LightGBM/commits/master/ Because of that:
So please don't rebase and force-push here. It's useful for reviewers to be able to see the individual changes being made in response to review comments, and all the CI logs are tied to commits so it's useful to be able to compare consecutive CI runs. |
jameslamb
left a comment
There was a problem hiding this comment.
Thanks very much for this! The tests look great, I just left some small suggestions. This is pretty close, and we'll get it into the next release.
|
Thanks for the changes! I've updated this to the latest state of the |
jameslamb
left a comment
There was a problem hiding this comment.
Thanks very much, we'd love to have you come back and contribute again in the future!
|
Thanks, James! Great process, I learned a lot and your reviews were incredibly thorough. |
|
@jameslamb Do you know when the next release is scheduled to be? |
|
We're hoping to do one within the next month... but we're battling severe issues in CI right now π (#6425). |
|
OH NO. Thank you for the reply, that's helpful to know. |
|
This pull request has been automatically locked since there has not been any recent activity since it was closed. |

Fixes #6401
The early stopping callback was instantiated if
early_stopping_roundwas found in the parameter list, even its values was <=0 (which should disable early stopping). The code was modified to only instantiate the early stopping callback ifearly_stopping_roundwas both an integer and >0.Various error messages were updated and unit tests were added.