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

Vertex AI Experiment API: Adding Labels

Hi, I am a new user of Vertex AI Experiments. I am able to create experiments and runs using the API, but I have not found a way to add labels to experiments via the API. The labels are shown in the Experiment dashboard UI, and I am able to retrieve the list of labels from _metadata_context attribute. Does the Vertex AI API support this functionality?

1 2 190
2 REPLIES 2

As of now, the Vertex AI Experiments API doesn't explicitly provide a method to directly add labels to experiments through the API. However, there is a workaround using metadata_context to associate metadata, including labels, with experiments. You can attach metadata (key-value pairs) to an experiment by interacting with Context objects from the Metadata API, which is tied to Vertex AI's managed experiments.

Thanks for your reply. I am able to update the metadata for the context, but it is not updating the labels in the UI. Should this approach be able to update the labels shown in the UI, or does it only control API-managed metadata?