Ejemplo n.º 1
0
def process_config(config_path=None):
    arg_parser = eval_argparser()
    args, _ = arg_parser.parse_known_args()
    if config_path:
        args.__setattr__("config", config_path)
    config = _read_config(args.config)

    _, run_config = config[0]
    args_copy = copy.deepcopy(args)
    config_list = _convert_config(run_config)
    run_args = arg_parser.parse_args(config_list, namespace=args_copy)
    run_args_dict = vars(run_args)

    # set boolean values
    for k, v in run_config.items():
        if v.lower() == 'false':
            run_args_dict[k] = False
    return run_args, run_config
Ejemplo n.º 2
0
def _eval():
    arg_parser = eval_argparser()
    process_configs(target=__eval, arg_parser=arg_parser)
Ejemplo n.º 3
0
def _predict():
    arg_parser = eval_argparser()
    process_configs(target=__predict, arg_parser=arg_parser)