dotnet / dotnet/machinelearning-modelbuilder
Image classification & Object detection: Cannot create a new workspace for Azure environment.
- Lingua principale
- Dockerfile
- Stelle
- 285
- Fork
- 66
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**System Information (please complete the following information):**
Windows OS: Windows-11-Enterprise-24H2
ML.Net Model Builder 2022: 17.19.2.2522504 (Main Build)
Microsoft Visual Studio Enterprise: 2022(17.13.6)
.Net Core: 8.0,9.0
**Describe the bug**
- On which step of the process did you run into an issue:
Cannot create a new workspace for Azure environment.
**TestMatrix**
**To Reproduce**
Steps to reproduce the behavior:
1. Select Create a new project from the Visual Studio start window.
2. Choose the C# Console App (.NET Core) project template.
3. Add model builder by right click on the project.
4. Select "Image classification or Object detection" scenario.
5. On the "Environment" page, choose "Azure" option and then click "Set up workspace" button.
6. Choose "ML.NET Model Builder Demo" subscription and then click "New Workspace" link.
7. Provide the name, regions, RG on the "Create new workspace" dialog, then click "Create" button.
8. Model Builder error occurs: **Resource 'fullloctest02storageafh' was disallowed by policy. Reasons: 'This request was denied due to internal policy. Local authentication methods are not allowed.**
**Expected behavior**
Workspace can be created successfully.
**Screenshot:**

**Additional context:**
2025-04-29 07:12:05.4294 DEBUG Resource 'fullloctest02storageafh' was disallowed by policy. Reasons: 'This request was denied due to internal policy. Local authentication methods are not allowed. For more information, refer to https://aka.ms/safesecretsstandard.'. See error details for policy resource IDs.
Status: 403 (Forbidden)
ErrorCode: RequestDisallowedByPolicy
Content:
{"error":{"code":"RequestDisallowedByPolicy","target":"fullloctest02storageafh","message":"Resource 'fullloctest02storageafh' was disallowed by policy. Reasons: 'This request was denied due to internal policy. Local authentication methods are not allowed. For more information, refer to https://aka.ms/safesecretsstandard.'. See error details for policy resource IDs.","additionalInfo":[{"type":"PolicyViolation","info":{"evaluationDetails":{"evaluatedExpressions":[{"result":"True","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Storage/storageAccounts","targetValue":"Microsoft.Storage/storageAccounts","operator":"Equals"},{"result":"True","expressionKind":"Field","expression":"Microsoft.Storage/storageAccounts/allowSharedKeyAccess","path":"properties.allowSharedKeyAccess","expressionValue":"******","targetValue":"false","operator":"Exists"},{"result":"True","expressionKind":"Field","expression":"tags[Az.Sec.DisableLocalAuth.Storage::Skip]","path":"tags[Az.Sec.DisableLocalAuth.Storage::Skip]","targetValue":"false","operator":"Exists"},{"result":"True","expressionKind":"Value","expression":"[contains(resourceGroup().tags, parameters('skipTagName'))]","expressionValue":false,"targetValue":"false","operator":"Equals"},{"result":"True","expressionKind":"Value","expression":"[contains(subscription().tags, parameters('skipTagName'))]","expressionValue":false,"targetValue":"false","operator":"Equals"},{"result":"True","expressionKind":"Value","expression":"all_regions","expressionValue":"all_regions","targetValue":["all_regions"],"operator":"In"}],"reason":"This request was denied due to internal policy. Local authentication methods are not allowed. For more information, refer to https://aka.ms/safesecretsstandard."},"policyDefinitionId":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/policyDefinitions/8e7a35ba-088b-4288-9dd0-c01bbecdcdbc-1.0","policyDefinitionName":"8e7a35ba-088b-4288-9dd0-c01bbecdcdbc-1.0","policyDefinitionDisplayName":"Azure Storage Policy to disable local auth - Opt In-1.0","policyDefinitionVersion":"1.0.0","policyDefinitionEffect":"deny","policyAssignmentId":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/policyAssignments/SafeSec-Strg-OptIn-V1-0","policyAssignmentName":"SafeSec-Strg-OptIn-V1-0","policyAssignmentDisplayName":"Azure Storage Policy to disable local auth - Opt In-1.0","policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","policyAssignmentParameters":{"heavyRegions":["eastus"],"pilotRegions":["westcentralus","eastasia"],"effect":"deny","mediumRegions":["uksouth"],"canaryRegions":["centraluseuap","eastus2euap"],"regionCodeMapping":{"uaecentral":"auh","eastasia":"hk","japaneast":"ty","southcentralus":"sn","westus3":"usw3","eastus2euap":"cbn","canadaeast":"yq","australiasoutheast":"ml","uksouth":"ln","australiacentral2":"cbr2","southeastus":"usse1","jioindiacentral":"jinc","westcentralus":"cy","australiacentral":"cbr","centraluseuap":"cdm","norwayeast":"noe","northeurope":"db","brazilnortheast":"brne","brazilsouth":"cq","apacsoutheast2":"kul","italynorth":"itn","eastusslv":"use","malaysiasouth":"mys","australiaeast":"sy","centralindia":"pn","koreacentral":"se","malaysiawest":"myw","southafricawest":"cpt","francesouth":"mrs","westindia":"bm","eastus2":"bn","koreasouth":"ps","switzerlandnorth":"chn","israelcentral":"ilc","eastus":"bl","southcentralusstg":"ustsc","ukwest":"cw","swedensouth":"ses","uaenorth":"dxb","qatarcentral":"qac","brazilsoutheast":"brse","westus":"by","mexicocentral":"mxc","spaincentral":"esc","southafricanorth":"jnb","germanynorth":"den","germanywestcentral":"dewc","chilecentral":"clc","southeastasia":"sg","norwaywest":"now","koreasouth2":"krs2","jioindiawest":"jinw","westeurope":"am","taiwannorth":"twn","westus2":"mwh","northcentralus":"ch","taiwannorthwest":"twnw","newzealandnorth":"nzn","francecentral":"par","japanwest":"os","southindia":"ma","polandcentral":"plc","eastusstg":"uste","switzerlandwest":"chw","canadacentral":"yt","swedencentral":"sec","centralus":"dm","disabled":"."}},"policyExemptionIds":[],"policyEnrollmentIds":[]}}]}}
Headers:
Pragma: no-cache
x-ms-failure-cause: REDACTED
x-ms-request-id: ac5f458e-3aa1-4708-9164-a5ec802dd969
x-ms-correlation-request-id: REDACTED
x-ms-routing-request-id: REDACTED
Strict-Transport-Security: REDACTED
X-Content-Type-Options: REDACTED
X-Cache: REDACTED
X-MSEdge-Ref: REDACTED
Content-Length: 4301
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Tue, 29 Apr 2025 07:12:04 GMT
Expires: -1
at Azure.ResourceManager.Storage.StorageAccountsRestOperations.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.ResourceManager.Storage.StorageAccountCollection.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.RemoteResourceManager.AzureResourceManager.d__9.MoveNext() in /_/src/Microsoft.ML.ModelBuilder/RemoteResourceManager/AzureResourceManager.cs:line 163
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AzureAttach.NewWorkspaceDataContext.d__25.MoveNext() in /_/src/Microsoft.ML.ModelBuilder/AzureAttach/NewWorkspaceDataContext.cs:line 136 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
2025-04-29 07:16:40.3162 DEBUG finalize EnvironmentViewModel_4 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
2025-04-29 07:16:40.3162 DEBUG finalize TrainViewModel_13 (Microsoft.ML.ModelBuilder.Utils.Logger.Debug)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con il flusso segnalato per la creazione dell'area di lavoro Azure, quindi leggi AzureResourceManager.cs intorno alla riga 163 e NewWorkspaceDataContext.cs intorno alla riga 136, dove viene registrato l'errore. Traccia la richiesta di creazione dell'account di archiviazione e verifica il comportamento rispetto all'errore dei criteri Azure. Il lavoro è completato quando l'area di lavoro Azure per Image classification o Object detection può essere creata correttamente nell'ambiente segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, csharp
- Ambito
- cloud, machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100