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

save error #1938

Closed
suanflower opened this issue Aug 17, 2024 · 4 comments
Closed

save error #1938

suanflower opened this issue Aug 17, 2024 · 4 comments

Comments

@suanflower
Copy link

state_dict = self.accelerator.get_state_dict(self.backup_model)
File "/opt/conda/lib/python3.10/site-packages/accelerate/accelerator.py", line 3240, in get_state_dict
if model.zero_gather_16bit_weights_on_model_save():
AttributeError: 'NoneType' object has no attribute 'zero_gather_16bit_weights_on_model_save'
state_dict = self.accelerator.get_state_dict(self.backup_model)
File "/opt/conda/lib/python3.10/site-packages/accelerate/accelerator.py", line 3240, in get_state_dict
state_dict = self.accelerator.get_state_dict(self.backup_model)
File "/opt/conda/lib/python3.10/site-packages/accelerate/accelerator.py", line 3240, in get_state_dict
if model.zero_gather_16bit_weights_on_model_save():
AttributeError: 'NoneType' object has no attribute 'zero_gather_16bit_weights_on_model_save'
state_dict = self.accelerator.get_state_dict(self.backup_model)
if model.zero_gather_16bit_weights_on_model_save():
File "/opt/conda/lib/python3.10/site-packages/accelerate/accelerator.py", line 3240, in get_state_dict
AttributeError: 'NoneType' object has no attribute 'zero_gather_16bit_weights_on_model_save'
state_dict = self.accelerator.get_state_dict(self.backup_model)
File "/opt/conda/lib/python3.10/site-packages/accelerate/accelerator.py", line 3240, in get_state_dict
if model.zero_gather_16bit_weights_on_model_save():
AttributeError: 'NoneType' object has no attribute 'zero_gather_16bit_weights_on_model_save'
if model.zero_gather_16bit_weights_on_model_save():
AttributeError: 'NoneType' object has no attribute 'zero_gather_16bit_weights_on_model_save'
state_dict = self.accelerator.get_state_dict(self.backup_model)
File "/opt/conda/lib/python3.10/site-packages/accelerate/accelerator.py", line 3240, in get_state_dict
if model.zero_gather_16bit_weights_on_model_save():
AttributeError: 'NoneType' object has no attribute 'zero_gather_16bit_weights_on_model_save'
1%| | 10/1250 [01:02<2:09:51, 6.28s/it]

save model error.

@suanflower
Copy link
Author

hi, i found an error :
AttributeError: 'PPOv2Trainer' object has no attribute 'model_wrapped'

@qgallouedec
Copy link
Member

Thanks for reporting! Fixed in #1776

@suanflower
Copy link
Author

Thanks for replying but in Online DPO trainer

if self.control.should_save:
self._save_checkpoint(model, trial=None, metrics=metrics)
self.control = self.callback_handler.on_save(self.args, self.state, self.control)
raise error:'OnlineDPOTrainer' object has no attribute 'model_wrapped'

@qgallouedec
Copy link
Member

Thanks for reporting, fixed in #1946

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

2 participants