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)