Question about R, mlflow and models...
I am trying to register a R model using the crate flavor in mlflow, and I have some doubts.
I have been able to log and register the model. I have also tested that I can load the model again and use it for prediction (inputs/outputs are data.frames).
I was thinking... that would mean I should write the inference part in R, wouldn't it?
How could I deploy the model so it can be served as a general web service (REST API), not actually relying on final users to use R?
I'm now quite tired, but the only solution I have found is to maybe use plumbr to expose an API receiving a JSON with all the inputs as simple types, and generating the data.frame inside, as I have always done.
Do you think this can be done directly using a crated function? Has anybody done something similar?
Thanks in advance. I think this is a discussion worth having, as there is a lack of documentation on this topic for us R users. :(
#rstats #ml #machinelearning #models #mlflow #ai #datascience #data #prediction #mlops #modeldeployment
@keyeoh I've looked a lot at MLFlow, and the current support for R doesn't work great for anything beyond a quite simple function.
If what you want is a REST API, have you looked at vetiver?
https://vetiver.posit.co/
@juliasilge Thanks!
I really like the approach of vetiver and pins but mlflow is the official tool in my company. :-S
Maybe I can push a little bit to improve support for the R ecosystem. :-)
With mlflow, I have been able to serialize a model using create() and to register it. Doubts on serving the model rose as a consequence of the lack of documentation regarding mlflow & R, as you said.
I'll keep working on it. Thanks a lot, Julia! :)
@juliasilge Surprisingly, I'm currently not! :) Mlflow was chosen as a standalone tool, not as part of the Databricks ecosystem.
Maybe I can push and argue that for using vetiver, all I need is for them to let me have some space in S3. But our data crew is now very python-oriented.
In the meantime, as I have been able to log my model , I think I'll try to take this approach as a first MVP. I'll do some research...
Thanks again for your feedback!