Reputation: 11603
I uploaded my predictive model to Googles' ML Engine. When I run
gcloud ml-engine predict --model=earnings --json-instances=sample_input_prescaled.json
I get the error
ERROR: (gcloud.ml-engine.predict) HTTP request failed. Response: {
"error": {
"code": 400,
"message": "Field: name Error: No version was specified and no default version for the model was found.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "name",
"description": "No version was specified and no default version for the model was found."
}
]
}
]
}
}
How do I add a version to my model?
Upvotes: 0
Views: 303
Reputation: 11603
If you bring up the model using the web interface you can add a version to your model. That is ML Engine > Models > [model name] > Create a version
.
Also be sure that your variables files are still in a variables
directory in the storage bucket. When I copied the model over (gsutil cp -R exported_model/* gs://keras-class-191806/earnings_v1
) the model's directory structure was flattened. Restore the variables folder and move the variables files inside.
Upvotes: 1