Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RichProgressBar #308

Closed
Lordmau5 opened this issue Apr 12, 2023 · 1 comment · Fixed by #311
Closed

Use RichProgressBar #308

Lordmau5 opened this issue Apr 12, 2023 · 1 comment · Fixed by #311
Labels
enhancement New feature or request

Comments

@Lordmau5
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We already include the rich package, so we can use it's progress bar as described here:

It'll look like this:
image

Describe the solution you'd like
To implement the RichProgressBar

Additional context
All that's needed is to modify the trainer initialization as follow:

    trainer = pl.Trainer(
        accelerator="auto",
        logger=TensorBoardLogger(model_path),
        # profiler="simple",
        val_check_interval=hparams.train.eval_interval,
        max_epochs=hparams.train.epochs,
        check_val_every_n_epoch=None,
        precision="16-mixed"
        if hparams.train.fp16_run
        # else "bf16-mixed"
        else "bf16-mixed"
        if hparams.train.get("bf16_run", False)
        else 32,
        callbacks=[pl.callbacks.RichProgressBar()] # <-- Add this here
    )

Since it's a one-line change I don't see a huge need to turn this into a full pull request. I hope that's okay 🙏

@Lordmau5 Lordmau5 added the enhancement New feature or request label Apr 12, 2023
@34j
Copy link
Collaborator

34j commented Apr 13, 2023

I think it's fine. Please send a PR anyway. (I would have to follow the same procedure if I were to do it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants