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

TypeError: 'NoneType' object is not subscriptable #26

Closed
yiyele opened this issue Apr 14, 2021 · 4 comments
Closed

TypeError: 'NoneType' object is not subscriptable #26

yiyele opened this issue Apr 14, 2021 · 4 comments

Comments

@yiyele
Copy link

yiyele commented Apr 14, 2021

Traceback (most recent call last):
File "finetune_lm.py", line 315, in
main()
File "finetune_lm.py", line 206, in main
model, optimizer, lr_scheduler = setup_model_and_optimizer(args)
File "/CPM/model/CDialoGPT/CPM-Finetune/utils.py", line 513, in setup_model_and_optimizer
args.iteration = load_checkpoint(model, optimizer, lr_scheduler, args)
File "/CPM/model/CDialoGPT/CPM-Finetune/utils.py", line 281, in load_checkpoint
checkpoint_name, sd = model.load_checkpoint(args.load, iteration, load_module_strict=False, load_optimizer_states=False, load_lr_scheduler_states=False)
File "/usr/local/lib/python3.6/dist-packages/deepspeed/runtime/engine.py", line 1196, in load_checkpoint
load_lr_scheduler_states=load_lr_scheduler_states)
File "/usr/local/lib/python3.6/dist-packages/deepspeed/runtime/engine.py", line 1231, in _load_checkpoint
self.optimizer.load_state_dict(checkpoint['optimizer'])
File "/usr/local/lib/python3.6/dist-packages/torch/optim/optimizer.py", line 108, in load_state_dict
saved_groups = state_dict['param_groups']
TypeError: 'NoneType' object is not subscriptable

@yiyele yiyele changed the title 有试过finetune_lm_large_fp32.sh?? TypeError: 'NoneType' object is not subscriptable Apr 15, 2021
@t1101675
Copy link
Contributor

您用的是我们要求的 deepspeed 版本吗? 可以参考 #21

@yiyele
Copy link
Author

yiyele commented Apr 16, 2021

deepspeed 0.3.0+f0f2a70
是这个版本吗?我怎么还是有这个问题

@demomagic
Copy link

我也同样有问题,暂时没找到解决办法

@demomagic
Copy link

不能用deepspeed 0.3.0+f0f2a70这个版本,我直接更换了最新版本deepspeed==0.3.15,运行正常

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

No branches or pull requests

3 participants