From 2dc5e1a120176594ed2dcb7d2f02a5dd62266232 Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Thu, 29 Jun 2023 08:14:43 -0400 Subject: [PATCH] Revert "Fix typing annotations for FSDP and DeepSpeed in TrainingArguments" (#24574) Revert "Fix typing annotations for FSDP and DeepSpeed in TrainingArguments (#24549)" This reverts commit c5e29d4381d4b9739e6cb427adbca87fbb43a3ad. --- src/transformers/training_args.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index ac875e0570cc..e8c2823f3793 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -976,12 +976,12 @@ class TrainingArguments: ) }, ) - fsdp_config: Optional[Union[str, Dict]] = field( + fsdp_config: Optional[str] = field( default=None, metadata={ "help": ( - "Config to be used with FSDP (Pytorch Fully Sharded Data Parallel). The value is either a" - "fsdp json config file (e.g., `fsdp_config.json`) or an already loaded json file as `dict`." + "Config to be used with FSDP (Pytorch Fully Sharded Data Parallel). The value is either a" + "fsdp json config file (e.g., `fsdp_config.json`) or an already loaded json file as `dict`." ) }, ) @@ -994,11 +994,11 @@ class TrainingArguments: ) }, ) - deepspeed: Optional[Union[str, Dict]] = field( + deepspeed: Optional[str] = field( default=None, metadata={ "help": ( - "Enable deepspeed and pass the path to deepspeed json config file (e.g. `ds_config.json`) or an already" + "Enable deepspeed and pass the path to deepspeed json config file (e.g. ds_config.json) or an already" " loaded json file as a dict" ) },