Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use print for INFO and lower levels summarize() #580

Merged
merged 5 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pytorch_lightning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
from .trainer.trainer import Trainer
from .core.lightning import LightningModule
from .core.decorators import data_loader
import logging

__all__ = [
'Trainer',
'LightningModule',
'data_loader',
]
logging.basicConfig(level=logging.INFO)
2 changes: 1 addition & 1 deletion pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ def load_from_checkpoint(cls, checkpoint_path):

def summarize(self, mode):
model_summary = ModelSummary(self, mode=mode)
logging.info(model_summary)
logging.info('\n' + model_summary.__str__())

def freeze(self):
"""Freeze all params for inference
Expand Down
3 changes: 0 additions & 3 deletions pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ def __init__(self,
self.amp_level = amp_level
self.init_amp(use_amp)

# set logging options
logging.basicConfig(level=logging.INFO)

@property
def slurm_job_id(self):
try:
Expand Down