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

Request-Response Logging Not Working on Vertex AI Endpoints

I'm having trouble with request-response logging on Vertex AI endpoints. Previously, with AI Platform endpoints, I was able to enable request-response logging via gcloud, which would then store the request-response data in a chosen BigQuery table. However, with the newer Vertex AI endpoints, the process requires using the REST API to enable request-response logging.

I followed the official documentation and made a PATCH request with the structure provided. Despite receiving a confirmation that the PATCH request was successful (as it displayed the updated configuration for the specified endpoint), the request-response logs are not appearing in BigQuery.

With the AI Platform endpoints, enabling logging resulted in a corresponding BigQuery insert job for every prediction request. However, with Vertex AI endpoints, no such job is created even after enabling the logging.

Here's the PATCH request I used:

curl -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
"https://$REGION-aiplatform.googleapis.com/v1/projects/$PROJECT_ID/locations/$REGION/endpoints/$ENDPOINT_ID"
  -d '{
      "predict_request_response_logging_config": {
      "enabled": true,
        "sampling_rate": 1,
        "bigquery_destination": {
          "output_uri": "bq://PROJECT_ID.DATASET_NAME.TABLE_NAME"
        }
      }
  }'
 

I've also tried using gcloud ai and gcloud beta ai-platform versions update commands, but these do not recognize/find the endpoint. Furthermore, I have also created the endpoint with the above config using a POST request, which also did not work.

 

0 2 1,878
2 REPLIES 2