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

Enhance the progress bar to display customizable message #734

Closed
2008sliu opened this issue Nov 1, 2023 · 1 comment
Closed

Enhance the progress bar to display customizable message #734

2008sliu opened this issue Nov 1, 2023 · 1 comment

Comments

@2008sliu
Copy link

2008sliu commented Nov 1, 2023

🚀 Feature

  • current status: When process_bar is True, tqdm progress bar is displayed with desc="Executing"
  • suggested improvements: allow custimizing the message to be some task name

Motivation

When execute_notebook is called in a process pool, many progress bars will be displayed and it is not possible to distinguish which one corresponds to which task.

Possible implement without introducing new parameters

We can just allow the parameter of execute_notebook to be string. If it is non empty string, then display this string before the Executing

if progress_bar:
    from tqdm.auto import tqdm
    desc = 'Executing
    if isinstance(progress_basr, str):
        desc = progress_bar + '|' + desc
    self.pbar = tqdm(total=len(self.nb.cells), unit="cell", desc=desc)
@MSeal
Copy link
Member

MSeal commented Feb 8, 2024

Apologies for the late reply here. End of 2023 was very busy and I wasn't giving papermill much attention.

I believe this PR#778 that just merged solves this now and should enable custom description fields. Please reopen if something there isn't working as intended.

@MSeal MSeal closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants