-
-
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
[Guideline] Training API Enhancement and Refactor: Use Callbacks #892
Comments
@terrytangyuan @hetong007 @CodingCat please reply to discuss the API you like and see if you would like to add the callback and do the refactoring for part of language bindings(python/R/jvm) |
Is "Adapt learning rate during training" independent from this change? I think it is more related to |
is there any restriction on the signature of the callbacks? or shall we distinguish between the pre-iteration and post-iteration callback, i.e. where to put the following lines for callback in callbacks:
callback(i, bst, evaluation_results) |
@hetong007 learning rate change can be done by setting parameters in post iteration, i.e. call bst.set_param in callback |
@CodingCat This is an proposal. Most of the application so far seems to be post iteration callback. So we can use post iteration for now. But it might be interesting explicit |
@tqchen Yeah the API evolved a lot and became complicated. I'll look into this for Python package when I get a chance. I got quite busy recently so if anyone wants to do it, you are very welcomed to do it! |
Add callback API to python in #1211 |
The callback API for python is checkin in #1211 I am looking for volunteers to contribute the R counterpart. Please reply if you want to do this @hetong007 @khotilov |
I will look into it. @khotilov You are also welcome to do that. |
I'll give it some time this weekend. |
@tqchen Awesome. Looks great! |
I've coded all the R callbacks and xgb.train but didn't finish debugging yet. |
@khotilov souds good. let us know when it is ready. Note that R can directly pass Environments, so as long as the variable naming is proper, it is even more powerful than python |
@tqchen: yes, that was the mechanism I was exploiting. BTW, even though it's possible in R to throw and catch a specific exception Also I've added a finalizer type of callbacks in addition to pre- and On Mon, May 23, 2016 at 11:23 AM, Tianqi Chen [email protected]
|
|
There has been series of changes to enhance the training and cross validation API in python/R, example of these changes include:
Currently, each of these proposals involves an API change on core training API. One argument need to be added to each of these requirements. We need to use a better way to handle these issues, otherwise the training API will become extremely hard to maintain.
Use Callbacks to Handle These Cases
TODO List
early_stop_maximize
to the callback list in the beginning of functionThe text was updated successfully, but these errors were encountered: