From 04c9eb49d0dc0a5034e0a0efa3a0b50115d53af9 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 3 Mar 2020 02:30:16 +0100 Subject: [PATCH] drop logging level (#1015) --- pytorch_lightning/__init__.py | 3 --- pytorch_lightning/profiler/profiler.py | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index f785766193..9ff1ba30d1 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -24,9 +24,6 @@ if __LIGHTNING_SETUP__: # We are not importing the rest of the scikit during the build # process, as it may not be compiled yet else: - import logging as log - log.basicConfig(level=log.INFO) - from .core import data_loader, LightningModule from .trainer import Trainer from .callbacks import Callback diff --git a/pytorch_lightning/profiler/profiler.py b/pytorch_lightning/profiler/profiler.py index ffecba5dff..e7b9892525 100644 --- a/pytorch_lightning/profiler/profiler.py +++ b/pytorch_lightning/profiler/profiler.py @@ -6,9 +6,7 @@ import cProfile import pstats import io from abc import ABC, abstractmethod -import logging - -logger = logging.getLogger(__name__) +import logging as log class BaseProfiler(ABC): @@ -124,7 +122,7 @@ class Profiler(BaseProfiler): action, f"{np.mean(durations):.5}", f"{np.sum(durations):.5}", ) output_string += "\n" - logger.info(output_string) + log.info(output_string) class AdvancedProfiler(BaseProfiler): @@ -177,4 +175,4 @@ class AdvancedProfiler(BaseProfiler): output_string = "\nProfiler Report\n" for action, stats in self.recorded_stats.items(): output_string += f"\nProfile stats for: {action}\n{stats}" - logger.info(output_string) + log.info(output_string)