Progress Bar in Jupyter Notebooks (Visual Studio Code)

With Lightning 2.1.3, for every epoch, I get a white bar, which fills up the output. Is there a solution to fix that?

Lightning uses the tqdm package to render the progress bar. My guess is that tqdm probably just outputs a format that this theme you have installed can’t display properly. I would try to disable it and see if it works with the default VSCode theme.

I switched between a few themes and got the same result. And the themes I tried don’t render the output like that with the same VC Code version under Windows. This happens only when connected to WSL2 Ubuntu, but it does not happen when I use tqdm with torch itself without lightning.

Same here. My temporary fix is to disable the validation progress bar.

import lightning as L

from lightning.pytorch.callbacks import TQDMProgressBar
from tqdm import tqdm

class LitProgressBar(TQDMProgressBar):
    def init_validation_tqdm(self):
        bar = tqdm(
            disable=True,
        )
        return bar

trainer = L.Trainer(
    ...,
    callbacks=[LitProgressBar()],
)