diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index baf5dea4..95c05335 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -10,9 +10,10 @@ __homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' __docs__ = "PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers." \ " Scale your models. Write less boilerplate." -from logging import getLogger +import logging as python_logging -_logger = getLogger("lightning") +_logger = python_logging.getLogger("lightning") +python_logging.basicConfig(level=python_logging.INFO) try: # This variable is injected in the __builtins__ by the build diff --git a/tests/test_profiler.py b/tests/test_profiler.py index 43fa72df..eae80bd6 100644 --- a/tests/test_profiler.py +++ b/tests/test_profiler.py @@ -74,10 +74,12 @@ def test_simple_profiler_overhead(simple_profiler, n_iter=5): assert all(durations < PROFILER_OVERHEAD_MAX_TOLERANCE) -def test_simple_profiler_describe(simple_profiler): +def test_simple_profiler_describe(caplog, simple_profiler): """Ensure the profiler won't fail when reporting the summary.""" simple_profiler.describe() + assert "Profiler Report" in caplog.text + def test_simple_profiler_value_errors(simple_profiler): """Ensure errors are raised where expected."""