Deployment Framework - Static Machine Learning Model
- Separate Training from the Server:
-
Static model is trained offline. That is, we train the model exactly once and then use that trained model for a while.
-
The model training is done on the local machine and once the model is complete, it is saved and transferred to server to make live predictions.
-
Packaging ML Model: the machine learning model is packaged as file in the following format (python):
-
Pickle file: converts python object to byte stream.
-
Predictive model markup language: xml based file format for saving prediction model.
-
Joblib File: A faster method for saving the model trained on a large dataset.
-
Gzip File: compress model to save storage space
-
-
The packaged ML model can be easily loaded by the server.
- ML Model as Standalone Model:
-
Every pre-processing step and feature engineering is replicated on the server-side for transforming raw input.
-
The server loads the ML model only.
-
The transformed input is put in the model and the model outputs prediction in the required format.
- Advantage of static model:
- Static Model is cheaper to create and maintain than Dynamic Model which uses online training methodology.
- Drawback of static model:
- Many information sources through which data is extracted and trained on, change over time, therefore, the input data must be monitored.
References