The invention relates to a templated deployment method for a
machine learning model and a custom operator. The method comprises the following steps: A, setting a universal template according to the prediction process of the
machine learning model; B, matching the framework name input by the user with the model name of the
machine learning model in a configuration file, and replacing substituters in the universal template with corresponding fields in the configuration file; C, generating an
executable file according to the universal template; D, running the universal template and the
machine learning model uploaded by the user in the form of a container in a
server, and adding the instantiated
machine learning model into the service sequence; and E, when the user makes an HTTP request, searching a
machine learning model instance in the service sequence according to the model ID or the custom
operator ID input by the user, calling a prediction method in the model instance for calculation, and returning a result. According to the method, the
deployment time of the machine learning model can be greatly shortened, and the personnel development cost and the
time cost in the deployment link are remarkably reduced.