Skip to content

Commit d375e2a

Browse files
committed
fix list size
1 parent e1e9680 commit d375e2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_lightning/trainer/trainer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ def run_pretrain_routine(self, model: LightningModule):
10701070

10711071
num_loaders = len(self.val_dataloaders)
10721072
max_batches = [self.num_sanity_val_steps] * num_loaders
1073-
max_batches = [float('inf') for m in max_batches if m == -1]
1073+
max_batches = [float('inf') if m == -1 else m for m in max_batches]
10741074
eval_results = self._evaluate(model,
10751075
self.val_dataloaders,
10761076
max_batches,

0 commit comments

Comments
 (0)