fix logging config and add profiler test (#1267)
This commit is contained in:
parent
dab3b965cb
commit
54507f417e
|
@ -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
|
||||
|
|
|
@ -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."""
|
||||
|
|
Loading…
Reference in New Issue