-
-
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
Unify logging facilities. #3982
Conversation
One motivation is to honor the parameter |
Codecov Report
@@ Coverage Diff @@
## master #3982 +/- ##
===========================================
+ Coverage 56.35% 56.55% +0.2%
Complexity 205 205
===========================================
Files 186 187 +1
Lines 14771 14824 +53
Branches 498 498
===========================================
+ Hits 8324 8384 +60
+ Misses 6208 6201 -7
Partials 239 239
Continue to review full report at Codecov.
|
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.
Are the changes in CLI main necessary? It will be very difficult to review and prove its correctness as I don't think we even have tests for this.
Please check the monitor class log statement is the correct type.
I think there is a change in behaviour here, before if I set debug_verbose = 1 I would get the timing information for gpu_hist and hist. Now I would have to set this at 2 to get the same information, is this correct?
@RAMitchell Thanks for the review. The Yes, separated test for cli should be added. |
* Enhance `ConsoleLogger` to handle different verbosity. * Override macros from `dmlc`. * Don't use specialized gamma when building with GPU.
1f491eb
to
69e0024
Compare
I stripped the changes in CLI into minimum. Tests for CLI will be postponed for another PR. |
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.
Thank you for improving the logging system. I like how you can set the warning level uniformly across all the program. Good job.
@@ -68,13 +119,34 @@ class LogCallbackRegistry { | |||
|
|||
using LogCallbackRegistryStore = dmlc::ThreadLocalStore<LogCallbackRegistry>; | |||
|
|||
// Redefines LOG_WARNING for controling verbosity | |||
#if defined(LOG_WARNING) | |||
#undef LOG_WARNING |
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.
This is perfectly fine for now, but in the long term, we should port this improvement to DMLC-Core, so that we can get fine-grained warning level for all projects using DMLC-Core.
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 have some fears of changing dmlc-core
. I looked at tvm
and treelite
a few times, but that's all. So when the port is needed, please let me know, I will need some help. :)
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.
It would be useful to begin discussion for better logging system in TVM and MXNet. Already, there is a talk of better error handling: apache/tvm#2279.
@hetong007 @khotilov Could you please help taking a look and deprecating |
@CodingCat I'm deprecating the |
ConsoleLogger
to handle different verbosity.dmlc
.This is an attempt to unify some parameters, specifically
debug_verbose
andsilent
picked up from various places. If the method is approved, we can move on to some more dangerous and messy parameters liken_gpus
andgpu_id
.