Azure Machine Learning Compute Cost - Detailed information for each compute

G Cocci 216 Reputation points Microsoft Employee
2022-06-01T09:32:27.357+00:00

Hi all,

I need to have the cost detail for each compute (compute instance, compute clusters) configured within Azure Machine Learning.
Right now from portal I can only retrieve an aggregate cost per compute type, but I need to have the detail per individual compute.

207380-image.png

How can I get this information? Not necessarily from portal, but it's fine via SDK, Rest API, querying logs, etc. Just having this information is enough.

Thanks!

G

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,342 questions
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,622 questions
{count} vote

1 answer

Sort by: Most helpful
  1. G Cocci 216 Reputation points Microsoft Employee
    2022-06-06T13:58:23.183+00:00

    Hi all,

    should anyone else be interested in tracking the actual costs of individual computes within AML, here is an Azure CLI command that is a great place to start. Within the "additionalProperties" field is the cluster detail information.

    (az consumption usage list --subscription $subscription --start-date $start_date --end-date $end_date --query "[?contains(consumedService, 'Microsoft.MachineLearningServices') && contains(instanceName, $resource_group) && contains(product, 'Virtual Machine')]" --include-additional-properties | ConvertFrom-Json) | select additionalProperties, pretaxCost, product, usageStart, usageEnd

    This command can be used to retrieve the cost detail of all resources on Azure.

    GCocci

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.