示例#1
0
def UpdateConfig(config, file_path, key_name='algo'):
    _config = load_config(file_path)
    try:
        for key in _config[key_name]:
            config[key] = _config[key]
    except Exception as e:
        print(e)
        sys.exit()
    return config
示例#2
0
文件: agent.py 项目: yyht/RLs
def UpdateConfig(config, file_path, key_name='algo'):
    _config = load_config(file_path)
    key_values = _config[key_name]
    try:
        for key in key_values:
            config[key] = key_values[key]
    except Exception as e:
        logger.info(e)
        sys.exit()
    return config