Deploy a AUTOML NL Trainned Model Fails

151 Views Asked by At

I'm working with Google Auto ML Natural Language API.

I have already a trained model.

In the beginning, when I trained the model, it was deployed and everything was fine. According with Google's new rules from 22th January 2019, models that have no prediction traffic for 7 or more weeks will be silently undeployed and archived.

At moment, I can't predict any result with that trained model, because it is undeployed as it was probably unused for 7 weeks.

Also according to Google if id like to continue using the model I should redeploy it using the Deploy API. https://cloud.google.com/natural-language/automl/docs/models#deploying_or_undeploying_a_model

I try to redeploy the model and I get an error so I can't make any prediction.

How can I deploy a model, without errors, in order to begin predict results?

So, I'll show the steps that I made to try to solve this problem:

  1. Run deploy request with right data.
  2. Run operations request
  3. Wait for deployment to finish
  4. Run operations request again
  5. Show list of models that I have (It's UNDEPLOYED)

1 https://automl.googleapis.com/v1beta1/projects/{project}/locations/{location}/models/{Model ID}:deploy

{
  "name": "projects/{project}/locations/{location}/operations/{Model ID}",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata",
    "createTime": {Time},
    "updateTime": {Time}
  }
}

2 and 4 https://automl.googleapis.com/v1beta1/projects/{project}/locations/{location}/operations

"operations": [
{
  "name": "projects/{project}/locations/{location}/operations/{Model ID}",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.automl.v1beta1.OperationMetadata",
    "createTime": {Time},
    "updateTime": "{Time},
    "progressPercent": 100
  },
  "done": true,
  "error": {
    "code": 4
  }
}
]

5 https://automl.googleapis.com/v1beta1/projects/{project}/locations/{location}/models

"model": [
    {
      "name": "projects/{project}/locations/{location}/models/{Model ID}",
      "displayName": {name},
      "datasetId": {dataset id},
      "createTime": {time},
      "deploymentState": "UNDEPLOYED",
      "updateTime": {time},
      "textClassificationModelMetadata": {}
    }
   ]

So, I was expecting 0 errors in operations request, when the model finished the deployment progress, but it shows an error code 4. I have searched this error code 4 in this provided enum: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto

For error code 4:

// The deadline expired before the operation could complete. For operations
// that change the state of the system, this error may be returned
// even if the operation has completed successfully.  For example, a
// successful response from a server could have been delayed long
// enough for the deadline to expire.
//
// HTTP Mapping: 504 Gateway Timeout
DEADLINE_EXCEEDED = 4;

I don't know why this timeout is happening.

I already search in Quotas Limits, but everything is fine.

1

There are 1 best solutions below

0
On

This problem should be resolved now. Sorry about the inconvenience, but your model should be deployable now. Please try and write back if you still see an issue.