Skip to content

Commit 3256fe4

Browse files
authored
Update progress.py (#2268)
Fixes a minor bug introduced in #2213
1 parent e0b7fed commit 3256fe4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pytorch_lightning/callbacks/progress.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def total_val_batches(self) -> int:
9797
total_val_batches = len(trainer.val_dataloaders)
9898
elif not self.trainer.disable_validation:
9999
is_val_epoch = trainer.current_epoch % trainer.check_val_every_n_epoch == 0
100-
total_val_batches = trainer.num_val_batches if is_val_epoch else 0
101-
total_val_batches = sum(total_val_batches)
100+
total_val_batches = sum(trainer.num_val_batches) if is_val_epoch else 0
102101
return total_val_batches
103102

104103
@property

0 commit comments

Comments
 (0)