Search code examples
mlflow

How to deploy mlflow model with data preprocessing(text data)


I have developed keras text classification model. I have preprocessed data(tokenization). I have logged trained model successfully(mlflow.keras.log_model). I have served model using mlflow serve. Now while doing prediction on text data I need to do preprocessing using same tokenizer object used for training. How to preprocess test data and get predictions from served model.


Solution

  • You can log a custom python model: https://www.mlflow.org/docs/latest/models.html#custom-python-models