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

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

Closed
2 of 3 tasks
hombit opened this issue Jun 3, 2024 · 5 comments · Fixed by #330
Closed
2 of 3 tasks

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

hombit opened this issue Jun 3, 2024 · 5 comments · Fixed by #330
Labels
bug Something isn't working

Comments

@hombit
Copy link
Contributor

hombit commented Jun 3, 2024

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:

  • I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
  • I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.
  • If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
@hombit hombit added the bug Something isn't working label Jun 3, 2024
@delucchi-cmu
Copy link
Contributor

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
Copy link
Contributor Author

hombit commented Jun 3, 2024

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
Copy link
Contributor Author

hombit commented Jun 3, 2024

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
Copy link
Contributor

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: astronomy-commons/lsdb#167

@hombit
Copy link
Contributor Author

hombit commented Jun 4, 2024

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: astronomy-commons/lsdb#167

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants