cerebras.modelzoo.common.utils.run.cli_parser.get_params_from_args#
- cerebras.modelzoo.common.utils.run.cli_parser.get_params_from_args(run_dir: Optional[str] = None, argv: Optional[List] = None, extra_args_parser_fn: Optional[Callable[[], List[argparse.ArgumentParser]]] = None, device_type: Optional[cerebras.modelzoo.common.utils.run.utils.DeviceType] = None, **parser_args) dict [source]#
Parse the arguments and get the params dict from the resulting args
- Parameters
run_dir – The path to the run.py file
argv – The args to be parse. Defaults to sys.argv if not provided
extra_args_parser_fn – An optional callable that adds any extra parser args in the parser.
device_type – 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