Automatically deploying the newest model

If you are using the production work flow within a project group, you can also turn on auto deploy. When auto deploy is turned on, PowerAI Vision automatically deploys a model when it is successfully trained and when it is marked as Production. PowerAI Vision automatically undeploys any deployed models when the associated trained model is marked as Rejected. Additionally, it tracks the latest model marked as Production or Untested and ensures that the latest production-ready model is deployed for a project group.

Note: If you do not mark a model as "production" or "rejected," and you manually deploy it, it will never be automatically undeployed by PowerAI Vision.

Overview

PowerAI Vision does the following when auto deploy is enabled:

When a model is newly trained
The latest trained model is marked Untested and it is automatically deployed. If there is another model marked Untested that is already deployed, the older deployed model is undeployed. The goal of this process is to help people who want to test the latest trained model.
When a model is marked as Production
When a trained model is marked as Production, it is automatically deployed. The goal of this process is to always keep the latest production-ready model deployed. If it is already deployed, the following happens:
  1. The deployed model becomes the current deployed Production model.
  2. Any other deployed Production model is undeployed.
  3. PowerAI Vision finds the most recent trained model with Untested status and deploys it. If there is no other trained model marked as Untested, attempted inferences to the latest Untested model will fail.
When a model is changed from Untested to Rejected
When a trained model is marked as Rejected, the associated deployed model is undeployed.
When a model is changed from Production to Rejected
When a trained model is marked as Rejected, the associated deployed model is undeployed. PowerAI Vision finds the most recent trained model with Production status and deploys it. If there is no other trained model marked as Production, attempted inferences to the latest Production model will fail.

Although auto deploy tracks and deploys the latest model marked with each status, you can manually deploy additional models from the project group by using the Models page. However, those additional models will not be accessible via the API shortcuts.

Figure 1. Auto deploy in PowerAI VisionThis image describes the auto deploy flow. Models are trained, deployed, tested, then are rejected or accepted. Rejected models are undeployed. Accepted models should be moved to Production status and are automatically deployed.

Enabling auto deploy

To enable auto-deploy, you need to set two pieces of information via the API. You can use CURL to set them.

curl -kXPUT -H "x-auth-token: paiv-auth-token-value" https://paiv-server.your_company.com/powerai-vision/projects/{project-UUID} -d '{"enforce_pwf": "true", "auto_deploy":"true"}'
Note: Case is ignored for the true string, but the word must be true. For example, it will not work if you set the value as yes.