MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / parse_args

Function parse_args

tools/visualize.py:51–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49
50
51def parse_args():
52 parser = argparse.ArgumentParser(description='mogen evaluation')
53 parser.add_argument('config', help='test config file path')
54 parser.add_argument('checkpoint', help='checkpoint file')
55 parser.add_argument('--text', help='motion description', nargs='+')
56 parser.add_argument('--motion_length',
57 type=int,
58 help='expected motion length',
59 nargs='+')
60 parser.add_argument('--out', help='output animation file')
61 parser.add_argument('--pose_npy',
62 help='output pose sequence file',
63 default=None)
64 parser.add_argument('--launcher',
65 choices=['none', 'pytorch', 'slurm', 'mpi'],
66 default='none',
67 help='job launcher')
68 parser.add_argument('--local_rank', type=int, default=0)
69 parser.add_argument('--device',
70 choices=['cpu', 'cuda'],
71 default='cuda',
72 help='device used for testing')
73 args = parser.parse_args()
74 if 'LOCAL_RANK' not in os.environ:
75 os.environ['LOCAL_RANK'] = str(args.local_rank)
76 return args
77
78
79def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected