We are thrilled to announce the release of vetiver , a framework for MLOps tasks in R and Python! The goal of vetiver is to provide fluent tooling to version, share, deploy, and monitor a trained model. If you like perfume or candles, you may recognize this name; vetiver, also known as the “oil of tranquility”, is used as a stabilizing ingredient in perfumery to preserve more volatile fragrances.
You can install the released version of vetiver for R from CRAN :
|
|
You can install the released version of vetiver for Python from PyPI :
|
|
We are sharing more about what vetiver is and how it works over on the RStudio blog so check that out, but we want to share here as well!
Train a model#
For this example, let’s work with data on everyone’s favorite dataset on fuel efficiency for cars to predict miles per gallon. In R, we can train a decision tree model to predict miles per gallon using a tidymodels workflow:
|
|
In Python, we can train the same kind of model using scikit-learn :
|
|
For both R and Python, the car_mod object is a fitted model, with parameters estimated using our training data mtcars.
Create a vetiver model#
We can create a vetiver_model() in R or VetiverModel() in Python from the trained model; a vetiver model object collects the information needed to store, version, and deploy a trained model.
|
|
|
|
See our documentation for how to use these deployable model objects and:
Be sure to also read more on the RStudio blog .
Acknowledgements#
We’d like to extend our thanks to all of the contributors who helped make these initial releases of vetiver for R and Python possible!
-
R package: @cderv , @ggpinto , @isabelizimm , @juliasilge , and @mfansler
-
Python package: @has2k1 , and @isabelizimm

