Skip to content

Commit

Permalink
Update progress.py
Browse files Browse the repository at this point in the history
Fixes a minor bug introduced in #2213
  • Loading branch information
pwl authored and Borda committed Jun 19, 2020
1 parent 54acc79 commit ca7a4b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pytorch_lightning/callbacks/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ def total_val_batches(self) -> int:
total_val_batches = len(trainer.val_dataloaders)
elif not self.trainer.disable_validation:
is_val_epoch = trainer.current_epoch % trainer.check_val_every_n_epoch == 0
total_val_batches = trainer.num_val_batches if is_val_epoch else 0
total_val_batches = sum(total_val_batches)
total_val_batches = sum(trainer.num_val_batches) if is_val_epoch else 0
return total_val_batches

@property
Expand Down

0 comments on commit ca7a4b0

Please sign in to comment.