Learn R Programming

accept (version 1.0.2)

handler_predict.accept_model: Model handler functions for API endpoint

Description

Useful for supporting accept_model class in vetiver

Usage

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

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()].

Arguments

vetiver_model

A deployable [vetiver_model()] object

...

any other inputs