Reputation: 33
I have implemented a ML model using scipy
in Python. This model solves a linear regression estimation problem that constraints the regression weights to be inside a given interval.
Once the model is calibrated, I store the weights returned by scipy.optimize
and use them like this in order to predict new samples:
import numpy as np
def predict(scipy_model, x_test):
w = scipy_model.x
y_pred = np.sum(w * x_test, axis=1)
return y_pred
I want to deploy this model in a production environment using mlflow
. However, I haven't been able to see how to integrate scipy
with mlflow
in the docs.
If it is not possible, can I create a custom "Model" class that has custom train
and predict
functions and integrate it with mlflow
?
Upvotes: 0
Views: 39