-
Notifications
You must be signed in to change notification settings - Fork 940
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
GCM auto assignment now returns a summary object #1049
Conversation
c77a1ae
to
96e6ff0
Compare
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.
My recommendation would be to use the global logger directly in functions where you need verbosity, and control the verbosity of the logger instead from the argument. Example that leverages a decorator to modify log level in a function where you need verbosity:
First, I will set the default log level to DEBUG.
@set_log_verbosity
def my_func(arg1, kwarg1=v1, verbosity=False):
log.info('my verbose message')
Here the set_log_verbosity
decorator function will modify the log level to INFO if verbosity is set to True, return the wrapped function, and reset the verbosity to DEBUG again.
The problem is, I want that these messages appear by default and not if a user sets a logger (which 99% of users probably won't). On the other hand, I also don't want to give it out as a print message, i.e., I set the loggign level to info and only add the messages if Do you have another suggestions where a user does not need to put in additional work to get these insights? |
This is what I mean roughly (there is of course a wiggle room for how to want to parse the
|
96e6ff0
to
076aa77
Compare
I revised the logic and the auto assignment now returns a summary object instead which the user can print. This is also helpful to have a more programmatic access to the evaluated models and their performances. |
076aa77
to
9814e41
Compare
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.
Unit tests are missing for the change.
The summary object contains information about the evaluated models and model choices. This object is printable to provide quick summary. Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
9814e41
to
1540584
Compare
The summary object contains information about the evaluated models and model choices. This object is printable to provide quick summary.