Skip to content

Commit

Permalink
Apply huggingface#24134 fix to cae78c4
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanwenchen committed Nov 1, 2023
1 parent cae78c4 commit 5a27c37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,7 @@ def save_model(self, output_dir: Optional[str] = None, _internal_call: bool = Fa
or ShardedDDPOption.ZERO_DP_3 in self.args.sharded_ddp
or self.fsdp is not None
):
os.makedirs(output_dir, exist_ok=True)
state_dict = self.model.state_dict()

if self.args.should_save:
Expand Down

0 comments on commit 5a27c37

Please sign in to comment.