Deploy a model and extract entities from text using the runtime API
Once you are satisfied with how your model performs, it is ready to be deployed and used to recognize entities in text. Deploying a model makes it available for use through the prediction API.
- A successfully created project with a configured Azure storage account.
- Text data that has been uploaded to your storage account.
- Labeled data and successfully trained model
- Reviewed the model evaluation details to determine how your model is performing.
See project development lifecycle for more information.
After you've reviewed your model's performance and decided it can be used in your environment, you need to assign it to a deployment. 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 of 10 deployments in your project.
To deploy your model from within the Language Studio:
Select Deploying a model from the left side menu.
Select Add deployment to start a new deployment job.
Select Create new deployment to create a new deployment and assign a trained model from the dropdown below. You can also Overwrite an existing deployment by selecting this option and select the trained model you want to assign to it from the dropdown below.
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.
Select Deploy to start the deployment job.
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.
After you are done testing a model assigned to one deployment and you want to assign this model to another deployment you can swap these two deployments. Swapping deployments involves taking the model assigned to the first deployment, and assigning it to the second deployment. Then taking the model assigned to second deployment, and assigning it to the first deployment. You can use this process 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:
In the Deploying a model page, select the two deployments you want to swap and select Swap deployments from the top menu.
From the window that appears, select the names of the deployments you want to swap.
To delete a deployment from within Language Studio, go to the Deploying a model page. 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:
- Make sure you've assigned yourself as a Cognitive Services Language Owner to the resource you used to create the project.
- Go to the Deploying a model page in Language Studio.
- Select the Regions tab.
- Select Add deployment resource.
- 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:
- Go to the Regions tab in the Deploy a model page.
- Select the resource you'd like to unassign.
- Select the Remove assignment button.
- In the window that appears, type the name of the resource you want to remove.
After you have a deployment, you can use it to extract entities from text.