abhishekkrthakur / tez

Tez is a super-simple and lightweight Trainer for PyTorch. It also comes with many utils that you can use to tackle over 90% of deep learning projects in PyTorch.
Apache License 2.0
1.16k stars 145 forks source link

Atrribute Error while importing tez #21

Open AnuraagBeniwal2610 opened 3 years ago

AnuraagBeniwal2610 commented 3 years ago

when i try to import tez using - import tez. I am encountering this error AttributeError: module 'torch.optim.lr_scheduler' has no attribute 'SAVE_STATE_WARNING'

abhishekkrthakur commented 3 years ago

which version of torch are you using?

AnuraagBeniwal2610 commented 3 years ago

i am using 1.8.0, which was automatically installed when i installed tez

abhishekkrthakur commented 3 years ago

yeah, i might need to fix that. 1.7.1 should work fine. if you could use it, it would be great.

for 1.8, ill make a new release soon.

AnuraagBeniwal2610 commented 3 years ago

Ok sure, thanks for such a fast reply. Loved your book btw as well as your videos.

MrR0b0t-23 commented 3 years ago

I encountered this error AttributeError: module 'torch.optim.lr_scheduler' has no attribute 'SAVE_STATE_WARNING'

To solve this error I simply removed "warnings.filterwarnings("ignore", message=torch.optim.lr_scheduler.SAVE_STATE_WARNING)" line from tez/tez/model/model.py

After changing this my program worked properly.