torchgan / torchgan

Research Framework for easy and efficient training of GANs based on Pytorch
https://torchgan.readthedocs.io/en/latest/
MIT License
1.39k stars 167 forks source link

AttributeError: 'NBMasterBar' object has no attribute 'first_bar' #127

Closed La-fe closed 4 years ago

La-fe commented 4 years ago

Describe the bug An error will be reported if the 0.2.0 version of fastprogress is installed

Traceback (most recent call last):
  File "dc_gan.py", line 205, in <module>
    trainer(dataloader)
  File "/usr/local/anaconda3/envs/pt1.0py37/lib/python3.7/site-packages/torchgan/trainer/base_trainer.py", line 455, in __call__
    self.train(data_loader, **kwargs)
  File "/usr/local/anaconda3/envs/pt1.0py37/lib/python3.7/site-packages/torchgan/trainer/base_trainer.py", line 400, in train
    master_bar_iter.first_bar.comment = f"Training Progress"
AttributeError: 'ConsoleMasterBar' object has no attribute 'first_bar'

I used the 0.2.0 version fastprogress to create a simple example

from fastprogress import master_bar, progress_bar
master_bar_iter = master_bar(range(0, 3))
master_bar_iter.first_bar.comment = f'first bar stat'

Produced a similar error

AttributeError                            Traceback (most recent call last)
<ipython-input-3-ffd0b33d372e> in <module>
----> 1 master_bar_iter.first_bar.comment = f'first bar stat'

AttributeError: 'ConsoleMasterBar' object has no attribute 'first_bar'

I won't get an error when I install 0.1.20 version fastprogress

pip install fastprogress==0.1.20
avik-pal commented 4 years ago

Thanks @La-fe for reporting this. #128 should fix this.