-
Notifications
You must be signed in to change notification settings - Fork 895
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
Remove the warnings upfront when importing the light-weight versions #927
Comments
Hi @aaronsl-hku, we would really like to help you resolve this issue. At the same time, we think that it is important to inform our users about missing modules. Therefore we would suggest giving you the option to opt-out of those warnings. Would it be possible for you to set an environment variable such as |
@martinb-bb WDYT of this solution? |
Hello @brunnedu . Nice to receive your reply. We might have some misunderstanding here: I am not looking into disable all warnings as a whole. What I am proposing is not to hardcode the handler and formatter into the Long story short, if my project has a logging config and the formatting is not the same darts, my log would be easily screwed by the hardcoded formatter. May I know if there is any particular reason not to use the standard logging.get_logger as-is?
|
I think this could work. Being able to handle logging like the traditional python logger would be fine...or even a flag would be great. @hrzn Please let me know when this change is pushed so I can test on our terminal 😄 |
Thanks for your suggestions, everyone! I just added another commit: ad7a404 |
Is your feature request related to a current problem? Please describe.
Yes. Currently using the "u8darts[torch]" version (for all the chaos for installing prophet but that's another story), every time I run my program with darts imported, I would received the warnings from darts.models.init.py.
It would not be a problem if the logger is instantiated directly from
logging
module, but with levels, format andaddHandler
hardcoded indarts.logging.get_logger()
there's basically nothing I can do.Describe proposed solution
The best solution would be completely replace the
darts.logging.get_logger()
function with standardlogging.getLogger()
(unless there're any very special reasons).Describe potential alternatives
NullHandler
as mentioned hereThe text was updated successfully, but these errors were encountered: