Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ResourceManager.MachineLearning parameter validation error - MachineLearningRegistryDataVersionResource #46046

Open
mike-menaker opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@mike-menaker
Copy link

Library name and version

Azure.ResourceManager.MachineLearning 1.2.0

Describe the bug

I have found another instance of an issue I reported 2 weeks ago (#45884).

Some of the MachineLearning responses aren't deserialized correctly. This time it's with MachineLearningRegistryDataVersionResource.

When I call this code:

        var machineLearningRegistryResourceId =
            MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName);
        var machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId);

        var dataCollection = machineLearningRegistry.GetMachineLearningRegistryDataContainers();
        var dataResource = await dataCollection.GetAsync(name);

        var versions = dataResource.Value.GetMachineLearningRegistryDataVersions();
        var versionId = MachineLearningRegistryDataVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName,
            registryName, name, dataResource.Value.Data.Properties.LatestVersion);
        var latestVersion = await versions.GetAsync(versionId);

the last line throws this exception:
An unhandled exception has occurred while executing the request.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'resourceType')
at Azure.Core.ResourceType..ctor(String resourceType)
at Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(JsonElement element, ModelReaderWriterOptions options)
at Azure.ResourceManager.MachineLearning.RegistryDataVersionsRestOperations.Get(String subscriptionId, String resourceGroupName, String registryName, String name, String version, CancellationToken cancellationToken)
at Azure.ResourceManager.MachineLearning.MachineLearningRegistryDataVersionResource.Get(CancellationToken cancellationToken)
at ScienceCatalog.Controllers.ToolController.GetSasUri(String name) in C:\Users\mikemenaker\source\repos\science-catalog\science-catalog\Controllers\ToolController.cs:line 92
at lambda_method5(Closure, Object)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure

Expected behavior

I can fetch a MachineLearningRegistryDataVersionResource object with operations and data.

Actual behavior

An exception is thrown.

Reproduction Steps

    var machineLearningRegistryResourceId =
        MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName);
    var machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId);

    var dataCollection = machineLearningRegistry.GetMachineLearningRegistryDataContainers();
    var dataResource = await dataCollection.GetAsync(name);

    var versions = dataResource.Value.GetMachineLearningRegistryDataVersions();
    var versionId = MachineLearningRegistryDataVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName,
        registryName, name, dataResource.Value.Data.Properties.LatestVersion);
    var latestVersion = await versions.GetAsync(versionId);

Environment

.NET SDK:
Version: 8.0.304
Commit: 352dc5a01f
Workload version: 8.0.300-manifests.113cb230
MSBuild version: 17.10.4+10fbfbf2e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.304\

.NET workloads installed:
[aspire]
Installation Source: VS 17.10.35201.131
Manifest Version: 8.1.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.1.0\WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5

.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
6.0.425 [C:\Program Files\dotnet\sdk]
8.0.304 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 18, 2024
@jsquire jsquire added Machine Learning Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Sep 19, 2024
@jsquire
Copy link
Member

jsquire commented Sep 19, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants