Skip to content

Commit 98fcf1e

Browse files
borcherorohitgr7carmocca
authored andcommitted
Suppress Warning in PredictionEpochLoop (#11189)
Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
1 parent 1f32923 commit 98fcf1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytorch_lightning/loops/epoch/prediction_epoch_loop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ def on_run_start(
6868
void(dataloader_iter, dataloader_idx)
6969
self._dl_max_batches = dl_max_batches
7070
self._num_dataloaders = num_dataloaders
71-
self._seen_batch_indices = self._get_batch_indices(dataloader_idx)
7271
self.return_predictions = return_predictions
72+
# this call requires that `self.return_predictions` is set
73+
self._seen_batch_indices = self._get_batch_indices(dataloader_idx)
7374

7475
def advance(
7576
self,

0 commit comments

Comments
 (0)