0

I've trained a model that I want to serve in Google Cloud ML Engine. I've exported it using the SavedModel format required and tested it using the following:

gcloud ml-engine local predict --model-dir=saved/ --json-instances=one-record.json

The saved/ dir only contains the saved_model.pb file, and there's only one line in one-record.json. The above command works and produces a prediction written to the console.

I've copied the contents of this directory to a cloud storage bucket (e.g. gs://my-bucket/saved/) and have attempted to create a version like so:

gcloud ml-engine versions create v1 --model=my-model --origin=gs://my-bucket/saved/ --runtime-version=1.0

The model exists and was created with --enable-logging, but no logs are produced in the StackDriver section of the console, or output on my local terminal. I get this error:

Creating version (this might take a few minutes)......failed.                                                                                                                       
ERROR: (gcloud.ml-engine.versions.create) Bad model detected with error:  "Error loading the model: Could not load model. "

Is there any way to debug this further? "Could not load model" is not very helpful, and the only advice is to try testing locally, which works.

Mark McDonald
  • 7,571
  • 6
  • 46
  • 53

0 Answers0