MCPcopy Create free account
hub / github.com/ChenHsing/SVFormer / parse_args

Function parse_args

tools/submit.py:17–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15from tools.run_net import get_func
16
17def parse_args():
18 parser = argparse.ArgumentParser(
19 "Submitit for onestage training", add_help=False
20 )
21 parser.add_argument(
22 "--num_gpus",
23 help="Number of GPUs",
24 default=8,
25 type=int,
26 )
27 parser.add_argument(
28 "--num_shards",
29 help="Number of Nodes",
30 default=1,
31 type=int,
32 )
33 parser.add_argument(
34 "--partition", default="learnfair", type=str, help="Partition where to submit"
35 )
36 parser.add_argument("--timeout", default=60 * 72, type=int, help="Duration of the job")
37 parser.add_argument("--cfg", dest="cfg_file", help="Path to the config file",
38 default="configs/test_R50_8GPU.yaml", type=str)
39 parser.add_argument(
40 "--job_dir", default="", type=str, help="Job dir. Leave empty for automatic."
41 )
42 parser.add_argument(
43 "--name", default="", type=str, help="Job dir. Leave empty for automatic."
44 )
45 parser.add_argument(
46 "--resume-from",
47 default="",
48 type=str,
49 help=(
50 "Weights to resume from (.*pth file) or a file (last_checkpoint) that contains "
51 + "weight file name from the same directory"
52 ),
53 )
54 parser.add_argument("--resume-job", default="", type=str, help="resume training from the job")
55 parser.add_argument("--use_volta32", action='store_true', help="Big models? Use this")
56 parser.add_argument("--postfix", default="experiment", type=str, help="Postfix of the jobs")
57 parser.add_argument("--mail", default="", type=str,
58 help="Email this user when the job finishes if specified")
59 parser.add_argument('--comment', default="", type=str,
60 help='Comment to pass to scheduler, e.g. priority message')
61 parser.add_argument(
62 "opts",
63 help="See lib/config/defaults.py for all options",
64 default=None,
65 nargs=argparse.REMAINDER,
66 )
67 return parser.parse_args()
68
69
70def get_shared_folder() -> Path:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected