Skip to content

Commit

Permalink
Avoid using no_sync on SageMaker DP (huggingface#11229)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger authored and Iwontbecreative committed Jul 15, 2021
1 parent 536233b commit da8103f
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 da8103f

Please sign in to comment.