File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
src/lightning/pytorch/callbacks/progress Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -333,13 +333,14 @@ def _init_progress(self, trainer: "pl.Trainer") -> None:
333333 self ._console = get_console ()
334334
335335 # Compatibility shim for Rich >= 14.1.0:
336- # In recent Rich releases, the internal `_live` variable was replaced with `_live_stack` (a list)
337- # to support nested Live displays. This broke our original call to `clear_live()`,
338- # because it now only pops one Live instance instead of clearing them all.
339- # We check for `_live_stack` and clear it manually for compatibility across
340- # both old and new Rich versions.
341- if hasattr (self ._console , "_live_stack" ) and len (self ._console ._live_stack ) > 0 :
342- self ._console .clear_live ()
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 ()
343344 else :
344345 self ._console .clear_live ()
345346
You can’t perform that action at this time.
0 commit comments