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

hello custom training tutorial failed on cloud function deploy

Hi guys

 I'm following this tutorial to get my had around Vertex AI

 - https://cloud.google.com/vertex-ai/docs/tutorials/image-recognition-custom/

 On step 

 - https://cloud.google.com/vertex-ai/docs/tutorials/image-recognition-custom/serving#2_deploy_a

 when I lunch 
 
gcloud functions deploy classify_flower \
 
--region=us-central1 \
 
--source=function \
 
--runtime=python37 \
 
--memory=2048MB \
 
--trigger-http \
 
--allow-unauthenticated \
 
--set-env-vars=ENDPOINT_ID=${ENDPOINT_ID}

 I get this error

 

OperationError: code=3, message=Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.

 

 since I'm new on GCP anyone tried this tutorial and have the same error?

 any tips on how to fix this?

thank you very much guys

0 1 1,092
1 REPLY 1

The gcloud tool comes with a set of options which are not easily to spot but offer features like verbosity. Add -- verbosity debug to your deplyment command in order to debug the deployment process with more meaningful logs.

Find all the options here:[1]

[1] https://cloud.google.com/sdk/gcloud/reference/functions/deploy