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

cerebras.modelzoo.common.utils.run.cli_parser.get_params_from_args(argv=None, extra_args_parser_fn=None, device_type=None, **parser_args)[source]#

Parse the arguments and get the params dict from the resulting args.

Parameters
  • argv (Optional[List]) – The args to be parse. Defaults to sys.argv if not provided

  • extra_args_parser_fn (Optional[Callable[[], List[argparse.ArgumentParser]]]) – An optional callable that adds any extra parser args in the parser.

  • device_type (Optional[cerebras.modelzoo.common.utils.run.utils.DeviceType]) – The device type for which to fetch to add the args to the new parser. If None, all device type (CPU, GPU, CSX) args are added.

  • parser_args – Any extra keyword arguments to be passed to the get_parser method for constructing the parser