-
Notifications
You must be signed in to change notification settings - Fork 2.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
Logging update #267
Logging update #267
Conversation
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
Signed-off-by: Jason <[email protected]>
6fa0817
to
9f83e1a
Compare
This pull request fixes 4 alerts when merging 9f83e1a into 2bb07bc - view on LGTM.com fixed alerts:
|
collections/nemo_nlp/nemo_nlp/data/datasets/token_classification.py
Outdated
Show resolved
Hide resolved
collections/nemo_nlp/nemo_nlp/data/datasets/token_classification.py
Outdated
Show resolved
Hide resolved
collections/nemo_nlp/nemo_nlp/data/datasets/token_classification.py
Outdated
Show resolved
Hide resolved
collections/nemo_nlp/nemo_nlp/utils/callbacks/sentence_classification.py
Show resolved
Hide resolved
return get_logger('') | ||
else: | ||
return self.action.logger | ||
warnings.warn("This will be deprecated in future releases. Please use " |
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.
👍
@@ -805,7 +800,9 @@ def optim_level(self): | |||
|
|||
@property | |||
def logger(self): | |||
return self._exp_manager.logger | |||
warnings.warn("This will be deprecated in future releases. Please use " |
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.
hmmmm, we had that definition already in callbacks.py...
anyway, we will get rid both of them soon, so not really important ;)
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.
Hey @blisc thanks for taking care of that, great job!
My only comments are that some of those could be changed to debug/warnings. I have indicated all the places where I think it should be done.
@okuchaiev if you think those changes are out of the scope please say so...
Signed-off-by: Jason <[email protected]>
This pull request introduces 1 alert and fixes 5 when merging 0200c9e into bcc94a8 - view on LGTM.com new alerts:
fixed alerts:
|
Remove redundancy
Updated as of PR #311:
Updates the our use of get_logger such that it now defaults to logging.getLogger("nemo_logger") instead of logging.getLogger('')
Updates the our use of get_logger such that it now defaults to logging.getLogger("nemo") instead of logging.getLogger('')Adds the package level variable nemo.logging which can and should be used in place of neuralFactory.logger
Users should use this logger by adding the following line to their code:
from nemo import logging
and then use the logger as per usual, eglogging.info("Message")
Default verbosity is set at INFO for process 0
Logger files are still automatically created when neural factory is initialized
The logging formatted was changed to include file and line number that generated the message