deprecate sharded_ddp training argument (#24825)

* deprecate fairscale's ShardedDDP

* fix code style

* roll back

* deprecate the `sharded_ddp` training argument

---------

Co-authored-by: jihuazhong <jihuazhong1@huawei.com>
This commit is contained in:
statelesshz
2023-07-17 18:57:42 +08:00
committed by GitHub
parent 5bb4430edc
commit 8ba26c18cf
4 changed files with 11 additions and 148 deletions

View File

@@ -1460,6 +1460,12 @@ class TrainingArguments:
" during training"
)
if not (self.sharded_ddp == "" or not self.sharded_ddp):
warnings.warn(
"using `sharded_ddp` is deprecated and will be removed in version 4.33"
" of 🤗 Transformers. Use `fsdp` instead",
FutureWarning,
)
if isinstance(self.sharded_ddp, bool):
self.sharded_ddp = "simple" if self.sharded_ddp else ""
if isinstance(self.sharded_ddp, str):