Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to get costs associated with a deployed model in Vertex AI ?

I've deployed a Llama3 model using Vertex AI model garden, added a label 'llama_model' with value 'my_model' to it.

gauravpant_0-1716452291646.png

Now , I want to know how much cost it is incurring me . 

To get this , I enabled Cloud Billing export to BigQuery and a bigquery dataset got created which contains all the cloud billing info. 

gauravpant_1-1716452524883.png

Then I wrote a query to get this model's cost using label key and value .

SELECT * FROM `project-id.gcp_costs_dataset.gcp_billing_export_v1_some-unique-id` B,
  UNNEST (B.labels) L
WHERE
  L.key = "llama_model"
  AND L.value = "my_model";

 I get the cost .

Now , I want to get this model's cost without this label query , preferably using model Id . 

I'll deploy many models and labeling each of them to get their costs doesn't make sense .

How can I get cost associated with a deployed model ? Is there any way that I can just query by model Id or something like that ?

0 0 756
0 REPLIES 0