Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xingmingyyj committed Aug 16, 2024
1 parent 877e7c4 commit e59a8b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions paddlenlp/trainer/auto_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,8 @@ def _load_from_checkpoint(self, resume_from_checkpoint=None):
if self.args.to_static:
parameter_to_structured_name = self.model_wrapped._parameter_to_structured_name

Check warning on line 728 in paddlenlp/trainer/auto_trainer.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/trainer/auto_trainer.py#L726-L728

Added lines #L726 - L728 were not covered by tests
else:
for state_dict_name, sub_state_dict in state_dict.items():
for state_name, state_value in sub_state_dict.items():
parameter_to_structured_name[state_value.name] = state_name
for state_name, state_value in self.model_wrapped.state_dict().items():
parameter_to_structured_name[state_value.name] = state_name

Check warning on line 731 in paddlenlp/trainer/auto_trainer.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/trainer/auto_trainer.py#L730-L731

Added lines #L730 - L731 were not covered by tests

if self.args.resume_form_hybrid_parallel:
CheckpointConverter(

Check warning on line 734 in paddlenlp/trainer/auto_trainer.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/trainer/auto_trainer.py#L733-L734

Added lines #L733 - L734 were not covered by tests
Expand Down

0 comments on commit e59a8b7

Please sign in to comment.