Skip to content

Commit 20fa9ef

Browse files
committed
update
1 parent edc88bd commit 20fa9ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lightning/pytorch/callbacks/progress/rich_progress.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,6 @@ def _add_task(self, total_batches: Union[int, float], description: str, visible:
448448
)
449449

450450
def _initialize_progress_bar_id(self) -> None:
451-
if self.is_disabled:
452-
return
453451
total_batches = self.total_train_batches
454452
train_description = self._get_train_description(self.trainer.current_epoch)
455453
self.train_progress_bar_id = self._add_task(total_batches, train_description)
@@ -538,7 +536,7 @@ def on_train_batch_end(
538536
batch: Any,
539537
batch_idx: int,
540538
) -> None:
541-
if self.train_progress_bar_id is None:
539+
if self.train_progress_bar_id is None and not self.is_disabled:
542540
# can happen when resuming from a mid-epoch restart
543541
self._initialize_progress_bar_id()
544542
self._update(self.train_progress_bar_id, batch_idx + 1)

0 commit comments

Comments
 (0)