|
Say I have a production web service which takes some input and uses that input against a trained model to predict classes. I also have a separate train/test infrastructure set up to actually create the models. I want to keep the web service infrastructure and the train/test infrastructure in separate code bases. Obviously there is a common component between the two, namely feature extraction. I do not want the feature extraction code duplicated between the two code bases. Is there a typical ML architecture to accomplish this? Am I going about this all wrong? |
|
One option is to simply share the feature extraction code, either as a library that gets linked into both your service and your train/tester or as a service which both things can make RPCs to (and which might run in the same machine as the train/test thing during training for efficiency). If you choose not to share the code for some reason at least write functional unit tests that make sure that the frontend and backend code are guaranteed to generate the same features given the same data. |