diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index 1f7df7e9f3b0..bf0538516864 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -1616,7 +1616,7 @@ def train( if resume_from_checkpoint is None: raise ValueError(f"No valid checkpoint found in output directory ({args.output_dir})") - if resume_from_checkpoint is not None and not is_sagemaker_mp_enabled(): + if resume_from_checkpoint is not None and not is_sagemaker_mp_enabled() and args.deepspeed is None: self._load_from_checkpoint(resume_from_checkpoint) # If model was re-initialized, put it on the right device and update self.model_wrapped