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

tqdm.auto does not work fine in Atom hydrogen #1159

Open
kamione opened this issue Apr 16, 2021 · 1 comment
Open

tqdm.auto does not work fine in Atom hydrogen #1159

kamione opened this issue Apr 16, 2021 · 1 comment
Labels
duplicate 🗐 Seen it before invalid ⛔ Not-an-issue or upstream (not-our-issue) p2-bug-warning ⚠ Visual output bad question/docs ‽ Documentation clarification candidate submodule-notebook 📓 Much web such IDE

Comments

@kamione
Copy link

kamione commented Apr 16, 2021

Summary

tqdm.auto progress bar does not update if the codes are running in a Atom IDE with hydrogen

Additional details

  • I run the NiMARE package which it uses tqdm.auto
  • NiMARE version: 0.0.7
  • I have reported this issue in the the NiMARE repo but this issue is generally caused by tqdm.auto in Atom Hydrogen environment [

What were you trying to do?

I tried to run:

ale = nimare.meta.cbma.ALE()
res = ale.fit(dset)

corr = nimare.correct.FWECorrector(method="montecarlo", n_iters=10, n_cores=-1)
cres = corr.transform(ale.results)

What did you expect to happen?

What actually happened?

This block of codes only produced:

INFO:nimare.correct:Using correction method implemented in Estimator: nimare.meta.cbma.ale.ALE.correct_fwe_montecarlo.
  0%|          | 0/10 [00:00<?, ?it/s]
INFO:nimare.meta.cbma.base:Using null distribution for voxel-level FWE correction.

The codes worked perfectly but the progress bar does not update if I work in a Atom IDE with hydrogen

Reproducing the bug

# This problem can be simply reproduced in a Atom IDE with hydrogen by:
import time
from tqdm.auto import tqdm

for _ in tqdm(range(10)):
    time.sleep(1)
    pass
@casperdcl
Copy link
Sponsor Member

casperdcl commented Apr 17, 2021

Yes this is essentially an old issue with the design of the IPython kernel itself (see the accepted albeit relatively unpopular answer at https://stackoverflow.com/a/15412661/3896283 essentially stating "this shouldn't be possible by design.") I suppose ipywidgets itself should be providing widgets with better text representation functionality (#1098 (comment)).

You could replace tqdm.auto.tqdm with simply tqdm.tqdm, or perhaps try to implement one of the alternative work-arounds/hacks on that stackoverflow page.

@casperdcl casperdcl added duplicate 🗐 Seen it before p2-bug-warning ⚠ Visual output bad question/docs ‽ Documentation clarification candidate submodule-notebook 📓 Much web such IDE invalid ⛔ Not-an-issue or upstream (not-our-issue) labels Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate 🗐 Seen it before invalid ⛔ Not-an-issue or upstream (not-our-issue) p2-bug-warning ⚠ Visual output bad question/docs ‽ Documentation clarification candidate submodule-notebook 📓 Much web such IDE
Projects
None yet
Development

No branches or pull requests

2 participants