enable fast_dev_run without a validation loop (#1779)

* fix val dataloader

* Update evaluation_loop.py
This commit is contained in:
William Falcon
2020-05-11 11:30:22 -04:00
committed by GitHub
parent 88c086bbd2
commit eeb411144f
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ class ProgressBarBase(Callback):
"""
trainer = self.trainer
total_val_batches = 0
if trainer.fast_dev_run:
if trainer.fast_dev_run and trainer.val_dataloaders is not None:
total_val_batches = len(trainer.val_dataloaders)
elif not self.trainer.disable_validation:
is_val_epoch = (trainer.current_epoch + 1) % trainer.check_val_every_n_epoch == 0