AttributeError: 'NBMasterBar' object has no attribute 'first_bar'
sayakpaul opened this issue · comments
Trying out the following example on Colab:
from fastprogress.fastprogress import master_bar, progress_bar
from time import sleep
mb = master_bar(range(10))
for i in mb:
for j in progress_bar(range(100), parent=mb):
sleep(0.01)
mb.child.comment = f'second bar stat'
mb.first_bar.comment = f'first bar stat'
mb.write(f'Finished loop {i}.')
Throws: AttributeError: 'NBMasterBar' object has no attribute 'first_bar'.
you can install fastprogress==0.1.20
pip install fastprogress==0.1.20
I would love to use the current version. I'm sure @sgugger is busy with all the other awesome libraries he supports, but I'm wondering if the example in the README.md could be updated. I went through the source code for about 20 minutes and couldn't really put it all together.
The doc wasn't synced with API changes, apparently first_bar
got renamed to main_bar
at some point - should be fixed now.
mb.main_bar.comment = f'first bar stat'