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

Request to improve the tqdm progress bar and output #35

Open
meredithslota opened this issue Aug 23, 2023 · 3 comments
Open

Request to improve the tqdm progress bar and output #35

meredithslota opened this issue Aug 23, 2023 · 3 comments
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-magics API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@meredithslota
Copy link

          hi @aribray, looks like the issue is now solved! Thank you very much for that.

I only have one nitpick regarding the new progress bar setup: it's a bit weird to have two progress bars, and one of them is pushed to the right when the job ID appears:

image

I suppose it would be better to have just a single progress bar on its own line (job ID should be its own line too).

If you want to make the output more complete, I've been also showing the data processed at the very end in my own bigquery magic like this:

from humanize.filesize import naturalsize
...
if args.info:
    processed = naturalsize(query.total_bytes_processed)
    display(ipywidgets.HTML(value='Data processed: ' + (
        f'<b>{processed}</b>' if not query.cache_hit
        else 'none <b>(returned from cache)</b>'
    )))

With this addition the output looks like this:

image

It might look better if you add a colon after the "Job ID" too, but that's just my subjective preference.

Originally posted by @GergelyKalmar in googleapis/python-bigquery#1146 (comment)

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-magics API. label Aug 23, 2023
@meredithslota meredithslota added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed api: bigquery Issues related to the googleapis/python-bigquery-magics API. labels Aug 23, 2023
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-magics API. label Aug 24, 2023
@kiraksi kiraksi assigned kiraksi and unassigned kiraksi Nov 2, 2023
@tswast
Copy link
Collaborator

tswast commented Nov 7, 2023

I believe the two bars are from (a) running the query and (b) downloading the data. These are created in two very different places in the code, so implementing this will require some refactoring.

@chalmerlowe
Copy link

chalmerlowe commented Nov 22, 2023

@tswast @meredithslota

If the two progress bars represent two separate processes (running the query and downloading the data), as Tim describes, do we need to refactor this to create only one progress bar OR is it more informative for the user to have the two progress bars for long running processes OR large data downloads?

If we choose to go with only one bar.... seems like the "running the query" bar is generally more informative on a system level.

@tswast
Copy link
Collaborator

tswast commented Jun 27, 2024

Per googleapis/python-bigquery#1965 moving to bigquery-magics repo.

Regarding choosing one progress bar, we could perhaps instead output a link to the job for long-running queries:

https://github.com/googleapis/python-bigquery-dataframes/blob/014765c22410a0b4559896d163c440f46f7ce98f/bigframes/formatting_helpers.py#L233

for this job linking logic in BigQuery DataFrames.

See also: #15 (comment)

@tswast tswast transferred this issue from googleapis/python-bigquery Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-magics API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants