Skip to content

Commit 707f1c0

Browse files
authored
Merge branch 'master' into master
2 parents 2a3f49d + 95ad9c2 commit 707f1c0

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

.github/workflows/call-clear-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
cron-clear:
2525
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
26-
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.3
26+
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.15.0
2727
with:
2828
scripts-ref: v0.14.3
2929
dry-run: ${{ github.event_name == 'pull_request' }}
@@ -32,7 +32,7 @@ jobs:
3232

3333
direct-clear:
3434
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
35-
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.3
35+
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.15.0
3636
with:
3737
scripts-ref: v0.14.3
3838
dry-run: ${{ github.event_name == 'pull_request' }}

.github/workflows/ci-schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
check:
11-
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.14.3
11+
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.15.0
1212
with:
1313
# skip azure due to the wrong schema file by MSFT
1414
# https://github.com/Lightning-AI/lightning-flash/pull/1455#issuecomment-1244793607

requirements/pytorch/extra.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ matplotlib>3.1, <3.10.0
66
omegaconf >=2.2.3, <2.4.0
77
hydra-core >=1.2.0, <1.4.0
88
jsonargparse[signatures,jsonnet] >=4.39.0, <4.41.0
9-
rich >=12.3.0, <14.1.0
9+
rich >=12.3.0, <14.2.0
1010
tensorboardX >=2.2, <2.7.0 # min version is set by torch.onnx missing attribute
1111
bitsandbytes >=0.45.2,<0.47.0; platform_system != "Darwin"

src/lightning/pytorch/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
2525

2626
### Fixed
2727

28-
-
28+
- fix progress bar console clearing for Rich `14.1+` ([#21016](https://github.com/Lightning-AI/pytorch-lightning/pull/21016))
2929

3030

3131
---

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,19 @@ def _init_progress(self, trainer: "pl.Trainer") -> None:
331331
self._reset_progress_bar_ids()
332332
reconfigure(**self._console_kwargs)
333333
self._console = get_console()
334-
self._console.clear_live()
334+
335+
# Compatibility shim for Rich >= 14.1.0:
336+
if hasattr(self._console, "_live_stack"):
337+
# In recent Rich releases, the internal `_live` variable was replaced with `_live_stack` (a list)
338+
# to support nested Live displays. This broke our original call to `clear_live()`,
339+
# because it now only pops one Live instance instead of clearing them all.
340+
# We check for `_live_stack` and clear it manually for compatibility across
341+
# both old and new Rich versions.
342+
if len(self._console._live_stack) > 0:
343+
self._console.clear_live()
344+
else:
345+
self._console.clear_live()
346+
335347
self._metric_component = MetricsTextColumn(
336348
trainer,
337349
self.theme.metrics,

0 commit comments

Comments
 (0)