Pushed a few changes that I’ll send on Pypi later today for v0.1.4. It replaces IS_NOTEBOOK by your test and adds a function force_console_behavior that can force the behavior of console (as the name indicates) for users of Spider or qtconsole (I’ll fix this problem later if necessary). Usage:
from fast_progress import force_console_behavior
master_bar, progress_bar = force_console_behavior()
Also @radek wanted an option to have no bar at all and only the epochs stats printed, this behavior can now be obtained with
Great. Can you check the output for spyder console for shell = get_ipython().__class__.__name__. That should be different from the normal ipython and python outputs and another if else statement should do the job. Though its not the most elegant solution.
Nope, this one gives the same as in a notebook. I have seen solutions for Spyder and QtConsole, it’s jsut going to take a bit of time and we have other priorities right now
Important note: we have removed the package fast_progress and replaced it with fastprogress because conda didn’t like the _.
Don’t forget to update your code accordingly!
There is an additional step to have it properly working in jupyter lab: you must have the jupyter widgets extension properly installed, which I think is done with:
Hi @sgugger can you clarify how I can use the force_console_behavior to change the default display of progress bars with the fastai library. Once I have the master_bar and progress_bar how do I tell fastai to use them?
Once you have done that, every time you call fit or a function that uses progress bars, you’ll see the text rendering of a console.
Then you can use progress_bar on anything you want to track the progress of (see the fastprogress repo for more examples).
after your force_console_behavior().
This is a bit hacky for now, but ultimately, I hope to have fastprogress recognize emacs or spyder from jupyter notebook.
Thanks so much! I am totally fine with the hack for now. It is really great to have the freedom to switch to console mode. I will definitely be using fastprogress in other projects now! Let me know if you ever need a test subject for future emacs ipython notebook functionality.