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

AttributeError: module 'torch.optim' has no attribute 'adam' #258

Open
evanweiguohua opened this issue Jul 10, 2023 · 5 comments
Open

AttributeError: module 'torch.optim' has no attribute 'adam' #258

evanweiguohua opened this issue Jul 10, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@evanweiguohua
Copy link

PTV2将优化器设置为adam会报AttributeError: module 'torch.optim' has no attribute 'adam'的错误,adamw是好的。
Lora则没有该问题。

@evanweiguohua
Copy link
Author

配置如下:

模块配置, 默认启用lora

enable_deepspeed = True
enable_ptv2 = True
enable_lora = False
enable_int8 = False # qlora int8
enable_int4 = False # qlora int4

@ssbuild
Copy link
Owner

ssbuild commented Jul 10, 2023

pip list |grep torch

@evanweiguohua
Copy link
Author

pytorch-lightning 2.0.4
torch 2.0.1
torchaudio 2.0.2
torchmetrics 1.0.0
torchvision 0.15.2

@ssbuild ssbuild added the bug Something isn't working label Jul 10, 2023
@ssbuild
Copy link
Owner

ssbuild commented Jul 10, 2023

pip uninstall deep_training
pip install -U git+https://github.com/ssbuild/deep_training.git

it is bug and fixed , do upgrade can solve.

@evanweiguohua
Copy link
Author

Thanks a lot.
I'll try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants