Skip to content

Commit

Permalink
mute verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 31, 2020
1 parent 987df24 commit a17f217
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pytorch_lightning/profiler/profilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def __init__(self, output_filename: str = None):
self.output_fname = output_filename
self.output_file = open(self.output_fname, 'w') if self.output_fname else None

streaming_out = [log.info]
if self.output_file:
streaming_out.append(self.output_file.write)
streaming_out = [self.output_file.write] if self.output_file else [log.info]
super().__init__(output_streams=streaming_out)

def start(self, action_name: str) -> None:
Expand Down Expand Up @@ -186,9 +184,7 @@ def __init__(self, output_filename: str = None, line_count_restriction: float =
self.output_fname = output_filename
self.output_file = open(self.output_fname, 'w') if self.output_fname else None

streaming_out = [log.info]
if self.output_file:
streaming_out.append(self.output_file.write)
streaming_out = [self.output_file.write] if self.output_file else [log.info]
super().__init__(output_streams=streaming_out)

def start(self, action_name: str) -> None:
Expand Down

0 comments on commit a17f217

Please sign in to comment.