MCPcopy Create free account
hub / github.com/IceClear/CLIP-IQA / parse_args

Function parse_args

tools/test.py:16–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def parse_args():
17 parser = argparse.ArgumentParser(description='mmediting tester')
18 parser.add_argument('config', help='test config file path')
19 parser.add_argument('checkpoint', help='checkpoint file')
20 parser.add_argument('--seed', type=int, default=None, help='random seed')
21 parser.add_argument(
22 '--deterministic',
23 action='store_true',
24 help='whether to set deterministic options for CUDNN backend.')
25 parser.add_argument('--out', help='output result pickle file')
26 parser.add_argument(
27 '--gpu-collect',
28 action='store_true',
29 help='whether to use gpu to collect results')
30 parser.add_argument(
31 '--save-path',
32 default=None,
33 type=str,
34 help='path to store images and if not given, will not save image')
35 parser.add_argument('--tmpdir', help='tmp dir for writing some results')
36 parser.add_argument(
37 '--launcher',
38 choices=['none', 'pytorch', 'slurm', 'mpi'],
39 default='none',
40 help='job launcher')
41 parser.add_argument('--local_rank', type=int, default=0)
42 args = parser.parse_args()
43 if 'LOCAL_RANK' not in os.environ:
44 os.environ['LOCAL_RANK'] = str(args.local_rank)
45 return args
46
47
48def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected