cerebras.modelzoo.common.utils.run.cli_parser.add_general_arguments#

cerebras.modelzoo.common.utils.run.cli_parser.add_general_arguments(parser: argparse.ArgumentParser, default_model_dir: str, first_parse: bool = True, modes: List[str] = ['train', 'eval', 'train_and_eval', 'eval_all'])[source]#

Injects general parser arguments.

Parameters
  • parser – Parser into which the arguments are being added.

  • default_model_dir – String containing model directory path.

  • first_parse – Boolean indicating whether this is the first time processing the arguments. If True, the “params” arg is required to get additional parameters, if False then the params file has already been read and is not required.

  • modes – Optional list of valid modes to be passed under the –mode argument of the parser. We default to choices [“train”, “eval”, “train_and_eval”, “eval_all”]. If an empty list if provided, then –mode isn’t added as a parser arg.