Skip to content

Commit

Permalink
Avoid using no_sync on SageMaker DP (#11229)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger authored Apr 13, 2021
1 parent 9fa2995 commit 9d8e8a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def _no_sync_in_gradient_accumulation(self):
"""
Whether or not to use no_sync for the gradients when doing gradient accumulation.
"""
return not (self.deepspeed or is_sagemaker_mp_enabled())
return not (self.deepspeed or is_sagemaker_dp_enabled() or is_sagemaker_mp_enabled())

def to_dict(self):
"""
Expand Down

0 comments on commit 9d8e8a8

Please sign in to comment.