Function parity for R and Python
This page is a translation guide for users interested in the operational parity between the R and Python versions of vetiver. Vetiver aims to provide users with a similar experience in each language. For a deeper understanding of each implementation, please refer to the R function reference or Python function reference.
Function | R | Python |
---|---|---|
Create a vetiver object for deployment of a trained model | vetiver_model() new_vetiver_model() |
VetiverModel() |
Read and write a trained model to a board of models | vetiver_pin_write() vetiver_pin_read() |
vetiver_pin_write() VetiverModel.from_pin() |
Create an API to predict with a deployable vetiver_model() object | vetiver_api() vetiver_pr_post() vetiver_pr_docs() |
VetiverAPI() VetiverAPI.vetiver_post() |
Write a deployable API file for a vetiver model | vetiver_write_plumber() |
write_app() |
Deploy a vetiver model API to Posit Connect | vetiver_deploy_rsconnect() |
deploy_rsconnect() |
Create a model API endpoint object for prediction | vetiver_endpoint() |
vetiver_endpoint() |
Post new data to a deployed model API endpoint and return predictions | predict() |
predict() |
Fully attach or load packages for making model predictions | attach_pkgs() load_pkgs() |
load_pkgs() |
Model handler functions for API endpoint | handler_startup() handler_predict() |
VetiverHandler.handler_predict() |
Identify data types for each column in an input data prototype | map_request_body() |
|
Model constructor methods | vetiver_create_description() vetiver_prepare_model() |
VetiverHandler.describe() |
Metadata constructors for vetiver model object | vetiver_meta() vetiver_create_meta() |
VetiverHandler.create_meta() vetiver_create_meta() |
Create a vetiver input data prototype | vetiver_ptype() vetiver_create_ptype() |
vetiver_create_ptype() |
Convert new data at prediction time using input data prototype | vetiver_type_convert() |
|
Compute and aggregate model metrics over time for monitoring | vetiver_compute_metrics() |
compute_metrics() |
Update and save model metrics over time for monitoring | vetiver_pin_metrics() |
pin_metrics() |
Plot model metrics over time for monitoring | vetiver_plot_metrics() |
plot_metrics() |
Generate template for model monitoring dashboard | vetiver_dashboard() |
|
Generate template for model card | Use "vetiver_model_card" template |
model_card() |