Online Service Model upgrades

Brief introduction

The use of ModelService generally requires continuous model service upgrades. TensorFlow Serving is currently supported and can be implemented in Xiomi Cloud-ML services.

Note that when the model is exported, the model name and version can be specified. This version is a Serving version. It has nothing to do with the version of the model service created by Xiaomi Cloud-ML. The version of the model service is just a combination of the name and the name to designate a Serving service.

Model upgrades

If we want to upgrade the model, we only need to re-run the training task, specify the model version as 2, which will convert to 00000002 in the directory when exported. TensorFlow Serving will automatically load the new model to provide service in about 30 seconds.

Use https://github.com/tobegit3hub/deep_recommend_system as an example.

./dense_classifier.py --epoch_number 100 --model_version 2 --model_path fds://cloud-ml/upgraded_model

The test uses multiple client requests to verify whether the returned results have changed.

./predict_client.py --host 127.0.0.1 --port 9000 --model_name upgraded_model