示例#1
0
def config_with_file(configs):
    for key, value in configs.items():
        if "CV" == value["category"]:
            cv_module_info.add_module(key, {key: value})
        elif "NLP" == value["category"]:
            nlp_module_info.add_module(key, {key: value})
        print(key, "==", value["version"])
示例#2
0
def config_with_file(configs: dict):
    '''
    Config `cv_module_info` and `nlp_module_info` by configs.

    Args:
        configs(dict): Module info and configs

    Examples:
        .. code-block:: python

            configs = {'lac': {'version': 1.0.0, 'category': nlp}}
            config_with_file(configs=configs)
    '''
    for key, value in configs.items():
        if "CV" == value["category"]:
            cv_module_info.add_module(key, {key: value})
        elif "NLP" == value["category"]:
            nlp_module_info.add_module(key, {key: value})
        v2_module_info.add_module(key, {key: value})
        logger = log.get_file_logger(filename)
        logger.info("%s==%s" % (key, value["version"]))