Skip to content

Commit 41932ec

Browse files
committed
typing
1 parent 0890b9b commit 41932ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/callbacks/throughput_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _update(self, trainer: "Trainer", pl_module: "LightningModule", batch: Any,
140140
# this assumes that all iterations used the same batch size
141141
samples=iter_num * batch_size,
142142
lengths=None if self.length_fn is None else self._lengths[stage],
143-
flops=flops_per_batch,
143+
flops=int(flops_per_batch) if flops_per_batch is not None else None,
144144
)
145145

146146
def _compute(self, trainer: "Trainer", iter_num: Optional[int] = None) -> None:

0 commit comments

Comments
 (0)