Ejemplo n.º 1
0
def merge_config(args_config):
    config_file_path = args_config.config_path
    config_dict = yaml.safe_load(open(config_file_path))
    config = Config(config_dict[args_config.config_name])
    config.update_args(args_config)
    LOGGING.info("=" * 10 + "... Model Configs ..." + "=" * 10)
    LOGGING.info("{}".format(config.to_json_string()))
    bert_config = Config.from_json_file(
        os.path.join(args_config.bert_model, "config.json"))
    LOGGING.info("=" * 10 + "... PRETRAINED Model Configs ..." + "=" * 10)
    LOGGING.info("{}".format(bert_config.to_json_string()))
    return config
Ejemplo n.º 2
0
def merge_config(args_config):
    config_file_path = args_config.config_path 
    config_dict = yaml.safe_load(open(config_file_path))
    config = Config(config_dict[args_config.config_name])
    config.update_args(args_config)
    return config