-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
🐛 Bug description
The ignite.distributed
auto functions such as ignite.distributed.auto_dataloader
use setup_logger
to get a logging.Logger
instance. However, this function always sets the logging level to logging.INFO
and furthermore removes ands sets up the logging handlers. Functions should not be setting up a logger object if it is already initialized such that user code can specify a different log level, handlers, or log message format string in their code (e.g., main function).
See for example:
ignite/ignite/distributed/auto.py
Line 67 in 6d490c8
logger = setup_logger(__name__ + ".auto_dataloader") ignite/ignite/distributed/launcher.py
Line 201 in 6d490c8
self.logger = setup_logger(__name__ + "." + self.__class__.__name__, distributed_rank=0)
Note that in case of ignite.distributed.launcher.Parallel
one can modify the self.logger
instance, but this logger already prints messages right after setup_logger
in its __init__
function, hence, making it impossible to adjust the log level, format, or handlers for these first messages also.
Environment
- PyTorch Version (e.g., 1.4):
- Ignite Version (e.g., 0.3.0):
- OS (e.g., Linux):
- How you installed Ignite (
conda
,pip
, source): - Python version:
- Any other relevant information: