Closed joscani closed 3 weeks ago
I haven't tried this myself, but we do provide a lot of hooks into the deployment process for more advanced use cases so I would be interested in hearing about how it goes for you. I think I would try a process like:
plumber.R
and then edit itMaybe something like this?
# Generated by the vetiver package; edit with care
library(pins)
library(plumber)
library(rapidoc)
library(vetiver)
library(future)
library(promises)
b <- board_connect(auth = "envvar")
v <- vetiver_pin_read(b, "user.name/model-name", version = "version-number")
#* @plumber
function(pr) {
promises::future_promise({ pr %>% vetiver_api(v) })
}
Have you tried anything like this before?
Once you have your plumber file, you can deploy it in whatever way it appropriate for your infrastructure, like rsconnect::deployAPI()
or using Docker or similar.
Interestint. I'll try this weekend.
Thanks @juliasilge
Let us know if you have further questions!
Is there any way of use promises::future_promise in an endpoint of vetiver api?
In my regular plumbers api I have something like that