The predict command I have been using for quite some time began encountering an error this weekend:
$ gcloud beta ml predict --model my_model --json-instances my_instance.json
WARNING: The `gcloud beta ml` commands have been renamed and will soon be removed. Please use `gcloud ml-engine` instead.
ERROR: (gcloud.beta.ml.predict) value for field [projectsId] for in collection [ml.projects.models] is required but was not provided
I do not understand how to fix the error.
To investigate whether the error is associated with the soon to be removed 'cloud beta ml' command, I replaced it with 'gcloud ml-engine' but encountered this error:
$ gcloud ml-engine predict --model my_model --json-instances my_instance.json
ERROR: (gcloud.ml-engine.predict) HTTP request failed. Response: {
"error": {
"code": 400,
"message": "Precondition check failed.",
"status": "FAILED_PRECONDITION"
}
}
I do not understand how to fix this second error. Presumably, its root cause is the same as the first error.
How can I get more detail about fixing this error(s)?
Note: this question appears similar this other question asked by @jbird, but is not the same.