Fix interfering logs in pipelines

This commit is contained in:
Alex Burlacu 2023-04-06 16:31:21 +03:00
parent a60df1382d
commit b3809403e3

View File

@ -90,7 +90,7 @@ class Logger(object):
if self._connect_logging: if self._connect_logging:
StdStreamPatch.patch_logging_formatter(self) StdStreamPatch.patch_logging_formatter(self)
elif not self._connect_std_streams: elif not self._connect_std_streams and self._task.is_main_task():
# make sure that at least the main clearml logger is connect # make sure that at least the main clearml logger is connect
base_logger = LoggerRoot.get_base_logger() base_logger = LoggerRoot.get_base_logger()
if base_logger and base_logger.handlers: if base_logger and base_logger.handlers: