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

How to receive an email notification when a batch prediction job completes?

I'm using python to submit generative ai BatchPredictionJobs against the gemini pro model. These can take a while so I'd like to receive a notification when it is complete. Is there a straightforward way to make that happen?

I checked eventarc, but didn't find anything suitable in its list of supported events.

I checked cloud monitoring, but also can't find an event that seems applicable except maybe executing_vertexai_pipeline_jobs  but I don't think this is a pipeline job. Checking cloud monitoring, though, I can't find executing_vertexai_pipeline_jobs or any other metric that seems applicable.

0 2 245
2 REPLIES 2

Hi  @taotree

Welcome to Google Cloud Community!

To receive notifications upon the completion of your BatchPredictionJobs using the Gemini Pro model in Vertex AI, you can set up a notification system using a combination of Google Cloud Pub/Sub and Cloud Functions.

Here’s how you can possibly do it : 

  1. Create a Pub/Sub Topic -  Create a new Pub/Sub topic in Google Cloud.
  2. Set Up a Subscription - Create a subscription to the topic.
  3. Configure the BatchPredictionJob -  When creating the BatchPredictionJob, specify the Pub/Sub topic as the notification destination. 
  4. Receive Notifications - Set up a Cloud Function or another service to listen to the Pub/Sub topic and handle notifications.

You also visit the following documentation for more detailed information about setting up a notification system using Google Cloud Pub/Sub and Cloud Functions: 

I hope the above information is helpful.

Hi, what parameter in the BatchPredictionJob class allows us to specify the Pub/Sub topic that should send a 'COMPLETE' status to?