In some functions, the user can specify a model, a ckpt_dir, and/or specific paths to checkpoint files. This function sorts all of that out.
.infer_model_paths(
model = c("bert_base_uncased", "bert_base_cased", "bert_large_uncased",
"bert_large_cased", "bert_large_uncased_wwm", "bert_large_cased_wwm",
"bert_base_multilingual_cased", "bert_base_chinese", "scibert_scivocab_uncased",
"scibert_scivocab_cased", "scibert_basevocab_uncased", "scibert_basevocab_cased"),
ckpt_dir = NULL,
vocab_file = find_vocab(ckpt_dir),
bert_config_file = find_config(ckpt_dir),
init_checkpoint = find_ckpt(ckpt_dir)
)
Character; which model checkpoint to use. If specified,
ckpt_dir
, codevocab_file, bert_config_file
, and
init_checkpoint
will be inferred. If you do not have this
checkpoint, you will be prompted to download it in interactive mode.
Character; path to checkpoint directory. If specified, any
other checkpoint files required by this function (vocab_file
,
bert_config_file
, or init_checkpoint
) will default to
standard filenames within ckpt_dir
.
path to vocabulary file. File is assumed to be a text file, with one token per line, with the line number corresponding to the index of that token in the vocabulary.
Character; the path to a json config file.
Character; path to the checkpoint directory, plus checkpoint name stub (e.g. "bert_model.ckpt"). Path must be absolute and explicit, starting with "/".
A list with components vocab_file, bert_config_file, and init_checkpoint.