-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Do not configure python logging #1503
Comments
I agree. Logging configuration should be disabled by default. We could still set up the logging configuration manually just after importing PL. |
we had the discussion here #1267 (comment) @jeremyjordan ^^ |
Hmm... ok. In that case, could I potentially suggest that the call to
|
@hadim isn't that what we do now? we configure logging when pytorch-lightning is imported
@rmrao i'm not sure this would help you since we import however, if you configure logging as you wish in your project's root tagging @williamFalcon since we had this discussion here already. would prefer not to keep going back and forth on how we configure logging for the project. |
now it sets the level for all logging not just for this lightning logger, that is what I was talking before... |
just doing something like
doesn't actually set up a handler to send the log messages. however, we could just simply add a line to configure a stream handler
|
@jeremyjordan my suggestion is actually to put |
@rmrao ah i see, i misunderstood your suggestion. i think that's a fine solution |
I was having problems because of this. It would duplicate my log messages. I understand this will be solved soon, but in case anyone has the same problem, this is how I circumvented it. When first defining the root logger, I do:
(logging is the python logging package, not pl's) |
same here, how do I use a |
* Disable hydra logging auto-configuration * Add logging pretty printing * Force logging configuration before pytorch lightning See Lightning-AI/pytorch-lightning#1503 * Enable exceptions pretty printing
🐛 Bug
pytorch-lightning right now configures the python logging module (here). This is generally not recommended when writing a library as it makes it difficult for users to modify logging format (see python docs, Stack Overflow post). I would suggest deleting the configuration line.
The text was updated successfully, but these errors were encountered: