It might be a silly thought, but please bear with me and guide me if I am taking the wrong approach. I am working on a Machine learning project whose model will give final output, this output from ML model is to be consumed by another project written and maintained in java.
A typical flow of REST call is as follows:
- The user requests some classification scores at UI.
- UI system calls Java API.
- Java API fetches data from the Storage system.
- then it preprocesses the data and presents it to the Trained model which is completely written, developed and trained in Python.
Problem: While making the ML model we have preprocessing steps written in python, data comes in and gets preprocessed and model training starts after that. After this model is being persisted to the location from where java can use this for real-time prediction.
Thought: Is it possible to wrap the preprocessing steps with the model as one package. so that at the java side the preprocessing can be avoided?
I want all your opinions on this for better handling of the situation. I do not want to write and maintain Feature engineering/Preprocessing steps at two places(Python and Java).
Please guide.