modelzoo.common.run_utils.cli_parser.get_parser#

modelzoo.common.run_utils.cli_parser.get_parser(run_dir: Optional[str] = None, first_parse: bool = True, extra_args_parser_fn: Optional[Callable[[], List[argparse.ArgumentParser]]] = None) argparse.ArgumentParser[source]#

Returns an ArgumentParser for parsing commandline options.

Parameters
  • run_dir – String to be used to determine model directory.

  • first_parse – Boolean indicating whether this is the first time processing the arguments. If True, the parser is being used to collect commandline inputs. If False, it is only being used for verification on existing params.

  • extra_args_parser_fn – Parent parser passed in by models with unique specific arguments.

Returns

A parser instance.