MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / parse_args

Function parse_args

util/config.py:52–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 return cfg.clone()
51
52def parse_args():
53 parser = argparse.ArgumentParser()
54 parser.add_argument('--cfg', type=str, help='cfg file path')
55
56 args = parser.parse_args()
57 print(args, end='\n\n')
58
59 cfg = get_cfg_defaults()
60 if args.cfg is not None:
61 cfg_file = args.cfg
62 cfg = update_cfg(cfg, args.cfg)
63 cfg.cfg_file = cfg_file
64
65 return cfg

Callers

nothing calls this directly

Calls 2

get_cfg_defaultsFunction · 0.85
update_cfgFunction · 0.85

Tested by

no test coverage detected