Revert accelerate error caused by 46d09af (#34197)

Revert `accelerate` bug
This commit is contained in:
steveepreston 2024-10-16 17:43:41 +03:30 committed by GitHub
parent 98bad9c6d6
commit cc7d8b87e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1936,7 +1936,7 @@ class TrainingArguments:
warnings.warn("`--xla_fsdp_grad_ckpt` is useful only when `--xla` is set to true.")
# accelerate integration for FSDP
if len(self.fsdp) > 0 and is_accelerate_available("0.28.0"):
if len(self.fsdp) > 0 and not self.fsdp_config["xla"]:
os.environ["ACCELERATE_USE_FSDP"] = "true"
from accelerate.utils.constants import (
FSDP_AUTO_WRAP_POLICY,