Azure ml workbench demo app keep failing during setup - azure

I installed Azure ML workbench and attempted to create an env with
az ml env setup -c -n -g --location
but keep getting failure
"code": "Conflict",
"message": "SubDeployment: OperationId=08586736946377270318, ProvisioningState=Failed, StatusCode=Conflict, StatusMessage=Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details.
How can I look into what this error is exactly, and how to get around it?

Related

When I am running a deployment command on my pipeline us it fails saying MSI is not configured properly

I am deploying a static react web app into azure static website (blob storage) using the command
While doing so I am doing it through Azure CLI (Inline command).
az storage blob upload-batch -s ./ -d '$web' \
--account-name <storage_acct_name> \
--account-key <storage_acct_key>
This command gives me an error
2022-11-17T08:27:29.5243851Z ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
2022-11-17T08:27:29.5244667Z Get Token request returned http error: 400, reason: Bad Request
2022-11-17T08:27:29.5274714Z ##[error]Error Code: [1]
2022-11-17T08:27:29.5283948Z ##[error]Error: Azure login failed using Managed Service Identity
2022-11-17T08:27:29.5285668Z ##[error]Script failed with error: ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
What could be possible solution to get over this issue.
I tried in my environment and successfully deployed static web app in $Web.
Before running the command make sure you have logged in with current credentials:
az login --tenant xxxx-xxxxxxxxxxxxxx-xxxxx”
Command:
az storage blob upload-batch -d '$web' -s < path > --account-name <account name > --account-key "<account key>
Console:
Portal:
Reference:
azure - Configuration of Managed Service Identity(MSI) - Stack Overflow for pipeline problems.
Getting token from Cloud Shell intermittently fails with 400 Client Error: Bad Request · Issue #11749 · Azure/azure-cli · GitHub

How to deploy multiple ml models with scoring file using azure ml cli

I'm trying to deploy the Multiple azure ml models from workspace with scoring script file but i'm unable to deploy 2 models with azure ml cli
az ml model deploy --name multi-model --model '[model1:9,model2:1]' --compute-target 'aks-cpu' --ic inferenceConfig.json -e 'inferen
ce-env' --ev 6 --dc aksDeploymentConfig.json -g 'Workspace' --workspace-name 'MLWorkspace' --as true --mi 1 --ma 2 --overwrite -v
But got error:
{'Azure-cli-ml Version': '1.41.0', 'Error': WebserviceException:
Message: ModelNotFound: Model with id [model1:9,model2:1] not found in provided workspace
InnerException None
ErrorResponse
{
"error": {
"message": "ModelNotFound: Model with id [model1:9,model2:1] not found in provided workspace"
}
}}
But i'm able to deploy single model without issue
For multi-models, i am able to do with python without any issue i.e.,
aks_service_name='modelsvc'
aks_service = Model.deploy(ws,
models=[model1,model2],
inference_config=inference_config,
deployment_config=gpu_aks_config,
deployment_target=aks_target,
name=aks_service_name,overwrite=True)
aks_service.wait_for_deployment(show_output=True)
Can anyone provide insight on this?
{'Azure-cli-ml Version': '1.41.0', 'Error': WebserviceException: Message: ModelNotFound: Model with id [model1:9,model2:1] not found in provided workspace InnerException None ErrorResponse { "error": { "message": "ModelNotFound: Model with id [model1:9,model2:1] not found in provided workspace" } }}
The above-mentioned error is due to two reasons.
The models were not available in the workspace created.
Creating workspace using CLI
az group create -n myresourcegroup -l westus2
az ml workspace create -w myworkspace -g myresourcegroup
az ml folder attach -w myworkspace -g myresourcegroup
for deploying multiple models using azure ML CLI, we need to use “-m” with the model’s name. We cannot add them into the workspace, as list element without mentioning “-m”.
--model -m : is the tag we need to add after the model's name
az ml model deploy --name multi-model --model -m '[model1:9,model2:1]' --compute-target 'aks-cpu' --ic inferenceConfig.json -e 'inference-env' --ev 6 --dc aksDeploymentConfig.json -g 'Workspace' --workspace-name 'MLWorkspace' --as true --mi 1 --ma 2 --overwrite -v

"az connectedk8s connect" has error "Problem loading the kubeconfig file.module 'collections' has no attribute 'Hashable'"

I am trying to connect my non aks k8s cluster to azure arc. I want to attempt to do this entirely through the cli. Looking at the quickstart-connect-cluster guide it skips right from resource group creation to the az connectedk8s connect step.
When attempting to connect to my cluster currently I get the following error:
$ az connectedk8s connect --name $STACK_NAME --resource-group $STACK_NAME --location eastus --tags Datacenter=miami-lab City=Miami StateOrDistrict=Florada CountryOrRegion=USA
This operation might take a while...
Problem loading the kubeconfig file.module 'collections' has no attribute 'Hashable'
I believe I may need to run some other az command to create any resources I may be missing under https://portal.azure.com/#view/Microsoft_Azure_HybridCompute/AzureArcCenterBlade/~/allresources
Am I missing some other resources I need to create before running the above command? If so, what is the az command needed to create these missing resrouces?

az cli deployment fails with Python error

I am deploying ADF linked templates from ADLS through GitHub Actions and pipeline fails withy generic Python error:
ERROR: 'str' object has no attribute 'get'
INFO: Command ran in 1.201 seconds (init: 0.389, invoke: 0.812)
Error: Process completed with exit code 1.
Deployment command is:
az deployment group create
--resource-group $ADF_RESOURCE_GROUP
--name $ADF_DEPLOYMENT_NAME
--what-if
--what-if-result-format ResourceIdOnly
--template-uri $TEMPLATE_URI
--query-string $SAS_TOKEN
--parameters factoryName=$FACTORY_NAME
What-if part is only for debugging purposes.
Here is official documentation

Create function app with Azure CLI (2.0.23) fails to link to deployment source url

I have a git repository configured with VSTS.I am trying to create a function app with deployment source url set to vsts git.
az functionapp create --name CSharpServerlessFunctions --storage-account xxxxxxxxxxxxxxxxxxx --resource-group xxxx --consumption-plan-location eastus --deployment-source-url https://xxxxxx.visualstudio.com/yyyyy/_git/CSharpServerlessFunctions --debug
Above cli command creates function but fails to link to git with following error.
Link to git repository failed due to error 'Deployment failed. Correlation ID: 84645178-264b-4267-8b8f-c83eaef274e4. Operation failed with status: 200. Details: Resource state Failed
Usually, we use the open source git in the command --deployment-source-url ,such as git in github. It means that every one can see the git and the CLI can access it without authentication.
However, the Git in VSTS is not open to everyone. CLI cannot link to git which you post in the command.
Solution:
You'd better use Azure portal for deployment(For Security) :
Linking your VSTS account to your Azure subscription > Your Function App >Platform features > Deployment options > Setup > Choose source > Visual Studio Team Services
Additional:
If you still want to use CLI to deploy function App, you need to complete complex steps to config your source. But I didn't test it for Git in VSTS.
Hope this helps!

Resources