astronomy-commons / hipscat-import

HiPSCat import - generate HiPSCat-partitioned catalogs
https://hipscat-import.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Progress bars are missing in my Jupyter environment (PSC) #327

Closed hombit closed 1 month ago

hombit commented 1 month ago

Bug report

When I use the latest release on the PSC ondemand service, I don't see progress bars in a Jupyter Lab notebook:

image

I use Python 3.12 with the conda environment

Before submitting Please check the following:

delucchi-cmu commented 1 month ago

To use tqdm in a jupyter environment, you need the module ipywidgets. I'm not sure the best way to document this for users, though, as it's only an issue when running within a jupyter notebook. Suggestions?

hombit commented 1 month ago

I was about to say that we may recommend to install ipywidgets in this error message, but its installation completely broke my PSC Jupyter Lab

hombit commented 1 month ago

My Jupyter is fixed now, but ipywidgets didn't really help. Could we have an option to use a "simple" tqdm progress bar? Because a naive code like this works for me:

from tqdm import tqdm

for _ in tqdm(range(100)):
    pass

while from tqdm.auto import tqdm does not.

delucchi-cmu commented 1 month ago

To clarify, are you suggesting/approve of potentially having two flag on the arguments?

progress_bar (bool): should we display any progress bar at all simple_progress_bar (bool): if we're displaying a progress bar, make it a simple (plain text, non-widgety one).

I also want to cross-reference this issue that motivated using the widget-style progress bar in the first place: https://github.com/astronomy-commons/lsdb/issues/167

hombit commented 1 month ago

progress_bar (bool): should we display any progress bar at all simple_progress_bar (bool): if we're displaying a progress bar, make it a simple (plain text, non-widgety one).

Is there any way to check if widgets are active and do this choice for user?

I also want to cross-reference this issue that motivated using the widget-style progress bar in the first place: https://github.com/astronomy-commons/lsdb/issues/167

The new progress bar is pretty, I think it was a good change!