fastai / fastprogress

Simple and flexible progress bar for Jupyter Notebook and console
Apache License 2.0
1.08k stars 105 forks source link

progress_bar not displayed #62

Closed ElisonSherton closed 3 years ago

ElisonSherton commented 4 years ago

Hi there!

I installed fastprogress using pip. I am trying to use this in order to create a progressbar for the sake of measuring time required to parse all the documents using spacy.

The issue is that the progressbar is not being displayed. Can you please help me with the same? I have tried to create a toy example to demonstrate the same below.

image

As seen above, there's a small progressbar with no comment and it's static all the while.

Can you please help me with this?

With Regards, Vinayak.

tcapelle commented 4 years ago

put a sleep(0.1) inside probably this is instant.

import-antigravity commented 4 years ago

I'm having a similar problem. Running some of the example code in an iPython shell in iTerm looks correct: Screen Shot 2020-07-17 at 11 59 30 AM

But running it in pycharm (even in an iPython terminal) looks like OP's screenshot.

yuanjinghui commented 3 years ago

I'm having a similar problem using Pycharm. I've posted here https://discourse.pymc.io/t/pycharm-cannot-show-progress-bar-while-jupyter-notebook-shows-well-after-upgrade-the-pymc3-to-3-9-3/6090

ohmeow commented 3 years ago

Any resolution to this? I'm having the same issue in jupyter notebook

fohria commented 3 years ago

I see the same behaviour in Atom with Hydrogen plugin, but solution in #61 worked for the simple example given by @ElisonSherton above.

ohmeow commented 3 years ago

What's funny is that once I did an editable install, it worked just fine. Even funnier, Zach Mueller said nothing was different between what is on pypi and what you get from doing an editable install ... so color me confused still :)

On Thu, Dec 17, 2020 at 5:26 AM Henrik Siljebråt notifications@github.com wrote:

I see the same behaviour in Atom with Hydrogen plugin, but solution in #61 https://github.com/fastai/fastprogress/issues/61 worked for the simple example given by @ElisonSherton https://github.com/ElisonSherton above.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fastai/fastprogress/issues/62#issuecomment-747437616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADNMGOZBFU7ZLOBH7K7D3SVIBHHANCNFSM4MYUHNPQ .

leiyu-thunder commented 3 years ago

I have the same problem in jupyter notebook. I solved it by upgrade IPython package >= 6.0.0, which is required by fastprogress. Maybe you can try it.

johan12345 commented 3 years ago

This still is an issue for me in PyCharm. A workaround seems to be to add the following:

from fastprogress import fastprogress
fastprogress.printing = lambda: True

I pushed a possible fix in PR #89.

redreddragon commented 2 years ago

I have resolved this problem in PyCharm for Windows.

from fastprogress.fastprogress import ConsoleProgressBar,ConsoleMasterBar

from time import sleep
mb = ConsoleMasterBar(range(10))
pb = ConsoleProgressBar(range(100), parent=mb)

#  pd.end is '\r' as default,  which can not be displayed in Windows
pb.end = '\r\n'

for i in mb:
    for j in pb:
        sleep(0.01)

More details here https://stackoverflow.com/questions/15433188/what-is-the-difference-between-r-n-r-and-n