AgitatedDove14 thanks but I’m not using argparse
, I’m using jsonargparse
you can see the simplified snippet herefrom jsonargparse import ArgumentParser from trains import Task model_snapshots_path = 'mnt/trains' task = Task.init(project_name='examples', task_name='test argparser', output_uri=model_snapshots_path) logger = task.get_logger() def main(args): print('Got args: %s' % args) if __name__ == '__main__': parent_parser = ArgumentParser(add_help=False) parent_parser.add_argument('--num_workers', help='integer value', type=int, default=1) parent_parser.add_argument('--gpus', help='integer value', type=int, default=0) parent_parser.add_argument('--max_epochs', help='integer value', type=int, default=1) parent_parser.add_argument('--visdom', action='store_true') main(parent_parser.parse_args())