parameters: (parser)
return_statement: return parser
docstring: Parse commandline arguments.
docstring_summary: Parse commandline arguments.
docstring_tokens: Parse commandline arguments .
function: def parse_args(parser):
      """
      Parse commandline arguments.
      """
      parser.add_argument('-m', '--model-name', type=str, default='', required=True,
                          help='Model to train')
      parser.add_argument('-sr', '--sampling-rate', default=22050, type=int,
                          help='Sampling rate')
      parser.add_argument('--amp-run', action='store_true',
                          help='Inference with Automatic Mixed Precision')
      parser.add_argument('-bs', '--batch-size', type=int, default=1,
                          help='Batch size')
      parser.add_argument('-o', '--output', type=str, required=True,
                          help='Directory to save results')
      parser.add_argument('--log-file', type=str, default='nvlog.json',
                          help='Filename for logging')
  
      return parser
function_tokens: def parse_args ( parser ) : parser . add_argument ( '-m' , '--model-name' , type = str , default = '' , required = True , help = 'Model to train' ) parser . add_argument ( '-sr' , '--sampling-rate' , default = 22050 , type = int , help = 'Sampling rate' ) parser . add_argument ( '--amp-run' , action = 'store_true' , help = 'Inference with Automatic Mixed Precision' ) parser . add_argument ( '-bs' , '--batch-size' , type = int , default = 1 , help = 'Batch size' ) parser . add_argument ( '-o' , '--output' , type = str , required = True , help = 'Directory to save results' ) parser . add_argument ( '--log-file' , type = str , default = 'nvlog.json' , help = 'Filename for logging' ) return parser