drop logging level (#1015)
This commit is contained in:
parent
2a04be0386
commit
04c9eb49d0
|
@ -24,9 +24,6 @@ if __LIGHTNING_SETUP__:
|
||||||
# We are not importing the rest of the scikit during the build
|
# We are not importing the rest of the scikit during the build
|
||||||
# process, as it may not be compiled yet
|
# process, as it may not be compiled yet
|
||||||
else:
|
else:
|
||||||
import logging as log
|
|
||||||
log.basicConfig(level=log.INFO)
|
|
||||||
|
|
||||||
from .core import data_loader, LightningModule
|
from .core import data_loader, LightningModule
|
||||||
from .trainer import Trainer
|
from .trainer import Trainer
|
||||||
from .callbacks import Callback
|
from .callbacks import Callback
|
||||||
|
|
|
@ -6,9 +6,7 @@ import cProfile
|
||||||
import pstats
|
import pstats
|
||||||
import io
|
import io
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
import logging
|
import logging as log
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class BaseProfiler(ABC):
|
class BaseProfiler(ABC):
|
||||||
|
@ -124,7 +122,7 @@ class Profiler(BaseProfiler):
|
||||||
action, f"{np.mean(durations):.5}", f"{np.sum(durations):.5}",
|
action, f"{np.mean(durations):.5}", f"{np.sum(durations):.5}",
|
||||||
)
|
)
|
||||||
output_string += "\n"
|
output_string += "\n"
|
||||||
logger.info(output_string)
|
log.info(output_string)
|
||||||
|
|
||||||
|
|
||||||
class AdvancedProfiler(BaseProfiler):
|
class AdvancedProfiler(BaseProfiler):
|
||||||
|
@ -177,4 +175,4 @@ class AdvancedProfiler(BaseProfiler):
|
||||||
output_string = "\nProfiler Report\n"
|
output_string = "\nProfiler Report\n"
|
||||||
for action, stats in self.recorded_stats.items():
|
for action, stats in self.recorded_stats.items():
|
||||||
output_string += f"\nProfile stats for: {action}\n{stats}"
|
output_string += f"\nProfile stats for: {action}\n{stats}"
|
||||||
logger.info(output_string)
|
log.info(output_string)
|
||||||
|
|
Loading…
Reference in New Issue