Document AI does not import line_item child labels

Hi,
After exporting a dataset from one processor, we're seeing labels under line_item parent group fail to be imported for another processor, even though both processors have child labels in common.
How can we avoid this problem?
Thanks in advance,
Rasmus

Solved Solved
0 1 330
1 ACCEPTED SOLUTION

OK, I think I found the issue. I believe there's a bug in the Document AI dataset exporter. Steps to repro:

  1. Create a new invoice processor
  2. Label a document using a child label, ie create parent label "line_item" and a child label "unit"
  3. Export document and inspect json. Notice unit type "line_item/unit" within the "line_item" section.
  4. Create a new custom processor, setup parent label "line_item", child label "unit".
  5. Import document. Notice unit fails to identify. 
  6. Label unit again.
  7. Export document and inspect json. Notice unit type "unit" within the "line_item" section. This is the reason import didn't work.

So in order to successfully import documents from dataset of one processor to another, drop the "line_item/" prefix for all "type" fields using a text editor.

Document AI team, any chance for a fix for this?

View solution in original post

1 REPLY 1

OK, I think I found the issue. I believe there's a bug in the Document AI dataset exporter. Steps to repro:

  1. Create a new invoice processor
  2. Label a document using a child label, ie create parent label "line_item" and a child label "unit"
  3. Export document and inspect json. Notice unit type "line_item/unit" within the "line_item" section.
  4. Create a new custom processor, setup parent label "line_item", child label "unit".
  5. Import document. Notice unit fails to identify. 
  6. Label unit again.
  7. Export document and inspect json. Notice unit type "unit" within the "line_item" section. This is the reason import didn't work.

So in order to successfully import documents from dataset of one processor to another, drop the "line_item/" prefix for all "type" fields using a text editor.

Document AI team, any chance for a fix for this?