transformers
a84c4137 - HfArgumentParser: allow for hyhenated field names in long-options (#33990)

Commit
1 year ago
HfArgumentParser: allow for hyhenated field names in long-options (#33990) Allow for hyphenated field names in long-options argparse converts hyphens into underscores before assignment (e.g., an option passed as `--long-option` will be stored under `long_option`), So there is no need to pass options as literal attributes, as in `--long_option` (with an underscore instead of a hyphen). This commit ensures that this behavior is respected by `parse_args_into_dataclasses` as well. Issue: #33933 Co-authored-by: Daniel Marti <mrtidm@amazon.com>
Author
Parents
Loading