dot-maybe_download_checkpoint: Find or Possibly Download a Checkpoint

.maybe_download_checkpointR Documentation

Find or Possibly Download a Checkpoint

Description

Verify that the user has a specified checkpoint, and prompt to download if they don't (in interactive mode).

Usage

.maybe_download_checkpoint(
  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"),
  dir = NULL,
  ckpt_dir = NULL
)

Arguments

model

Character vector. Which model checkpoint to download.

dir

Character vector. Destination directory for checkpoints. Leave NULL to allow RBERT to automatically choose a directory. The path is determined from the dir parameter if supplied, followed by the 'RBERT.dir' option (set using set_BERT_dir), followed by an "RBERT" folder in the user cache directory (determined using user_cache_dir). If you provide a dir, the 'RBERT.dir' option will be updated to that location. Note that the checkpoint will create a subdirectory inside this dir.

ckpt_dir

The path to the subdir where this checkpoint should be saved. If model is given, ckpt_dir is inferred.

Value

TRUE (invisibly)


jonathanbratt/RBERT documentation built on Jan. 26, 2023, 4:15 p.m.