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
@@ -360,6 +360,10 @@ class TrainerEvaluationLoopMixin(ABC):
dataloaders = self.val_dataloaders
max_batches = self.num_val_batches
# enable fast_dev_run without val loop
if dataloaders is None:
return
# cap max batches to 1 when using fast_dev_run
if self.fast_dev_run:
max_batches = 1