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 and Rocketknight1 committed Apr 21, 2021
1 parent a26c599 commit 40863fb
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 40863fb

Please sign in to comment.