Vetiver: Combining R and Python Models

Vetiver is a framework being designed for both R and Python. Yet from what I can tell, the project is interested in keeping the two separated from one another.

For example, when doing a REST API deployment R users are referred to Plumber and Pythoners to FastAPI.

But what if we wanted to have an entry point for interacting with both scikit (python) and tidymodels (R) models? Is the only way to do this right now interfacing between two seperate APIs?

I am not familiar with an API framework that would allow us to natively serve endpoints for both R and for Python, but I would definitely be interested in learning about such a piece of software if it exists.

One possibility that could be pursued right now (although it would involve customization/change to the generated vetiver Plumber files), if you were interested in having one API vs. two, is to use reticulate to call Python from R in a plumber API. You could make predictions from the Python vetiver model via reticulate in R, much like this example from the Solutions Engineering team.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.