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. |
RAMitchell
left a comment
There was a problem hiding this comment.
I like this reorganisation. Nice to see checkpointing as a callback, and very nice demo with the plot!
JohnZed
left a comment
There was a problem hiding this comment.
Looks good! Just added very trivial typo suggestion
hcho3
left a comment
There was a problem hiding this comment.
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.