Skip to content

Commit

Permalink
Avoid an if/else in ProgressBar
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Mocholí <[email protected]>
  • Loading branch information
EliaCereda and carmocca committed Nov 18, 2020
1 parent 99a6161 commit 307c89a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/callbacks/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def init_validation_tqdm(self) -> tqdm:
""" Override this to customize the tqdm bar for validation. """

# The main progress bar doesn't exist in trainer.validate(...)
has_main_bar = 1 if self.main_progress_bar is not None else 0
has_main_bar = int(self.main_progress_bar is not None)

bar = tqdm(
desc='Validating',
Expand Down

0 comments on commit 307c89a

Please sign in to comment.