-
Notifications
You must be signed in to change notification settings - Fork 857
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
Fixing log issue for Label Model #1652
Conversation
@bhancock8, I have made the discussed changes. But, the pipeline is failing at the build stage for python3.6, as the tox command does not complete in 15 minutes Travis wait time. Can you please suggest a way forward for this? Thank you. |
@@ -622,6 +622,8 @@ def _execute_logging(self, loss: torch.Tensor) -> Metrics: | |||
|
|||
def _set_logger(self) -> None: | |||
self.logger = Logger(self.train_config.log_freq) | |||
if self.config.verbose: | |||
logging.basicConfig(level=logging.INFO) |
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 appears to be changing the default logging the logging module, not for this specific class's logger. Can you modify just the logging level of self.logger instead?
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 did consider this. But, the logging has been implemented throughout the code at the root level. The logging inside fit()
of LabelModel
and log()
of Logger
are using module level logging function logging.info()
. Therefore all the logs are generated by root level logger and the only way to set log level for LabelModel
specifically is to change the CustomeLogger
significantly. However, I don't think that is necessary. Even if I change the root logger level to INFO
, it would not interfere with the logging flow. Because, before creating an INFO
level log, there will always be a check for the verbose parameter.
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 see. Alright, this looks good to me then!
Thanks for the PR! We'll take a look into why the Python 3.6 unit tests are getting stuck, as it appears to be unrelated to this PR. |
Thanks @bhancock8, please merge the PR as well, because I don't have write access. |
Yep! I'll make sure this gets merged once the unit test build issue is resolved. Thanks @anerirana! |
Description of proposed changes
Changing log level to
INFO
when verbose is set toTrue
inLabelModel.fit()
Related issue(s)
Fixes #1638
Test plan
No new test cases are required
Checklist
Need help on these? Just ask!
tox -e complex
and/ortox -e spark
if appropriate.