handler_predict.accept_model {accept} | R 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()].
[Package accept version 1.0.2 Index]