tests/testthat/_snaps/stacks.md

can print stacks model

Code
  v
Output

  -- frog-stack - <bundled_model_stack> model for deployment 
  A regression stacked ensemble with 3 members using 4 features

create plumber.R for stacks

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(glmnet)
      library(parsnip)
      library(recipes)
      library(stacks)
      library(stats)
      library(workflows)
  }
  b <- board_folder(path = "<redacted>")
  v <- vetiver_pin_read(b, "frog-stack")

  #* @plumber
  function(pr) {
      pr %>% vetiver_api(v)
  }


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