Skip to content

Commit

Permalink
Fix duplicate call to save_checkpoint when using deepspeed (huggingfa…
Browse files Browse the repository at this point in the history
…ce#14946)

* Fix duplicate call to save_checkpoint when using deepspeed / stage3_gather_fp16_weights_on_model_save

* Revert "Fix duplicate call to save_checkpoint when using deepspeed / stage3_gather_fp16_weights_on_model_save"

This reverts commit 6a3dec0.

* Delete correct duplicate invocation of deepspeed save_checkpoint
  • Loading branch information
MihaiBalint authored and Steven committed Jan 6, 2022
1 parent a439438 commit 25c5d6b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1999,9 +1999,6 @@ def save_model(self, output_dir: Optional[str] = None):
# This must be called on all ranks
self.deepspeed.save_fp16_model(output_dir, WEIGHTS_NAME)

# save a deepspeed checkpoint as well (this is very fast)
self.deepspeed.save_checkpoint(output_dir)

elif self.args.should_save:
self._save(output_dir)

Expand Down

0 comments on commit 25c5d6b

Please sign in to comment.