1
votes

I am trying to do some image batch predictions on a custom model prediction routine. I have followed this tutorial for creating the routine wrapper. I have deployed my model as a tar.gz on google cloud ai platform, created a version and so on. Now when I try to launch a batch prediction from command line using this command:

gcloud ai-platform jobs submit prediction $JOB_NAME --model $MODEL_NAME \
    --input-paths $INPUT_PATHS \
    --output-path $OUTPUT_PATH \
    --region $REGION \
    --data-format $DATA_FORMAT

I get the following error

ERROR: (gcloud.ai-platform.jobs.submit.prediction) INVALID_ARGUMENT: Field: prediction_input.framework Error: Batch prediction only supports Tensorflow.FRAMEWORK_CUSTOM_CLASS
- '@type': type.googleapis.com/google.rpc.BadRequest
  fieldViolations:
  - description: Batch prediction only supports Tensorflow.FRAMEWORK_CUSTOM_CLASS
    field: prediction_input.framework

The input is in JSON format and I think it is structured in the right way, because in the bucket, on the console, under type it says {"instances": [{"image_bytes": {"b64": "image/jpeg"}}]}, and if I click on the JSON it show straight the image that it contains. Pretty cool! But I don't understand the error.

1
please any help? - DarioB
What framework and version are you using does it works locally ? - gogasca
Hi, thank you so much for your answer on this too. I am using RUNTIME_VERSION=1.13 PYTHON_VERSION=3.5 FRAMEWORK=TENSORFLOW. I will try if it works locally. - DarioB

1 Answers

1
votes

Custom prediction is currently not supported on batch prediction. It's only supported for online prediction. The error message is supposed to just read: "Batch prediction only supports Tensorflow."