tests/testthat/_snaps/luz.md

can print a vetivered luz model

Code
  v
Output

  -- cars-luz - <bundled_luz_module_fitted> model for deployment 
  A luz module with 11 parameters using 10 features

create plumber.R for keras

Code
  cat(readr::read_lines(tmp), sep = "\n")
Output
  # Generated by the vetiver package; edit with care

  library(pins)
  library(plumber)
  library(rapidoc)
  library(vetiver)

  # Packages needed to generate model predictions
  if (FALSE) {
      library(luz)
      library(torch)
  }
  b <- board_folder(path = "<redacted>")
  v <- vetiver_pin_read(b, "cars-luz")

  #* @plumber
  function(pr) {
      pr %>% vetiver_api(v)
  }
Code
  cat(readr::read_lines(fs::path(fs::path_dir(tmp), ".Renviron")), sep = "\n")
Output
  TORCH_INSTALL=1
  TORCH_HOME="libtorch/"


tidymodels/vetiver documentation built on Oct. 15, 2024, 4:16 p.m.