dot-has_checkpoint: Check whether the user already has a checkpoint

.has_checkpointR Documentation

Check whether the user already has a checkpoint

Description

Check the specified dir (or the default dir if none is specified) for a given model or url.

Usage

.has_checkpoint(model = NULL, 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

A logical indicating whether the user already has that checkpoint in that location.


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