Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/lightning/pytorch/loops/prediction_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ def _predict_step(

self.batch_progress.increment_ready()

if not using_dataloader_iter:
any_on_epoch = self._store_data_for_prediction_writer(batch_idx, dataloader_idx)
any_on_epoch = (
self._store_data_for_prediction_writer(batch_idx, dataloader_idx) if not using_dataloader_iter else False
)

# the `_step` methods don't take a batch_idx when `dataloader_iter` is used, but all other hooks still do,
# so we need different kwargs
Expand Down
Loading