Muellerzr fix deepspeed (#23657)

* Fix deepspeed recursion

* Better fix
This commit is contained in:
Zachary Mueller
2023-05-22 11:22:54 -04:00
committed by GitHub
parent 7bbdfd7b24
commit fe34486f12

View File

@@ -1708,7 +1708,8 @@ class TrainingArguments:
"""
requires_backends(self, ["torch"])
# Make sure `self._n_gpu` is properly setup.
_ = self._setup_devices
if not hasattr(self, "_n_gpu"):
_ = self._setup_devices
return self._n_gpu
@property