Add Cloud Logging to your Vertex AI Batch Prediction Jobs
A simple way to circumvent the limited debugging and logging capabilities.
Vertex AI Batch Prediction jobs do not log errors to Cloud Logging. This is mainly due to the batch job running in a Google-managed project. This can be a big issue if something is not working as expected. Without logging, we are running nearly blind.
Batch Predictions in production are as important as any other prediction in production. We need to be able to debug and monitor the batch prediction jobs properly.
This article demonstrates ways to circumvent this limitation and properly add Cloud Logging to your Vertex AI Batch prediction jobs.
No need to rant about Vertex AI Batch Predictions anymore. There is always a solution ¯\_(ツ)_/¯
Jump to the Notebook and Code
All the code for this article is ready to use in a Google Colab notebook. If you have questions, please reach out to me via LinkedIn or Twitter.
The sample code contains a prediction container randomly raising an error to showcase how the logging works.