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

Implement training observer. #5088

Merged
merged 1 commit into from
Dec 5, 2019
Merged

Implement training observer. #5088

merged 1 commit into from
Dec 5, 2019

Conversation

trivialfis
Copy link
Member

Closes #4837 Small part of #4732 .

@hcho3
Copy link
Collaborator

hcho3 commented Dec 4, 2019

This is going to be quite useful for developers who want to implement new objectives and metrics. Thanks!

@trivialfis
Copy link
Member Author

Please note that as a small part of JSON PR, you can't use this right now as the observer uses JSON for dumping tree model and XGBoost parameter.

Copy link
Member

@RAMitchell RAMitchell left a comment

Choose a reason for hiding this comment

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

I haven't really used something like this myself, what is the benefit over watching variables with a debugger?

@hcho3
Copy link
Collaborator

hcho3 commented Dec 5, 2019

@RAMitchell Recently I have been working to add a new objective, and often I would find it useful to print out intermediate variables like gradients. The benefit is that you get trace of a variable while training is proceeding as usual. Also see #4837.

@trivialfis trivialfis merged commit f5e13dc into dmlc:master Dec 5, 2019
@trivialfis trivialfis deleted the observer branch December 5, 2019 06:14
@trivialfis
Copy link
Member Author

@hcho3 If you use the observer, you don't have to enable the cmake flag and recompile the whole world, just change this particular file. The CMake flag is mostly for new comer.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Callback interface for logging internal information, to aid debugging
3 participants