Upgrading 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:

  1. Publish and stage the new model version. For detailed steps, see Staging a Model Version.

  2. In the model list, click the model name to open the Model Version Management page to view all model versions in Production or Staging status.

  3. Click the Deployment Instance tab, and then click the deployment instance name of the model version to be upgraded in the deployment instance list.

    ../_images/upgrade_version.png
  4. 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.

    ../_images/select_upgrade_version.png
  5. 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.

    ../_images/version_percentage.png
  6. 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.

    ../_images/publish_new_version_config.png
  7. 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.

    ../_images/published_new_version.png

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:

    ../_images/weighted_average.png
  • 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:

    ../_images/specify_only.png


You can use the blue/green deployment method to upgrade the model version by following these steps:

  1. In the model list, click a model name to open the Model Version Management page.

  2. 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.

    ../_images/blue_green_deployment.png
  3. 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.
    ../_images/blue_green_deployment_1.png
    • 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.
    ../_images/blue_green_deployment_2.png
  4. 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:

    ../_images/multi_armed_bandit.png


You can use the Multi-Armed Bandit deployment method to upgrade the model version by following these steps:

  1. In the model list, click a model name to open the Model Version Management page.

  2. 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.

    ../_images/multi_armed_bandit_deployment.png
  3. Click Deploy in the upper right corner of Model Deployment page, and the system will deploy the model version according to the configuration.