handler_predict.accept_model: Model handler functions for API endpoint

View source: R/vetiver-compatibility.R

handler_predict.accept_modelR Documentation

Model handler functions for API endpoint

Description

Useful for supporting accept_model class in vetiver

Usage

## S3 method for class 'accept_model'
handler_predict(vetiver_model, ...)

Arguments

vetiver_model

A deployable [vetiver_model()] object

...

any other inputs

Value

A 'handler_startup' function should return invisibly, while a 'handler_predict' function should return a function with the signature 'function(req)'. The request body ('req$body') consists of the new data at prediction time; this function should return predictions either as a tibble or as a list coercable to a tibble via [tibble::as_tibble()].


resplab/accept documentation built on July 5, 2023, 2:25 p.m.