Deploy a model

Once you are satisfied with how your model performs, it's ready to be deployed, and query it for predictions from utterances. Deploying a model makes it available for use through the prediction API.

Prerequisites

See project development lifecycle for more information.

Deploy model

After you have reviewed the model's performance and decide it's fit to be used in your environment, you need to assign it to a deployment to be able to query it. Assigning the model to a deployment makes it available for use through the prediction API. It is recommended to create a deployment named production to which you assign the best model you have built so far and use it in your system. You can create another deployment called staging to which you can assign the model you're currently working on to be able to test it. You can have a maximum on 10 deployments in your project.

To deploy your model from within the Language Studio:

  1. Select Deploying a model from the left side menu.

  2. Select Add deployment to start the Add deployment wizard.

    A screenshot showing the model deployment button in Language Studio.

  3. Select Create a new deployment name to create a new deployment and assign a trained model from the dropdown below. You can otherwise select Overwrite an existing deployment name to effectively replace the model that's used by an existing deployment.

    Note

    Overwriting an existing deployment doesn't require changes to your Prediction API call but the results you get will be based on the newly assigned model.

    A screenshot showing the screen for adding a new deployment in Language Studio.

  4. Select a trained model from the Model dropdown.

  5. Select Deploy to start the deployment job.

  6. After deployment is successful, an expiration date will appear next to it. Deployment expiration is when your deployed model will be unavailable to be used for prediction, which typically happens twelve months after a training configuration expires.

Swap deployments

After you are done testing a model assigned to one deployment, you might want to assign it to another deployment. Swapping deployments involves:

  • Taking the model assigned to the first deployment, and assigning it to the second deployment.
  • taking the model assigned to second deployment and assign it to the first deployment.

This can be used to swap your production and staging deployments when you want to take the model assigned to staging and assign it to production.

To swap deployments from within Language Studio

  1. In the Deploy model page, select the two deployments you want to swap and select Swap deployments from the top menu.

  2. From the window that appears, select the names of the deployments you want to swap.

    A screenshot showing a swapped deployment in Language Studio.

Delete deployment

To delete a deployment from within Language Studio, select the Deploy model page. Then select the deployment you want to delete, and select Delete deployment from the top menu.

Assign deployment resources

You can deploy your project to multiple regions by assigning different Language resources that exist in different regions.

To assign deployment resources in other regions in Language Studio:

  1. Make sure you've assigned yourself as a Cognitive Services Language Owner to the resource you used to create the project.
  2. Go to the Deploying a model page in Language Studio.
  3. Select the Regions tab.
  4. Select Add deployment resource.
  5. Select a Language resource in another region.

You are now ready to deploy your project to the regions where you have assigned resources.

Unassign deployment resources

When unassigning or removing a deployment resource from a project, you will also delete all the deployments that have been deployed to that resource's region.

To unassign or remove deployment resources in other regions using Language Studio:

  1. Go to the Regions tab in the Deploy a model page.
  2. Select the resource you'd like to unassign.
  3. Select the Remove assignment button.
  4. In the window that appears, type the name of the resource you want to remove.

Next steps