Upgrade a Model Version¶
After the development of a new version of the model is completed, the new version can be staged. The model version can be upgraded through the following deployment methods, and you can select the optimal version according to different returned results:
Canary Deployment: It refers to assigning a percentage of traffic to each model version. The canary deployment does not require fusion optimization, and the model version needs to be manually selected according to the returned results of the model version.
Blue/Green Deployment: It refers to using request copy mode so that each model version gets the same service request and data traffic. You can trace the historical results of the deployed model version to determine the historical model value changes and result performance. You can manually select the model version according to the indicator results or the specific ranking of the monitoring indicators.
Multi-Armed Bandit: It refers to selecting the best model version through reinforcement learning. The model combines external feedback data to automatically select the best results in the exploration environment.
Canary Deployment¶
You can use the canary deployment method to upgrade the model version by following these steps:
Publish and stage the new model version. For detailed steps, see Staging a Model Version.
In the model list, click the model name to open the Model Version Management page to view all model versions in
Production
orStaging
status.Click the Deployment Instance tab, and then click the deployment instance name of the model version to be upgraded in the deployment instance list.
In the opened Model Deployment page, click Upgrade to New Version. In the Object Version and Upgrade Method pop-up window, select the target version to be upgraded, and then click OK.
In the Model Deployment canvas, select the Router card, and then select the Canary Deployment upgrade method in the Routing Server Configuration > Dispatcher window on the right side, and assign the traffic proportion to the model versions.
In the Model Deployment canvas bar, select the card of the model version to be upgraded, and then configure the resources for running the version in the Deployment Configuration window on the right side.
Click Deploy in the upper right corner of the page, and the system will deploy the new model version according to the resource configuration and allocate traffic to each model version according to the configured version traffic proportion. In the deployment log, you can view the deployment status and results of the model version.
Blue/Green Deployment¶
The Blue-green deployment is a deployment method for multiple model versions. After the model version is successfully deployed using the blue-green deployment method, the result of the optimal version selected through model combination will be obtained.
There are two methods for model combination optimization:
Weighted Average: Multiple model versions are deployed online, and all versions get the same full traffic in the traffic configuration. The feedback is monitored according to the model production indicators, the percentage configuration is set for each model version, and then a combination result will be returned after weighted average, as shown in the following figure:
Specify Only: Multiple model versions are deployed online, and all versions get the same full traffic in the traffic configuration. The feedback is monitored according to the model production indicators, and one model version is specified to return the results, as shown in the following figure:
You can use the blue/green deployment method to upgrade the model version by following these steps:
In the model list, click a model name to open the Model Version Management page.
On the Model Version Management page, click the deployment instance name. In the Model Deployment canvas, select the Router card, and then select the Blue/Green Deployment upgrade method in the Routing Server Configuration > Dispatcher window on the right side.
In the Routing Server Configuration > Combiner window, set the method of model combination optimization:
If you need to use the Weighted Average method, select Weighted Average from the Upgrade Method dropdown menu, and assign a weight to each model version.
If you need to use the Specify Only method, select Specify Only from the Upgrade Method dropdown menu, and select a model version to return the results.
Click Deploy in the upper right corner of Model Deployment page, and the system will deploy the model versions according to the configuration.
Multi-Armed Bandit¶
After the model version is successfully deployed by using the Multi-Armed Bandit deployment method, the feedback of the model will be combined for multi-armed bandit evaluation, which mainly covers the following steps:
Deploy multiple candidate model versions at the same time, where the traffic configuration of all versions is explored dynamically through the slot machine computing.
Send the feedback value of the model to the slot machine for exploration computing. In the model prediction process, only the model version with the highest accuracy is selected to return the results after calculating and exploring the predictor value and the real feedback value of each version, as shown in the following figure:
You can use the Multi-Armed Bandit deployment method to upgrade the model version by following these steps:
In the model list, click a model name to open the Model Version Management page.
On the Model Version Management page, click the deployment instance name. In the Model Deployment canvas, select the Router card, and then select the Multi-Armed Bandit upgrade method in the Routing Server Configuration > Dispatcher window on the right side.
Click Deploy in the upper right corner of Model Deployment page, and the system will deploy the model version according to the configuration.