-
Notifications
You must be signed in to change notification settings - Fork 657
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
Setting ClearML package log level #741
Comments
Hi @fjean, did you try setting it before or after importing clearml? |
I tried before and after importing clearml, and still the messages show up. Here is some code to test the issue: import logging
from clearml import Task
logging.basicConfig(
level=logging.INFO,
format= '[%(asctime)s] %(levelname)s - %(message)s',
datefmt='%H:%M:%S'
)
logging.getLogger("clearml").setLevel(logging.WARNING)
# Show root logger
print(logging.getLogger())
# Show ClearML logger
print(logging.getLogger("clearml"))
logging.debug("Debug message")
logging.info("Info message")
task = Task.init(
project_name="testclearml",
task_name="Test task",
task_type=Task.TaskTypes.training,
) The output is:
|
So clearml re-configures the logging, and probably overrides your settings. Take a look at the clearml default logging settings These settings can be overridden in your
This entire structure is fed into Python's |
I have tried putting
at the end of the clearml.conf file, it didn't work; I also tried this inside the sdk section of the file, didn't work either. I also tried the following (inside and also outside of the sdk section of the file), and it didn't work either:
|
Can you try overriding everything, like so:
As a top-level entry in the clearml.conf file? |
Unfortunately it still shows the messages |
When However, the clearml log level goes back to |
Any idea what could cause the log level to revert back to INFO before the end of the call to |
Hi @fjean, That indeed seems like a bug...I'll check internally! |
@erezalg Indeed calling |
@erezalg Would it be possible to set the log level before calling |
Hi @idanab1010, We should fix the issue where Task.init() overrides the config. Then you'll be able to use clearml.conf to specify log level for agents. |
@fjean the logger default level can now be changed in the new release 1.8.1. If you have any questions or feedback, feel free to let us know! |
Closing this issue. Please reopen if it's still relevant. |
I could not find a way to control the verbosity of the messages that are logged by ClearML (I'm talking about it's own messages, e.g.
clearml.Task - INFO - No repository found, storing script code instead
). It doesn't seem to be possible to do this in the standard way where the log level of any Python package can be changed by getting the package's root logger, i.e.Is there a way to control ClearML log level, or to deactivate any logging from the ClearML package (unless it's a warning or an error)?
The text was updated successfully, but these errors were encountered: