ONE - On-device Neural Engine
|
Public Member Functions | |
__init__ (self) | |
print_help (self) | |
get_option_names (self, *flatten=False, without_dash=False) | |
check_if_valid_option_name (self, *args, **kwargs) | |
add_argument (self, *args, **kwargs) | |
List | make_cmd (self, SimpleNamespace cfg_args) |
Data Fields | |
driver | |
target | |
Static Protected Attributes | |
list | _SUPPORTED_ACTION_TYPE = [DriverName, NormalOption, TargetOption] |
Definition at line 118 of file argumentparse.py.
argumentparse.ArgumentParser.__init__ | ( | self | ) |
Definition at line 121 of file argumentparse.py.
References argumentparse.ArgumentParser.driver, Command.Command.driver, argumentparse.ArgumentParser.target, and CfgRunner.CfgRunner.target.
argumentparse.ArgumentParser.add_argument | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 199 of file argumentparse.py.
References argumentparse.ArgumentParser.check_if_valid_option_name().
argumentparse.ArgumentParser.check_if_valid_option_name | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 177 of file argumentparse.py.
References argumentparse.ArgumentParser._SUPPORTED_ACTION_TYPE, and argumentparse.ArgumentParser.get_option_names().
Referenced by argumentparse.ArgumentParser.add_argument().
argumentparse.ArgumentParser.get_option_names | ( | self, | |
* | flatten = False , |
||
without_dash = False |
|||
) |
Get registered option names. :param flatten: single option can have multiple names. If it is True, such options are returned after flattened. :param without_dash: optional argument has leading dash on its names. If it is True, option names are returned without such dashes. For example, say there are options like these. parser.add_argument("--verbose", action=NormalOption, dtype=bool) parser.add_argument("--output", "--output_path", action=NormalOption) [EXAMPLES] get_option_names() [[--verbose], [--output, --output_path]] get_option_names(without_dash=True) [[verbose], [output, output_path]] get_option_names(flatten=True) [--verbose, --output, --output_path] get_option_names(flatten=True, without_dash=True) [verbose, output, output_path]
Definition at line 142 of file argumentparse.py.
Referenced by argumentparse.ArgumentParser.check_if_valid_option_name().
List argumentparse.ArgumentParser.make_cmd | ( | self, | |
SimpleNamespace | cfg_args | ||
) |
Definition at line 218 of file argumentparse.py.
argumentparse.ArgumentParser.print_help | ( | self | ) |
Definition at line 128 of file argumentparse.py.
References argumentparse.ArgumentParser.driver, Command.Command.driver, and backends.get_list().
|
staticprotected |
Definition at line 119 of file argumentparse.py.
Referenced by argumentparse.ArgumentParser.check_if_valid_option_name().
argumentparse.ArgumentParser.driver |
Definition at line 206 of file argumentparse.py.
Referenced by argumentparse.ArgumentParser.__init__(), argumentparse.ArgumentParser.print_help(), and Command.Command.run().
argumentparse.ArgumentParser.target |
Definition at line 219 of file argumentparse.py.
Referenced by argumentparse.ArgumentParser.__init__(), CfgRunner.CfgRunner.run(), and CfgRunner.CfgRunner.set_target().