Google NLP AutoML Java client The provided locatio

2019-07-31 15:07发布

I checked out from GitHub Java samples for GoogleCloudPlatform. I am trying to run this example for AutoML NLP prediction after I successfully trained my language model. I am able to perform prediction in the Google Cloud Console. Now I am trying to perform prediction from Java client with this example https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/language/automl/src/main/java/com/google/cloud/language/samples/PredictionApi.java

I created service account for my project, set GOOGLE_APPLICATION_CREDENTIALS for my JSON key and I use correct projectId, modelId and computeRegion arguments in the PredictionApi.java example. After I run it in Idea, this is error that I get:

Exception in thread "main" com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: List of found errors: 1.Field: name; Message: The provided location ID is not valid.

Does somebody have clue what could be wrong or what am I missing in my configuration? (to summarize it I have project, service account, trained model, set GOOGLE_PROJECT_CREDENTIALS)

1条回答
萌系小妹纸
2楼-- · 2019-07-31 15:52

What computeRegion did you set? Currently, only us-central1 is supported in automl API.

查看更多
登录 后发表回答