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

Display progress bars for long loops #105

Open
leo-desbureaux-tellae opened this issue Dec 9, 2024 · 1 comment
Open

Display progress bars for long loops #105

leo-desbureaux-tellae opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
io Inputs/Outputs

Comments

@leo-desbureaux-tellae
Copy link
Contributor

Some processes of Starling have long computation times.

In order to show progression over such loops, we could use tqdm to log a progress bar.

We should make sure this is compatible with the existing logging system of Starling (uses the logging library)

@leo-desbureaux-tellae leo-desbureaux-tellae added the io Inputs/Outputs label Dec 9, 2024
@leo-desbureaux-tellae leo-desbureaux-tellae self-assigned this Dec 9, 2024
@leo-desbureaux-tellae
Copy link
Contributor Author

About the compatibility with logging, I see two problems:

  • Progress bar display is messed up if logs are displayed in the displayed loop

For this, we seem to have options to display logs using tqdm.write. So they take the place of the progress bar and are then replaced ?

See here: https://tqdm.github.io/docs/contrib.logging/

  • The progress bar display should be conditioned to the same level logic than the basic logs. For instance, we would display a progress bar in INFO level, so it would not be displayed when set log level to WARN.

See here: https://stackoverflow.com/questions/14897756/python-progress-bar-through-logging-module/41224909#41224909
But it seems to display new lines instead of an updated progress bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io Inputs/Outputs
Projects
None yet
Development

No branches or pull requests

1 participant