We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 087c752 commit b1d45bbCopy full SHA for b1d45bb
src/lightning/pytorch/callbacks/progress/progress_bar.py
@@ -85,11 +85,7 @@ def total_train_batches(self) -> Union[int, float]:
85
dataloader is of infinite size.
86
87
"""
88
- if (
89
- self.trainer.max_epochs == -1
90
- and self.trainer.max_steps is not None
91
- and self.trainer.max_steps > 0
92
- ):
+ if self.trainer.max_epochs == -1 and self.trainer.max_steps is not None and self.trainer.max_steps > 0:
93
remaining_steps = self.trainer.max_steps - self.trainer.global_step
94
return min(self.trainer.num_training_batches, remaining_steps)
95
return self.trainer.num_training_batches
0 commit comments