Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[training] SAVE_STATE_WARNING was removed in pytorch #8979

Merged
merged 4 commits into from
Dec 8, 2020
Merged

Conversation

stas00
Copy link
Contributor

@stas00 stas00 commented Dec 8, 2020

SAVE_STATE_WARNING has been removed from pytorch 3 days ago: pytorch/pytorch#46813

I had to add redundant ()'s to avoid a terrible auto-formatter outcome.

Fixes: #8232

@sgugger, @LysandreJik

@sgugger
Copy link
Collaborator

sgugger commented Dec 8, 2020

Thank God they removed that horrible thing! Instead of the complex parsing, maybe a try/except would be cleaner?

@stas00
Copy link
Contributor Author

stas00 commented Dec 8, 2020

no horrible formatting that way! good idea - done.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@stas00 stas00 merged commit 9d7d000 into master Dec 8, 2020
@stas00 stas00 deleted the stas00-patch-1 branch December 8, 2020 05:59
binshengliu pushed a commit to binshengliu/transformers that referenced this pull request Mar 2, 2021
* [training] SAVE_STATE_WARNING was removed in pytorch

FYI `SAVE_STATE_WARNING` has been removed 3 days ago: pytorch/pytorch#46813

Fixes: huggingface#8232

@sgugger

* style, but add () to prevent autoformatters from botching it

* switch to try/except

* cleanup
binshengliu pushed a commit to binshengliu/transformers that referenced this pull request Mar 2, 2021
* [training] SAVE_STATE_WARNING was removed in pytorch

FYI `SAVE_STATE_WARNING` has been removed 3 days ago: pytorch/pytorch#46813

Fixes: huggingface#8232

@sgugger

* style, but add () to prevent autoformatters from botching it

* switch to try/except

* cleanup
binshengliu pushed a commit to binshengliu/transformers that referenced this pull request Mar 5, 2021
* [training] SAVE_STATE_WARNING was removed in pytorch

FYI `SAVE_STATE_WARNING` has been removed 3 days ago: pytorch/pytorch#46813

Fixes: huggingface#8232

@sgugger

* style, but add () to prevent autoformatters from botching it

* switch to try/except

* cleanup
calpt added a commit to adapter-hub/adapters that referenced this pull request Mar 8, 2021
@vyshkant
Copy link

vyshkant commented Jun 8, 2021

@stas00, could it be possible to apply your fix to the code of version 3.5.X and release the next minor version (like v3.5.2)?

@stas00
Copy link
Contributor Author

stas00 commented Jun 8, 2021

@LysandreJik, your help is needed here. I don't know anything about how old branches maintenance is done.

This PR was merged in 4x series and @vyshkant is requesting this fix applied to 3.5.x for the next release.

Thank you.

@sgugger
Copy link
Collaborator

sgugger commented Jun 8, 2021

No we won't do fixes for old versions, either upgrade to v4 or use PyTorch < 1.8 if you want to stick to v3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: cannot import name 'SAVE_STATE_WARNING' from 'torch.optim.lr_scheduler'
4 participants