fix type annotations for arguments in training_args
What does this PR do?
Fixes #24538 which is basically fixing type annotations for fsdp, fsdp_config, and sharded_ddp in training_args.py
Who can review?
maybe @sgugger
Fixing CI errors!
The documentation is not available anymore as the PR was closed or merged.
@sgugger I don't particularly understand why this error occurs in examples_flax - argparse.ArgumentError: argument --sharded_ddp: invalid typing.Union[str, bool, typing.List[transformers.trainer_utils.ShardedDDPOption], NoneType] value: ''
@sgugger bool breaks --sharded_ddp, I think we can still maintain Boolean arguments with string itself and
https://github.com/huggingface/transformers/blob/20d6b84613984f2497587a62774704882ccbeee6/src/transformers/hf_argparser.py#L168-L173
with this --sharded_ddp and --fsdp defaults to string
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.