Skip to content
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

Make early_stopping a callable in LightGBM #1967

Merged
merged 1 commit into from
Aug 18, 2023
Merged

Make early_stopping a callable in LightGBM #1967

merged 1 commit into from
Aug 18, 2023

Conversation

miguelgfierro
Copy link
Collaborator

Description

Related Issues

Fix #1965

References

Checklist:

  • I have followed the contribution guidelines and code style for this project.
  • I have added tests covering my contributions.
  • I have updated the documentation accordingly.
  • This PR is being made to staging branch and not to main branch.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@miguelgfierro
Copy link
Collaborator Author

hi @StrikerRUS @guolinke, we added early stopping as a callable. Right now we have lightgbm>=2.2.1, can you tell me since which version the callable option works, so we can update the deps accordingly?

"name": "stderr",
"output_type": "stream",
"text": [
"/home/u/anaconda/envs/recommenders/lib/python3.9/site-packages/lightgbm/engine.py:181: UserWarning: 'early_stopping_rounds' argument is deprecated and will be removed in a future release of LightGBM. Pass 'early_stopping()' callback via 'callbacks' argument instead.\n",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked that the code works with LightGBM 2.2.1 https://github.com/microsoft/LightGBM/blob/v2.2.1/python-package/lightgbm/callback.py. We can leave the dependency untouched

@miguelgfierro miguelgfierro merged commit 423c2a7 into staging Aug 18, 2023
29 checks passed
@miguelgfierro miguelgfierro deleted the bug/lgb4 branch August 18, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants