Fix typing annotations for FSDP and DeepSpeed in TrainingArguments (#24549)
* Fix typing annotations for FSDP and DeepSpeed in TrainingArguments * Change dict to Dict
This commit is contained in:
@@ -976,12 +976,12 @@ class TrainingArguments:
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
fsdp_config: Optional[str] = field(
|
fsdp_config: Optional[Union[str, Dict]] = field(
|
||||||
default=None,
|
default=None,
|
||||||
metadata={
|
metadata={
|
||||||
"help": (
|
"help": (
|
||||||
"Config to be used with FSDP (Pytorch Fully Sharded Data Parallel). The value is either a"
|
"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`."
|
"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[str] = field(
|
deepspeed: Optional[Union[str, Dict]] = field(
|
||||||
default=None,
|
default=None,
|
||||||
metadata={
|
metadata={
|
||||||
"help": (
|
"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"
|
" loaded json file as a dict"
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user