Skip to contents

tt_model_archive() does two things:

  1. Saves a TT model to S3

  2. Writes a yaml file with model description to a local file.

Use tt_model_archive_read() to read a model from S3 given such a yaml file.

Usage

tt_model_archive(
  model,
  name,
  title,
  model_s3_path,
  yaml_dir = g6tr_here("atheneum/tt_archive")
)

tt_model_archive_read(yaml_path)

Arguments

model

A typing tool model created with shelf_make_tt_model.

name

A short code name for the typing tool. Will be cleaned up (janitor::make_clean_names) and used in the name of the yaml.

title

A descriptive name for the typing tool to print inside the yaml.

model_s3_path

Path in S3 "monorepo-data" bucket to save the model at. Not relative to the project folder.

yaml_dir

Local directory to store yaml files at. Default is "atheneum/tt_archive" relative to the monorepo root. Not recommended change.

yaml_path

Path to a local yaml to take the model location from.

Value

tt_model_archive() invisibly returns the resulting yaml path.

Examples

if (FALSE) { # \dontrun{
yaml_path <- tt_model_archive(
  model = example_tt_model,
  name = "example_tt_3_seg",
  title = "3-segment solution for g6tr.segmentation test data",
  model_s3_path = "test/models/tt_3_seg.rds"
)

tt_model_archive_read(yaml_path)
} # }