ModelArguments.add_subcommands#
- ModelArguments.add_subcommands(subparsers, name, **kwargs)#
Add sub-commands for CLI arguments and config (if possible).
Note: config sub-command won’t be added if model provided to class isn’t a subclass of BaseConfig.
- Parameters:
subparsers (argparse._SubParsersAction[ArgumentParser]) – Subparser to add new sub-commands to, created using argparser.ArgumentParser().add_subparsers().
name (str) – Name of the sub-command to add, if config sub-command is added it will be called ‘{name}-config’.
kwargs – Keyword arguments to pass to subparsers.add_parser.