Deploying model to specified ACI instance
The below code sample from the doc is deploying the model to a randomly named ACI instance. For e.g.
from azureml.core.webservice import AciWebservice, Webservice
from azureml.core.model import Model
deployment_config = AciWebservice.deploy_configuration(cpu_cores = 1, memory_gb = 1)
service = Model.deploy(ws, "aciservice", [model], inference_config, deployment_config)
service.wait_for_deployment(show_output = True)
print(service.state)
This creates an aci named as aciservice-jesUTi_FHUyvjSE5wGnoBw instead of just aciservice. How do we specify the exact aci name to be deployed to? I like to use as below.
service = Model.deploy(ws, "aciservice", [model], inference_config, deployment_config, overwrite=True)
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 261e56b6-ce2d-e8dd-df5e-fbe5e3bddd4e
- Version Independent ID: 6ff4988c-7c44-1bb5-3221-c3a473b9565f
- Content: How to deploy models to Azure Container Instances with CLI (v1) - Azure Machine Learning
- Content Source: articles/machine-learning/v1/how-to-deploy-azure-container-instance.md
- Service: machine-learning
- Sub-service: mlops
- GitHub Login: @Bozhong68
- Microsoft Alias: bozhlin
@kiranpradeep Thanks for your feedback! We will investigate and update as appropriate.
@kiranpradeep Thank you for bringing this to our attention. I've assigned this issue to the author who will investigate and update as appropriate.
@Bozhong68 Could you please review add comments on this, update as appropriate.
This is explained with an "important" note in the end of below article: https://learn.microsoft.com/en-us/azure/machine-learning/v1/how-to-deploy-azure-container-instance
We could update the article and move the "important" note to the beginning of the article.
@Bozhong68 I feel that paragraph also needs rewording for clarity. It starts with word "We". The reader is confused which of following falls under "We"
- Azure CLI
- Azure Portal
- ARM/Bicep template
- Azure ML SDK
- or the core Azure ARM itself