Vertex AI

Running Google Cloud Vertex AI through Python

September 19, 2023
Data Science
GCP, Vertex AI

Google Cloud’s Vertex AI is pretty awesome for machine learning. But sometimes it gets pretty tedious running everything through the site’s user interface. It’s especially sigh-worthy when a workflow involves multiple iterations of different datasets and models. Fortunately, it’s pretty straightforward to run the process of dataset generation in BigQuery, instantiating a dataset for use in Vertex AI, and finally running the Vertex AI model through a Python script or a Jupyter notebook. ...

How to: Query data in BigQuery from Vertex AI

March 14, 2023
Cloud
Python, Vertex AI

I often grab data for a Vertex AI instance from BigQuery and shape it into a dataframe to do work. Minimum viable snippet to get that to work: import pandas as pd from google.cloud import bigquery client = bigquery.Client() query_string = "<some SQL query>" df = client.query(query_string).to_dataframe()