-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Rework Python callback functions. #6199
Conversation
@trivialfis Is this ready for review? Do you want me to review this? |
@hcho3 I ran some of the tests locally. Feel free to review once the CI is green. |
CI might fail due to a Conda issue. Related: https://xgboost-ci.net/blue/organizations/jenkins/xgboost/detail/PR-6198/1/pipeline |
Codecov Report
@@ Coverage Diff @@
## master #6199 +/- ##
==========================================
+ Coverage 78.93% 79.75% +0.82%
==========================================
Files 12 12
Lines 3104 3359 +255
==========================================
+ Hits 2450 2679 +229
- Misses 654 680 +26
Continue to review full report at Codecov.
|
Note to myself: Maybe add a hook for customizable allreduce. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this reorganisation. Nice to see checkpointing as a callback, and very nice demo with the plot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just added very trivial typo suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This pull request is a great testament to the power of good abstractions in programming. Some minor comments follow:
cc1ec18
to
2316f8a
Compare
@terrytangyuan @RAMitchell @JohnZed @hcho3 Thanks for the review! |
Codecov Report
@@ Coverage Diff @@
## master #6199 +/- ##
==========================================
+ Coverage 78.93% 80.24% +1.31%
==========================================
Files 12 12
Lines 3104 3362 +258
==========================================
+ Hits 2450 2698 +248
- Misses 654 664 +10
Continue to review full report at Codecov.
|
This PR adds a new callback function interface for Python, also a new type of callback for checkpointing is added.
Please see documentation and demo for details. I added a demo for plotting animated evaluation scores, try it out. ;-)
Related #5612 I haven't made the parameter to dask. The PR is already huge as it is.
Related #3822 this is only for Python. Other language bindings are not supported.
Close #4955
Close #5495 now we can use early stopping on dask.