generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The codebase currently imports AdamW from transformers:
from transformers import AdamWHowever, this import has been deprecated and removed in recent Transformer versions (as noted in Hugging Face issue #36954) ([GitHub]). Users now encounter:
ImportError: cannot import name 'AdamW' from 'transformers'
Additionally, a FutureWarning explicitly states:
“This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation
torch.optim.AdamWinstead.” ([GitHub], [Hugging Face Forums])
Suggested change:
- from transformers import AdamW
+ from torch.optim import AdamWThis change ensures compatibility with future versions of the transformers library and avoids deprecation warnings during training.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working