Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.39k stars 2.72k forks source link

Workspace AmlCompute does not have correct compute region from SDK. #35820

Open Mmdixon opened 2 months ago

Mmdixon commented 2 months ago

Describe the bug

# ws: MLClient
ws.compute.get("compute_name")

returns the wrong region in the location field.

To Reproduce

  1. Have workspace in a region, say centralus
  2. Create a compute in another region, say eastus2
  3. ws.compute.get("compute_name").location

Expected behavior Expect the location to say eastus2 which is the region of the compute, not centralus, which is the region of the workspace. There is no other field or property to indicate the compute region if location is indeed meant to only be for the workspace information.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context AzureML Studio does show the eastus2 region for the compute. In Azure, the Resource JSON does have the structure

...
    "name": "compute_name",
    "type": "Microsoft.MachineLearningServices/workspaces/computes",
    "location": "centralus",
    "properties": {
        "computeType": "AmlCompute",
        "computeLocation": "eastus2",
        ...

but these properties are {} when retrieved from the SDK.

github-actions[bot] commented 2 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @amjads1 @avirishuv @Drewm3 @vaibhav-agar.

achauhan-scc commented 1 week ago

@Mmdixon - when running fetch script, I am getting the correct region image Can you please share more details on how you are creating your compute? I used below CLI command az ml compute create -g --workspace-name --name test-compute-1 --size Standard_D2s_v3 --location northcentralus --type AmlCompute while my workspace is in eastus2

Mmdixon commented 1 week ago

@achauhan-scc I believe the compute cluster was made using the browser portal: https://ml.azure.com/compute/list/training and navigating the New modal.

achauhan-scc commented 1 week ago

Thanks @Mmdixon - Able to see the different, will provide an update.