예제 #1
0
파일: policy.py 프로젝트: luweishuang/tatk
def load_config(args):
    config = util.unicode_to_utf8(
        json.load(open('%s.json' % args.model_path, 'rb')))
    for key, value in args.__args.items():
        try:
            config[key] = value.value
        except:
            config[key] = value

    return config
예제 #2
0
def load_config(args):
    config = util.unicode_to_utf8(
        json.load(open(os.path.join(os.path.dirname(__file__), args.model_path + '.json'), 'rb')))
    for key, value in args.__args.items():
        try:
            config[key] = value.value
        except:
            config[key] = value

    return config