MCPcopy Create free account
hub / github.com/pytorch/executorch / parse_args

Function parse_args

examples/cuda/scripts/export.py:37–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def parse_args() -> argparse.Namespace:
38 parser = argparse.ArgumentParser()
39
40 parser.add_argument(
41 "-m",
42 "--model_name",
43 required=True,
44 help=f"Provide model name. Valid ones: {list(MODEL_NAME_TO_MODEL.keys())}",
45 )
46 parser.add_argument(
47 "--output_dir",
48 type=pathlib.Path,
49 default=pathlib.Path("./"),
50 help="Output directory for the exported model",
51 )
52 parser.add_argument("--generate_etrecord", action=argparse.BooleanOptionalAction)
53 parser.add_argument("--save_processed_bytes", action=argparse.BooleanOptionalAction)
54
55 args = parser.parse_args()
56 return args
57
58
59def save_processed_bytes(processed_bytes, base_name: str):

Callers 1

mainFunction · 0.70

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected