MCPcopy
hub / github.com/alibaba/EasyCV / parse_args

Function parse_args

tools/export.py:29–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def parse_args():
30 parser = argparse.ArgumentParser(description='export a model')
31 parser.add_argument(
32 'config', help='config file path', type=str, default=None)
33 parser.add_argument(
34 'ckpt_path', type=str, help='checkpoint to be exported')
35 parser.add_argument(
36 'export_path', type=str, help='file to store the exported model')
37 parser.add_argument('--local_rank', type=int, default=0)
38 parser.add_argument(
39 '--model_type',
40 type=str,
41 default=None,
42 help=
43 'parameterize param when user specific choose a model config template like CLASSIFICATION: classification.py'
44 )
45 parser.add_argument(
46 '--user_config_params',
47 nargs=argparse.REMAINDER,
48 default=None,
49 help='modify config options using the command-line')
50 args = parser.parse_args()
51 return args
52
53
54def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected