From 3256fe4e5a405db1ab00d4cf4d48cbbfc7730959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Biernat?= Date: Fri, 19 Jun 2020 19:47:39 +0000 Subject: [PATCH] Update progress.py (#2268) Fixes a minor bug introduced in #2213 --- pytorch_lightning/callbacks/progress.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytorch_lightning/callbacks/progress.py b/pytorch_lightning/callbacks/progress.py index df4152dd36..715650228c 100644 --- a/pytorch_lightning/callbacks/progress.py +++ b/pytorch_lightning/callbacks/progress.py @@ -97,8 +97,7 @@ class ProgressBarBase(Callback): 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