0

I'm training for the Document there to do an OCR of a form we have, I uploaded 20 documents and divided into 10 for training and 10 for training, but when I try to run for training, the error below is displayed, I could not identify what the error is if more documents are missing or if the dataset has a problem

  "name": "projects/9633xxxxxx806/locations/us/operations/3248677626019472304",
  "done": true,
  "result": "error",
  "response": {},
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.documentai.uiv1beta3.TrainProcessorVersionMetadata",
    "commonMetadata": {
      "state": "FAILED",
      "createTime": "2022-10-25T12:45:05.807461Z",
      "updateTime": "2022-10-25T12:45:15.100246Z",
      "resource": "projects/963xxxxxxxx06/locations/us/processors/3471d2dbcfe75a2a/processorVersions/2d159f16b0a66c53"
    },
    "trainingDatasetValidation": {
      "documentErrors": [
        {
          "code": 3,
          "message": "Invalid document.",
          "details": [
            {
              "@type": "type.googleapis.com/google.rpc.ErrorInfo",
              "reason": "INVALID_DOCUMENT",
              "domain": "documentai.googleapis.com",
              "metadata": {
                "document": "5c7a8b0949921910.json",
                "annotation_name": "telefone-contato-prestador",
                "field_name": "entities.text_anchor.text_segments",
                "num_fields_needed": "1",
                "num_fields": "0"
              }
            }
          ]
        },
    ```
I just pasted part of the error xml because it got big due to the large amount of fields, I would like some help to understand what the error is, what I have to do to correct it.
Holt Skinner
  • 1,692
  • 1
  • 8
  • 21
  • Can you clarify more on your use case? How are you trying to train and can you check whether you have specified the correct location of the files? You can refer to this [tutorial](https://codelabs.developers.google.com/codelabs/docai-ocr-python#0) to do OCR with document AI. – Prajna Rai T Oct 26 '22 at 10:13
  • Hello, I already found the error, I had some fields that I hadn't mapped, and after removing these fields I managed to train, but now I have another problem, I'm training a new model that has some checkboxes, but when I test it doesn't work anyway, I'm training using a custom model via workbeanch, do you have any tips for the check box case? – Rodrigo Martins Oct 26 '22 at 17:34
  • It appears that this issue has to be investigated further, so if you have a support plan please create a new GCP [support case](https://cloud.google.com/support/). Otherwise, you can open a new issue on the [issue tracker](https://cloud.google.com/support/docs/issue-trackers) describing your issue. – Prajna Rai T Oct 27 '22 at 06:22
  • Can you clarify what you mean by "it doesn't work anyway"? Are you labeling the checkboxes in the Labeling Tool? Do you have checkbox fields created in the Schema? – Holt Skinner Oct 27 '22 at 19:34

0 Answers0