Machine learning operations, or MLOps, is a set of practices to deploy and maintain machine learning models in production reliably and efficiently. The vetiver framework is for MLOps tasks in Python and R.

Vetiver, the oil of tranquility, is used as a stabilizing ingredient in perfumery to preserve more volatile fragrances.

The goal of vetiver is to provide fluent tooling to version, deploy, and monitor a trained model. Functions handle both recording and checking the model’s input data prototype, and predicting from a remote API endpoint.

During the MLOps cycle, we collect data, understand and clean the data, train and evaluate a model, deploy the model, and monitor the deployed model. Monitoring can then lead back to collecting more data. There are many great tools available to understand clean data (like pandas and the tidyverse) and to build models (like tidymodels and scikit-learn). Use the vetiver framework to deploy and monitor your models.

Data scientists have effective tools that they ❤️ to:
  • collect data
  • prepare, manipulate, refine data
  • train models
There is a lack 😩 of effective tools to:
  • version and publish models
  • put models into production
  • monitor model performance

Use vetiver to version and deploy your trained models.

library(vetiver)
cars_lm <- lm(mpg ~ ., data = mtcars)
vetiver_model(cars_lm, "cars_linear")

── cars_linear ─ <butchered_lm> model for deployment 
An OLS linear regression model using 10 features
from vetiver import VetiverModel
from vetiver.data import mtcars
from sklearn.linear_model import LinearRegression

model = LinearRegression().fit(mtcars.drop(columns="mpg"), mtcars["mpg"])
v = VetiverModel(model, model_name = "cars_linear", 
                 prototype_data = mtcars.drop(columns="mpg"))
v.description
'A scikit-learn LinearRegression model'