From d3c3ad5e4bd10210e9c32a2419657713a30ab81d Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 21 Apr 2021 18:26:47 -0700 Subject: [PATCH 1/4] add testcases for labeled tables - fixed/variable rows --- .../tests/preparers.py | 2 + ...from_url.test_label_tables_fixed_rows.yaml | 256 +++++++++++++++++ ...m_url.test_label_tables_variable_rows.yaml | 263 ++++++++++++++++++ ...rl_async.test_label_tables_fixed_rows.yaml | 200 +++++++++++++ ...async.test_label_tables_variable_rows.yaml | 207 ++++++++++++++ .../tests/test_custom_forms_from_url.py | 72 +++++ .../tests/test_custom_forms_from_url_async.py | 77 +++++ .../azure-ai-formrecognizer/tests/testcase.py | 4 + sdk/formrecognizer/test-resources.json | 42 ++- 9 files changed, 1119 insertions(+), 4 deletions(-) create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_variable_rows.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_variable_rows.yaml diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py index 9a6f1e917ba7..62bf73e98b01 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py @@ -25,6 +25,8 @@ formrecognizer_multipage_storage_container_sas_url="container_sas_url", formrecognizer_multipage_storage_container_sas_url_2="container_sas_url", formrecognizer_selection_mark_storage_container_sas_url="container_sas_url", + formrecognizer_label_table_variable_rows_storage_container_sas_url="container_sas_url", + formrecognizer_label_table_fixed_rows_storage_container_sas_url="container_sas_url", formrecognizer_resource_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.CognitiveServices/accounts/frname", formrecognizer_region="region" ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml new file mode 100644 index 000000000000..469444dc6871 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml @@ -0,0 +1,256 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": true}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '302' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: + - baed6616-9048-4087-84fe-a04823d5e7f1 + content-length: + - '0' + date: + - Thu, 22 Apr 2021 00:53:12 GMT + location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '224' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d5a6bf66-4d9c-45a9-85de-5e660a892338", "attributes": + {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T00:53:12Z", + "lastUpdatedDateTime": "2021-04-22T00:53:14Z"}, "trainResult": {"averageModelAccuracy": + 0.995, "trainingDocuments": [{"documentName": "label_table_fixed_rows1.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows2.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows3.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows4.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows5.pdf", + "pages": 1, "status": "succeeded"}], "fields": [{"fieldName": "table", "accuracy": + 0.995}], "errors": []}}' + headers: + apim-request-id: + - 7c2437b8-a5b2-4af1-803a-ca8a31309241 + content-length: + - '720' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 22 Apr 2021 00:53:17 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyze?includeTextDetails=false + response: + body: + string: '' + headers: + apim-request-id: + - 37744bc0-71ef-4aca-9de9-438dec3cff88 + content-length: + - '0' + date: + - Thu, 22 Apr 2021 00:53:17 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyzeresults/9673d590-37f7-4ee1-a068-1d05e6be7af0 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '428' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyzeresults/9673d590-37f7-4ee1-a068-1d05e6be7af0 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2021-04-22T00:53:18Z", + "lastUpdatedDateTime": "2021-04-22T00:53:22Z"}' + headers: + apim-request-id: + - f44dc236-440a-4112-949a-a31ba847e8f0 + content-length: + - '109' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 22 Apr 2021 00:53:22 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '18' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyzeresults/9673d590-37f7-4ee1-a068-1d05e6be7af0 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-04-22T00:53:18Z", + "lastUpdatedDateTime": "2021-04-22T00:53:25Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 5, "columns": + 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Item", "boundingBox": + [0.9965, 1.6215, 2.2935, 1.6215, 2.2935, 1.8221, 0.9965, 1.8221]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.2935, 1.6215, 3.585, + 1.6215, 3.5904, 1.8221, 2.2935, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, + "text": "Tax", "boundingBox": [3.585, 1.6215, 4.8981, 1.6215, 4.8981, 1.8221, + 3.5904, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": + [4.8981, 1.6215, 6.1951, 1.6215, 6.1951, 1.8272, 4.8981, 1.8221]}, {"rowIndex": + 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9965, 1.8221, 2.2935, + 1.8221, 2.2935, 2.0078, 0.9965, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, + "text": "5.00", "boundingBox": [2.2935, 1.8221, 3.5904, 1.8221, 3.5904, 2.0078, + 2.2935, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5904, 1.8221, 4.8981, 1.8221, 4.8981, 2.0078, 3.5904, 2.0078]}, {"rowIndex": + 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8981, 1.8221, 6.1951, + 1.8272, 6.1951, 2.0128, 4.8981, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, + "text": "Orange", "boundingBox": [0.9965, 2.0128, 2.2935, 2.0078, 2.2935, + 2.2034, 0.9965, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", + "boundingBox": [2.2935, 2.0078, 3.5904, 2.0078, 3.5904, 2.2034, 2.2935, 2.2034]}, + {"rowIndex": 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5904, + 2.0078, 4.8981, 2.0078, 4.8981, 2.2034, 3.5904, 2.2034]}, {"rowIndex": 2, + "columnIndex": 3, "text": "3.00", "boundingBox": [4.8981, 2.0078, 6.1951, + 2.0128, 6.1951, 2.2034, 4.8981, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, + "text": "", "boundingBox": [0.9965, 2.2084, 2.2935, 2.2034, 2.2935, 2.3991, + 0.9965, 2.3991]}, {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": + [2.2935, 2.2034, 3.5904, 2.2034, 3.5904, 2.3991, 2.2935, 2.3991]}, {"rowIndex": + 3, "columnIndex": 2, "text": "4.00", "boundingBox": [3.5904, 2.2034, 4.8981, + 2.2034, 4.8981, 2.3991, 3.5904, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, + "text": "5.00", "boundingBox": [4.8981, 2.2034, 6.1951, 2.2034, 6.1951, 2.3991, + 4.8981, 2.3991]}, {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": + [0.9965, 2.3991, 2.2935, 2.3991, 2.2935, 2.5947, 0.9965, 2.5947]}, {"rowIndex": + 4, "columnIndex": 1, "text": "", "boundingBox": [2.2935, 2.3991, 3.5904, 2.3991, + 3.5958, 2.5947, 2.2935, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": + "2.00", "boundingBox": [3.5904, 2.3991, 4.8981, 2.3991, 4.8981, 2.5947, 3.5958, + 2.5947]}, {"rowIndex": 4, "columnIndex": 3, "text": "2.00", "boundingBox": + [4.8981, 2.3991, 6.1951, 2.3991, 6.1951, 2.5947, 4.8981, 2.5947]}], "boundingBox": + [0.9979, 1.6139, 6.2003, 1.6153, 6.1999, 2.5942, 0.9973, 2.5931]}]}], "documentResults": + [{"docType": "custom:d5a6bf66-4d9c-45a9-85de-5e660a892338", "modelId": "d5a6bf66-4d9c-45a9-85de-5e660a892338", + "pageRange": [1, 1], "fields": {"table": {"type": "object", "valueObject": + {"Apple": {"type": "object", "valueObject": {"Price": {"type": "string", "valueString": + "5.00", "text": "5.00", "page": 1, "boundingBox": [2.385, 1.87, 2.645, 1.87, + 2.645, 1.97, 2.385, 1.97]}, "Tax": {"type": "string", "valueString": "2.00", + "text": "2.00", "page": 1, "boundingBox": [3.685, 1.87, 3.945, 1.87, 3.945, + 1.97, 3.685, 1.97]}, "Total": {"type": "string", "valueString": "7.00", "text": + "7.00", "page": 1, "boundingBox": [4.985, 1.87, 5.245, 1.87, 5.245, 1.97, + 4.985, 1.97]}}}, "Orange": {"type": "object", "valueObject": {"Price": {"type": + "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": + [2.385, 2.065, 2.645, 2.065, 2.645, 2.165, 2.385, 2.165]}, "Tax": {"type": + "string", "valueString": "1.00", "text": "1.00", "page": 1, "boundingBox": + [3.69, 2.065, 3.945, 2.065, 3.945, 2.165, 3.69, 2.165]}, "Total": {"type": + "string", "valueString": "3.00", "text": "3.00", "page": 1, "boundingBox": + [4.985, 2.065, 5.245, 2.065, 5.245, 2.165, 4.985, 2.165]}}}, "Grapefruit": + {"type": "object", "valueObject": {"Price": {"type": "string", "valueString": + "1.00", "text": "1.00", "page": 1, "boundingBox": [2.39, 2.26, 2.645, 2.26, + 2.645, 2.36, 2.39, 2.36]}, "Tax": {"type": "string", "valueString": "4.00", + "text": "4.00", "page": 1, "boundingBox": [3.68, 2.26, 3.945, 2.26, 3.945, + 2.36, 3.68, 2.36]}, "Total": {"type": "string", "valueString": "5.00", "text": + "5.00", "page": 1, "boundingBox": [4.985, 2.26, 5.245, 2.26, 5.245, 2.36, + 4.985, 2.36]}}}, "Pear": {"type": "object", "valueObject": {"Price": null, + "Tax": {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, + "boundingBox": [3.685, 2.45, 3.945, 2.45, 3.945, 2.55, 3.685, 2.55]}, "Total": + {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": + [4.985, 2.45, 5.245, 2.45, 5.245, 2.55, 4.985, 2.55]}}}}}}, "docTypeConfidence": + 0.786}], "errors": []}}' + headers: + apim-request-id: + - 32cc2f20-859d-4f81-95b1-13a1a0d3ebe4 + content-length: + - '4546' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 22 Apr 2021 00:53:28 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '20' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_variable_rows.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_variable_rows.yaml new file mode 100644 index 000000000000..9abb9b38016e --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_variable_rows.yaml @@ -0,0 +1,263 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": true}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '303' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: + - c410a514-91d8-4dc6-9778-25084ae4deb9 + content-length: + - '0' + date: + - Thu, 22 Apr 2021 00:22:01 GMT + location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/901635b3-716b-4bcc-8756-40a90e90498e + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '597' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/901635b3-716b-4bcc-8756-40a90e90498e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "901635b3-716b-4bcc-8756-40a90e90498e", "attributes": + {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T00:22:01Z", + "lastUpdatedDateTime": "2021-04-22T00:22:05Z"}, "trainResult": {"averageModelAccuracy": + 0.995, "trainingDocuments": [{"documentName": "label_table_variable_rows1.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows2.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows3.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows4.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows5.pdf", + "pages": 1, "status": "succeeded"}], "fields": [{"fieldName": "table", "accuracy": + 0.995}, {"fieldName": "table: Item", "accuracy": 0.995}, {"fieldName": "table: + Price", "accuracy": 0.995}, {"fieldName": "table: Tax", "accuracy": 0.995}, + {"fieldName": "table: Total", "accuracy": 0.995}], "errors": []}}' + headers: + apim-request-id: + - ce5e7599-bd90-48a5-93b8-1f1220e24c17 + content-length: + - '916' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 22 Apr 2021 00:22:06 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '17' + status: + code: 200 + message: OK +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/901635b3-716b-4bcc-8756-40a90e90498e/analyze?includeTextDetails=false + response: + body: + string: '' + headers: + apim-request-id: + - c6516403-eccd-47a2-8cd0-5e13d44600e6 + content-length: + - '0' + date: + - Thu, 22 Apr 2021 00:22:07 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/901635b3-716b-4bcc-8756-40a90e90498e/analyzeresults/76912c56-7159-4705-8bf9-31fccec0a240 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '337' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/901635b3-716b-4bcc-8756-40a90e90498e/analyzeresults/76912c56-7159-4705-8bf9-31fccec0a240 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2021-04-22T00:22:07Z", + "lastUpdatedDateTime": "2021-04-22T00:22:12Z"}' + headers: + apim-request-id: + - a14b5adc-8167-491e-9afb-cd23f0f2cb4e + content-length: + - '109' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 22 Apr 2021 00:22:12 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '29' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/901635b3-716b-4bcc-8756-40a90e90498e/analyzeresults/76912c56-7159-4705-8bf9-31fccec0a240 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-04-22T00:22:07Z", + "lastUpdatedDateTime": "2021-04-22T00:22:15Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 5, "columns": + 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Item", "boundingBox": + [0.9965, 1.6215, 2.2935, 1.6215, 2.2935, 1.8221, 0.9965, 1.8221]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.2935, 1.6215, 3.585, + 1.6215, 3.5904, 1.8221, 2.2935, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, + "text": "Tax", "boundingBox": [3.585, 1.6215, 4.8981, 1.6215, 4.8981, 1.8221, + 3.5904, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": + [4.8981, 1.6215, 6.1951, 1.6215, 6.1951, 1.8272, 4.8981, 1.8221]}, {"rowIndex": + 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9965, 1.8221, 2.2935, + 1.8221, 2.2935, 2.0078, 0.9965, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, + "text": "5.00", "boundingBox": [2.2935, 1.8221, 3.5904, 1.8221, 3.5904, 2.0078, + 2.2935, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5904, 1.8221, 4.8981, 1.8221, 4.8981, 2.0078, 3.5904, 2.0078]}, {"rowIndex": + 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8981, 1.8221, 6.1951, + 1.8272, 6.1951, 2.0128, 4.8981, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, + "text": "Orange", "boundingBox": [0.9965, 2.0128, 2.2935, 2.0078, 2.2935, + 2.2034, 0.9965, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", + "boundingBox": [2.2935, 2.0078, 3.5904, 2.0078, 3.5904, 2.2034, 2.2935, 2.2034]}, + {"rowIndex": 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5904, + 2.0078, 4.8981, 2.0078, 4.8981, 2.2034, 3.5904, 2.2034]}, {"rowIndex": 2, + "columnIndex": 3, "text": "3.00", "boundingBox": [4.8981, 2.0078, 6.1951, + 2.0128, 6.1951, 2.2034, 4.8981, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, + "text": "", "boundingBox": [0.9965, 2.2084, 2.2935, 2.2034, 2.2935, 2.3991, + 0.9965, 2.3991]}, {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": + [2.2935, 2.2034, 3.5904, 2.2034, 3.5904, 2.3991, 2.2935, 2.3991]}, {"rowIndex": + 3, "columnIndex": 2, "text": "4.00", "boundingBox": [3.5904, 2.2034, 4.8981, + 2.2034, 4.8981, 2.3991, 3.5904, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, + "text": "5.00", "boundingBox": [4.8981, 2.2034, 6.1951, 2.2034, 6.1951, 2.3991, + 4.8981, 2.3991]}, {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": + [0.9965, 2.3991, 2.2935, 2.3991, 2.2935, 2.5947, 0.9965, 2.5947]}, {"rowIndex": + 4, "columnIndex": 1, "text": "", "boundingBox": [2.2935, 2.3991, 3.5904, 2.3991, + 3.5958, 2.5947, 2.2935, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": + "2.00", "boundingBox": [3.5904, 2.3991, 4.8981, 2.3991, 4.8981, 2.5947, 3.5958, + 2.5947]}, {"rowIndex": 4, "columnIndex": 3, "text": "2.00", "boundingBox": + [4.8981, 2.3991, 6.1951, 2.3991, 6.1951, 2.5947, 4.8981, 2.5947]}], "boundingBox": + [0.9979, 1.6139, 6.2003, 1.6153, 6.1999, 2.5942, 0.9973, 2.5931]}]}], "documentResults": + [{"docType": "custom:901635b3-716b-4bcc-8756-40a90e90498e", "modelId": "901635b3-716b-4bcc-8756-40a90e90498e", + "pageRange": [1, 1], "fields": {"table": {"type": "array", "valueArray": [{"type": + "object", "valueObject": {"Item": {"type": "string", "valueString": "Apple", + "text": "Apple", "page": 1, "boundingBox": [1.08, 1.865, 1.445, 1.865, 1.445, + 1.995, 1.08, 1.995]}, "Price": {"type": "string", "valueString": "5.00", "text": + "5.00", "page": 1, "boundingBox": [2.385, 1.87, 2.645, 1.87, 2.645, 1.97, + 2.385, 1.97]}, "Tax": {"type": "string", "valueString": "2.00", "text": "2.00", + "page": 1, "boundingBox": [3.685, 1.87, 3.945, 1.87, 3.945, 1.97, 3.685, 1.97]}, + "Total": {"type": "string", "valueString": "7.00", "text": "7.00", "page": + 1, "boundingBox": [4.985, 1.87, 5.245, 1.87, 5.245, 1.97, 4.985, 1.97]}}}, + {"type": "object", "valueObject": {"Item": {"type": "string", "valueString": + "Orange", "text": "Orange", "page": 1, "boundingBox": [1.085, 2.065, 1.54, + 2.065, 1.54, 2.19, 1.085, 2.19]}, "Price": {"type": "string", "valueString": + "2.00", "text": "2.00", "page": 1, "boundingBox": [2.385, 2.065, 2.645, 2.065, + 2.645, 2.165, 2.385, 2.165]}, "Tax": {"type": "string", "valueString": "1.00", + "text": "1.00", "page": 1, "boundingBox": [3.69, 2.065, 3.945, 2.065, 3.945, + 2.165, 3.69, 2.165]}, "Total": {"type": "string", "valueString": "3.00", "text": + "3.00", "page": 1, "boundingBox": [4.985, 2.065, 5.245, 2.065, 5.245, 2.165, + 4.985, 2.165]}}}, {"type": "object", "valueObject": {"Item": null, "Price": + {"type": "string", "valueString": "1.00", "text": "1.00", "page": 1, "boundingBox": + [2.39, 2.26, 2.645, 2.26, 2.645, 2.36, 2.39, 2.36]}, "Tax": {"type": "string", + "valueString": "4.00", "text": "4.00", "page": 1, "boundingBox": [3.68, 2.26, + 3.945, 2.26, 3.945, 2.36, 3.68, 2.36]}, "Total": {"type": "string", "valueString": + "5.00", "text": "5.00", "page": 1, "boundingBox": [4.985, 2.26, 5.245, 2.26, + 5.245, 2.36, 4.985, 2.36]}}}, {"type": "object", "valueObject": {"Item": {"type": + "string", "valueString": "Pear", "text": "Pear", "page": 1, "boundingBox": + [1.09, 2.455, 1.365, 2.455, 1.365, 2.55, 1.09, 2.55]}, "Price": null, "Tax": + {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": + [3.685, 2.45, 3.945, 2.45, 3.945, 2.55, 3.685, 2.55]}, "Total": {"type": "string", + "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": [4.985, 2.45, + 5.245, 2.45, 5.245, 2.55, 4.985, 2.55]}}}]}}, "docTypeConfidence": 0.995}], + "errors": []}}' + headers: + apim-request-id: + - 0dc461f2-7db4-4227-bb09-2962772371eb + content-length: + - '4914' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 22 Apr 2021 00:22:17 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '21' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml new file mode 100644 index 000000000000..473752a683bc --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml @@ -0,0 +1,200 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": true}''' + headers: + Accept: + - application/json + Content-Length: + - '302' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: d4e9ad58-f5bf-4b04-8ad4-4297227c29ac + content-length: '0' + date: Thu, 22 Apr 2021 01:03:35 GMT + location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '516' + status: + code: 201 + message: Created + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "a12cae4f-6efd-4f8f-be35-6465d336a63f", "attributes": + {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T01:03:36Z", + "lastUpdatedDateTime": "2021-04-22T01:03:38Z"}, "trainResult": {"averageModelAccuracy": + 0.995, "trainingDocuments": [{"documentName": "label_table_fixed_rows1.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows2.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows3.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows4.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows5.pdf", + "pages": 1, "status": "succeeded"}], "fields": [{"fieldName": "table", "accuracy": + 0.995}], "errors": []}}' + headers: + apim-request-id: 2e40f21e-6a7c-4347-a691-43bb68f1fe1a + content-length: '720' + content-type: application/json; charset=utf-8 + date: Thu, 22 Apr 2021 01:03:40 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '14' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f?includeKeys=true +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '233' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyze?includeTextDetails=false + response: + body: + string: '' + headers: + apim-request-id: e8f5a925-fd45-4507-b0cd-1399c252f84d + content-length: '0' + date: Thu, 22 Apr 2021 01:03:40 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '346' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyze?includeTextDetails=false +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2021-04-22T01:03:41Z", + "lastUpdatedDateTime": "2021-04-22T01:03:46Z"}' + headers: + apim-request-id: bb74ec5f-b925-4542-8268-cf686119d795 + content-length: '109' + content-type: application/json; charset=utf-8 + date: Thu, 22 Apr 2021 01:03:46 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '18' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-04-22T01:03:41Z", + "lastUpdatedDateTime": "2021-04-22T01:03:49Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 5, "columns": + 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Item", "boundingBox": + [0.9965, 1.6215, 2.2935, 1.6215, 2.2935, 1.8221, 0.9965, 1.8221]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.2935, 1.6215, 3.585, + 1.6215, 3.5904, 1.8221, 2.2935, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, + "text": "Tax", "boundingBox": [3.585, 1.6215, 4.8981, 1.6215, 4.8981, 1.8221, + 3.5904, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": + [4.8981, 1.6215, 6.1951, 1.6215, 6.1951, 1.8272, 4.8981, 1.8221]}, {"rowIndex": + 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9965, 1.8221, 2.2935, + 1.8221, 2.2935, 2.0078, 0.9965, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, + "text": "5.00", "boundingBox": [2.2935, 1.8221, 3.5904, 1.8221, 3.5904, 2.0078, + 2.2935, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5904, 1.8221, 4.8981, 1.8221, 4.8981, 2.0078, 3.5904, 2.0078]}, {"rowIndex": + 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8981, 1.8221, 6.1951, + 1.8272, 6.1951, 2.0128, 4.8981, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, + "text": "Orange", "boundingBox": [0.9965, 2.0128, 2.2935, 2.0078, 2.2935, + 2.2034, 0.9965, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", + "boundingBox": [2.2935, 2.0078, 3.5904, 2.0078, 3.5904, 2.2034, 2.2935, 2.2034]}, + {"rowIndex": 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5904, + 2.0078, 4.8981, 2.0078, 4.8981, 2.2034, 3.5904, 2.2034]}, {"rowIndex": 2, + "columnIndex": 3, "text": "3.00", "boundingBox": [4.8981, 2.0078, 6.1951, + 2.0128, 6.1951, 2.2034, 4.8981, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, + "text": "", "boundingBox": [0.9965, 2.2084, 2.2935, 2.2034, 2.2935, 2.3991, + 0.9965, 2.3991]}, {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": + [2.2935, 2.2034, 3.5904, 2.2034, 3.5904, 2.3991, 2.2935, 2.3991]}, {"rowIndex": + 3, "columnIndex": 2, "text": "4.00", "boundingBox": [3.5904, 2.2034, 4.8981, + 2.2034, 4.8981, 2.3991, 3.5904, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, + "text": "5.00", "boundingBox": [4.8981, 2.2034, 6.1951, 2.2034, 6.1951, 2.3991, + 4.8981, 2.3991]}, {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": + [0.9965, 2.3991, 2.2935, 2.3991, 2.2935, 2.5947, 0.9965, 2.5947]}, {"rowIndex": + 4, "columnIndex": 1, "text": "", "boundingBox": [2.2935, 2.3991, 3.5904, 2.3991, + 3.5958, 2.5947, 2.2935, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": + "2.00", "boundingBox": [3.5904, 2.3991, 4.8981, 2.3991, 4.8981, 2.5947, 3.5958, + 2.5947]}, {"rowIndex": 4, "columnIndex": 3, "text": "2.00", "boundingBox": + [4.8981, 2.3991, 6.1951, 2.3991, 6.1951, 2.5947, 4.8981, 2.5947]}], "boundingBox": + [0.9979, 1.6139, 6.2003, 1.6153, 6.1999, 2.5942, 0.9973, 2.5931]}]}], "documentResults": + [{"docType": "custom:a12cae4f-6efd-4f8f-be35-6465d336a63f", "modelId": "a12cae4f-6efd-4f8f-be35-6465d336a63f", + "pageRange": [1, 1], "fields": {"table": {"type": "object", "valueObject": + {"Apple": {"type": "object", "valueObject": {"Price": {"type": "string", "valueString": + "5.00", "text": "5.00", "page": 1, "boundingBox": [2.385, 1.87, 2.645, 1.87, + 2.645, 1.97, 2.385, 1.97]}, "Tax": {"type": "string", "valueString": "2.00", + "text": "2.00", "page": 1, "boundingBox": [3.685, 1.87, 3.945, 1.87, 3.945, + 1.97, 3.685, 1.97]}, "Total": {"type": "string", "valueString": "7.00", "text": + "7.00", "page": 1, "boundingBox": [4.985, 1.87, 5.245, 1.87, 5.245, 1.97, + 4.985, 1.97]}}}, "Orange": {"type": "object", "valueObject": {"Price": {"type": + "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": + [2.385, 2.065, 2.645, 2.065, 2.645, 2.165, 2.385, 2.165]}, "Tax": {"type": + "string", "valueString": "1.00", "text": "1.00", "page": 1, "boundingBox": + [3.69, 2.065, 3.945, 2.065, 3.945, 2.165, 3.69, 2.165]}, "Total": {"type": + "string", "valueString": "3.00", "text": "3.00", "page": 1, "boundingBox": + [4.985, 2.065, 5.245, 2.065, 5.245, 2.165, 4.985, 2.165]}}}, "Grapefruit": + {"type": "object", "valueObject": {"Price": {"type": "string", "valueString": + "1.00", "text": "1.00", "page": 1, "boundingBox": [2.39, 2.26, 2.645, 2.26, + 2.645, 2.36, 2.39, 2.36]}, "Tax": {"type": "string", "valueString": "4.00", + "text": "4.00", "page": 1, "boundingBox": [3.68, 2.26, 3.945, 2.26, 3.945, + 2.36, 3.68, 2.36]}, "Total": {"type": "string", "valueString": "5.00", "text": + "5.00", "page": 1, "boundingBox": [4.985, 2.26, 5.245, 2.26, 5.245, 2.36, + 4.985, 2.36]}}}, "Pear": {"type": "object", "valueObject": {"Price": null, + "Tax": {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, + "boundingBox": [3.685, 2.45, 3.945, 2.45, 3.945, 2.55, 3.685, 2.55]}, "Total": + {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": + [4.985, 2.45, 5.245, 2.45, 5.245, 2.55, 4.985, 2.55]}}}}}}, "docTypeConfidence": + 0.786}], "errors": []}}' + headers: + apim-request-id: c7b0f8cf-a293-4cdb-a9ea-44e36ad992de + content-length: '4546' + content-type: application/json; charset=utf-8 + date: Thu, 22 Apr 2021 01:03:51 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '18' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_variable_rows.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_variable_rows.yaml new file mode 100644 index 000000000000..da3227a83c7e --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_variable_rows.yaml @@ -0,0 +1,207 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": true}''' + headers: + Accept: + - application/json + Content-Length: + - '303' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: e0bc4f8c-28d0-40fc-bc46-3b1a8a5604af + content-length: '0' + date: Thu, 22 Apr 2021 01:02:55 GMT + location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '217' + status: + code: 201 + message: Created + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "747bee39-f021-4e7e-81a7-195ef72db354", "attributes": + {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T01:02:55Z", + "lastUpdatedDateTime": "2021-04-22T01:02:57Z"}, "trainResult": {"averageModelAccuracy": + 0.995, "trainingDocuments": [{"documentName": "label_table_variable_rows1.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows2.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows3.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows4.pdf", + "pages": 1, "status": "succeeded"}, {"documentName": "label_table_variable_rows5.pdf", + "pages": 1, "status": "succeeded"}], "fields": [{"fieldName": "table", "accuracy": + 0.995}, {"fieldName": "table: Item", "accuracy": 0.995}, {"fieldName": "table: + Price", "accuracy": 0.995}, {"fieldName": "table: Tax", "accuracy": 0.995}, + {"fieldName": "table: Total", "accuracy": 0.995}], "errors": []}}' + headers: + apim-request-id: ffe7b620-28df-4de7-8aff-4a802d8b0822 + content-length: '916' + content-type: application/json; charset=utf-8 + date: Thu, 22 Apr 2021 01:03:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354?includeKeys=true +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '233' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyze?includeTextDetails=false + response: + body: + string: '' + headers: + apim-request-id: 83e5e7a2-86b5-4db3-be19-47e6c5a2df79 + content-length: '0' + date: Thu, 22 Apr 2021 01:03:00 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyzeresults/fa322829-4150-49c2-80f4-1dc49201aba8 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '376' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyze?includeTextDetails=false +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyzeresults/fa322829-4150-49c2-80f4-1dc49201aba8 + response: + body: + string: '{"status": "notStarted", "createdDateTime": "2021-04-22T01:03:01Z", + "lastUpdatedDateTime": "2021-04-22T01:03:02Z"}' + headers: + apim-request-id: 5b66c722-0d45-45d2-a807-6793ca89b6f4 + content-length: '109' + content-type: application/json; charset=utf-8 + date: Thu, 22 Apr 2021 01:03:06 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '18' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyzeresults/fa322829-4150-49c2-80f4-1dc49201aba8 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyzeresults/fa322829-4150-49c2-80f4-1dc49201aba8 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-04-22T01:03:01Z", + "lastUpdatedDateTime": "2021-04-22T01:03:09Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 5, "columns": + 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Item", "boundingBox": + [0.9965, 1.6215, 2.2935, 1.6215, 2.2935, 1.8221, 0.9965, 1.8221]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.2935, 1.6215, 3.585, + 1.6215, 3.5904, 1.8221, 2.2935, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, + "text": "Tax", "boundingBox": [3.585, 1.6215, 4.8981, 1.6215, 4.8981, 1.8221, + 3.5904, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": + [4.8981, 1.6215, 6.1951, 1.6215, 6.1951, 1.8272, 4.8981, 1.8221]}, {"rowIndex": + 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9965, 1.8221, 2.2935, + 1.8221, 2.2935, 2.0078, 0.9965, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, + "text": "5.00", "boundingBox": [2.2935, 1.8221, 3.5904, 1.8221, 3.5904, 2.0078, + 2.2935, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5904, 1.8221, 4.8981, 1.8221, 4.8981, 2.0078, 3.5904, 2.0078]}, {"rowIndex": + 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8981, 1.8221, 6.1951, + 1.8272, 6.1951, 2.0128, 4.8981, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, + "text": "Orange", "boundingBox": [0.9965, 2.0128, 2.2935, 2.0078, 2.2935, + 2.2034, 0.9965, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", + "boundingBox": [2.2935, 2.0078, 3.5904, 2.0078, 3.5904, 2.2034, 2.2935, 2.2034]}, + {"rowIndex": 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5904, + 2.0078, 4.8981, 2.0078, 4.8981, 2.2034, 3.5904, 2.2034]}, {"rowIndex": 2, + "columnIndex": 3, "text": "3.00", "boundingBox": [4.8981, 2.0078, 6.1951, + 2.0128, 6.1951, 2.2034, 4.8981, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, + "text": "", "boundingBox": [0.9965, 2.2084, 2.2935, 2.2034, 2.2935, 2.3991, + 0.9965, 2.3991]}, {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": + [2.2935, 2.2034, 3.5904, 2.2034, 3.5904, 2.3991, 2.2935, 2.3991]}, {"rowIndex": + 3, "columnIndex": 2, "text": "4.00", "boundingBox": [3.5904, 2.2034, 4.8981, + 2.2034, 4.8981, 2.3991, 3.5904, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, + "text": "5.00", "boundingBox": [4.8981, 2.2034, 6.1951, 2.2034, 6.1951, 2.3991, + 4.8981, 2.3991]}, {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": + [0.9965, 2.3991, 2.2935, 2.3991, 2.2935, 2.5947, 0.9965, 2.5947]}, {"rowIndex": + 4, "columnIndex": 1, "text": "", "boundingBox": [2.2935, 2.3991, 3.5904, 2.3991, + 3.5958, 2.5947, 2.2935, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": + "2.00", "boundingBox": [3.5904, 2.3991, 4.8981, 2.3991, 4.8981, 2.5947, 3.5958, + 2.5947]}, {"rowIndex": 4, "columnIndex": 3, "text": "2.00", "boundingBox": + [4.8981, 2.3991, 6.1951, 2.3991, 6.1951, 2.5947, 4.8981, 2.5947]}], "boundingBox": + [0.9979, 1.6139, 6.2003, 1.6153, 6.1999, 2.5942, 0.9973, 2.5931]}]}], "documentResults": + [{"docType": "custom:747bee39-f021-4e7e-81a7-195ef72db354", "modelId": "747bee39-f021-4e7e-81a7-195ef72db354", + "pageRange": [1, 1], "fields": {"table": {"type": "array", "valueArray": [{"type": + "object", "valueObject": {"Item": {"type": "string", "valueString": "Apple", + "text": "Apple", "page": 1, "boundingBox": [1.08, 1.865, 1.445, 1.865, 1.445, + 1.995, 1.08, 1.995]}, "Price": {"type": "string", "valueString": "5.00", "text": + "5.00", "page": 1, "boundingBox": [2.385, 1.87, 2.645, 1.87, 2.645, 1.97, + 2.385, 1.97]}, "Tax": {"type": "string", "valueString": "2.00", "text": "2.00", + "page": 1, "boundingBox": [3.685, 1.87, 3.945, 1.87, 3.945, 1.97, 3.685, 1.97]}, + "Total": {"type": "string", "valueString": "7.00", "text": "7.00", "page": + 1, "boundingBox": [4.985, 1.87, 5.245, 1.87, 5.245, 1.97, 4.985, 1.97]}}}, + {"type": "object", "valueObject": {"Item": {"type": "string", "valueString": + "Orange", "text": "Orange", "page": 1, "boundingBox": [1.085, 2.065, 1.54, + 2.065, 1.54, 2.19, 1.085, 2.19]}, "Price": {"type": "string", "valueString": + "2.00", "text": "2.00", "page": 1, "boundingBox": [2.385, 2.065, 2.645, 2.065, + 2.645, 2.165, 2.385, 2.165]}, "Tax": {"type": "string", "valueString": "1.00", + "text": "1.00", "page": 1, "boundingBox": [3.69, 2.065, 3.945, 2.065, 3.945, + 2.165, 3.69, 2.165]}, "Total": {"type": "string", "valueString": "3.00", "text": + "3.00", "page": 1, "boundingBox": [4.985, 2.065, 5.245, 2.065, 5.245, 2.165, + 4.985, 2.165]}}}, {"type": "object", "valueObject": {"Item": null, "Price": + {"type": "string", "valueString": "1.00", "text": "1.00", "page": 1, "boundingBox": + [2.39, 2.26, 2.645, 2.26, 2.645, 2.36, 2.39, 2.36]}, "Tax": {"type": "string", + "valueString": "4.00", "text": "4.00", "page": 1, "boundingBox": [3.68, 2.26, + 3.945, 2.26, 3.945, 2.36, 3.68, 2.36]}, "Total": {"type": "string", "valueString": + "5.00", "text": "5.00", "page": 1, "boundingBox": [4.985, 2.26, 5.245, 2.26, + 5.245, 2.36, 4.985, 2.36]}}}, {"type": "object", "valueObject": {"Item": {"type": + "string", "valueString": "Pear", "text": "Pear", "page": 1, "boundingBox": + [1.09, 2.455, 1.365, 2.455, 1.365, 2.55, 1.09, 2.55]}, "Price": null, "Tax": + {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": + [3.685, 2.45, 3.945, 2.45, 3.945, 2.55, 3.685, 2.55]}, "Total": {"type": "string", + "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": [4.985, 2.45, + 5.245, 2.45, 5.245, 2.55, 4.985, 2.55]}}}]}}, "docTypeConfidence": 0.995}], + "errors": []}}' + headers: + apim-request-id: 394d5b4f-ab4a-4733-9b71-f9e90f98a37e + content-length: '4914' + content-type: application/json; charset=utf-8 + date: Thu, 22 Apr 2021 01:03:11 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '19' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/747bee39-f021-4e7e-81a7-195ef72db354/analyzeresults/fa322829-4150-49c2-80f4-1dc49201aba8 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py index 8b6a7dbf277f..ee8297e4958b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py @@ -448,3 +448,75 @@ def test_pages_kwarg_specified(self, client, formrecognizer_testing_data_contain assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = poller.result() assert result + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_label_tables_variable_rows(self, client, formrecognizer_label_table_variable_rows_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + + training_poller = client.begin_training(formrecognizer_label_table_variable_rows_storage_container_sas_url, use_training_labels=True) + model = training_poller.result() + + responses = [] + + def callback(raw_response, _, headers): + analyze_result = fr_client._deserialize(AnalyzeOperationResult, raw_response) + form = prepare_form_result(analyze_result, model.model_id) + responses.append(analyze_result) + responses.append(form) + + poller = fr_client.begin_recognize_custom_forms_from_url( + model.model_id, + self.label_table_variable_row_url_pdf, + cls=callback + ) + form = poller.result() + actual = responses[0] + recognized_form = responses[1] + read_results = actual.analyze_result.read_results + document_results = actual.analyze_result.document_results + + for form, actual in zip(recognized_form, document_results): + self.assertEqual(form.page_range.first_page_number, actual.page_range[0]) + self.assertEqual(form.page_range.last_page_number, actual.page_range[1]) + self.assertEqual(form.form_type, "custom:"+model.model_id) + self.assertIsNotNone(form.form_type_confidence) + self.assertEqual(form.model_id, model.model_id) + self.assertEqual(type(form.fields["table"].value), list) + self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_label_tables_fixed_rows(self, client, formrecognizer_label_table_fixed_rows_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + + training_poller = client.begin_training(formrecognizer_label_table_fixed_rows_storage_container_sas_url, use_training_labels=True) + model = training_poller.result() + + responses = [] + + def callback(raw_response, _, headers): + analyze_result = fr_client._deserialize(AnalyzeOperationResult, raw_response) + form = prepare_form_result(analyze_result, model.model_id) + responses.append(analyze_result) + responses.append(form) + + poller = fr_client.begin_recognize_custom_forms_from_url( + model.model_id, + self.label_table_variable_row_url_pdf, + cls=callback + ) + form = poller.result() + actual = responses[0] + recognized_form = responses[1] + read_results = actual.analyze_result.read_results + document_results = actual.analyze_result.document_results + + for form, actual in zip(recognized_form, document_results): + self.assertEqual(form.page_range.first_page_number, actual.page_range[0]) + self.assertEqual(form.page_range.last_page_number, actual.page_range[1]) + self.assertEqual(form.form_type, "custom:"+model.model_id) + self.assertIsNotNone(form.form_type_confidence) + self.assertEqual(form.model_id, model.model_id) + self.assertEqual(type(form.fields["table"].value), dict) + self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py index 052c41d20d2b..f39abeeebdd4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py @@ -487,3 +487,80 @@ async def test_pages_kwarg_specified(self, client, formrecognizer_testing_data_c assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = await poller.result() assert result + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_label_tables_variable_rows(self, client, formrecognizer_label_table_variable_rows_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + + responses = [] + + def callback(raw_response, _, headers): + analyze_result = fr_client._deserialize(AnalyzeOperationResult, raw_response) + form = prepare_form_result(analyze_result, model.model_id) + responses.append(analyze_result) + responses.append(form) + + async with client: + training_poller = await client.begin_training( + formrecognizer_label_table_variable_rows_storage_container_sas_url, use_training_labels=True) + model = await training_poller.result() + + poller = await fr_client.begin_recognize_custom_forms_from_url( + model.model_id, + self.label_table_variable_row_url_pdf, + cls=callback + ) + form = await poller.result() + + actual = responses[0] + recognized_form = responses[1] + read_results = actual.analyze_result.read_results + document_results = actual.analyze_result.document_results + + for form, actual in zip(recognized_form, document_results): + self.assertEqual(form.page_range.first_page_number, actual.page_range[0]) + self.assertEqual(form.page_range.last_page_number, actual.page_range[1]) + self.assertEqual(form.form_type, "custom:"+model.model_id) + self.assertIsNotNone(form.form_type_confidence) + self.assertEqual(form.model_id, model.model_id) + self.assertEqual(type(form.fields["table"].value), list) + self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_label_tables_fixed_rows(self, client, formrecognizer_label_table_fixed_rows_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + + responses = [] + + def callback(raw_response, _, headers): + analyze_result = fr_client._deserialize(AnalyzeOperationResult, raw_response) + form = prepare_form_result(analyze_result, model.model_id) + responses.append(analyze_result) + responses.append(form) + + async with client: + training_poller = await client.begin_training(formrecognizer_label_table_fixed_rows_storage_container_sas_url, use_training_labels=True) + model = await training_poller.result() + + poller = await fr_client.begin_recognize_custom_forms_from_url( + model.model_id, + self.label_table_variable_row_url_pdf, + cls=callback + ) + form = await poller.result() + + actual = responses[0] + recognized_form = responses[1] + read_results = actual.analyze_result.read_results + document_results = actual.analyze_result.document_results + + for form, actual in zip(recognized_form, document_results): + self.assertEqual(form.page_range.first_page_number, actual.page_range[0]) + self.assertEqual(form.page_range.last_page_number, actual.page_range[1]) + self.assertEqual(form.form_type, "custom:"+model.model_id) + self.assertIsNotNone(form.form_type_confidence) + self.assertEqual(form.model_id, model.model_id) + self.assertEqual(type(form.fields["table"].value), dict) + self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py index 49393ee75975..85af0835c6d7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py @@ -152,6 +152,8 @@ def __init__(self, method_name): self.multipage_url_pdf = self.get_blob_url(testing_container_sas_url, "testingdata", "multipage_invoice1.pdf") self.multipage_table_url_pdf = self.get_blob_url(testing_container_sas_url, "testingdata", "multipagelayout.pdf") self.selection_mark_url_pdf = self.get_blob_url(testing_container_sas_url, "testingdata", "selection_mark_form.pdf") + self.label_table_variable_row_url_pdf = self.get_blob_url(testing_container_sas_url, "testingdata", "label_table_variable_rows1.pdf") + self.label_table_fixed_row_url_pdf = self.get_blob_url(testing_container_sas_url, "testingdata", "label_table_fixed_rows1.pdf") # file stream samples self.receipt_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/contoso-allinone.jpg")) @@ -353,6 +355,8 @@ def assertFormFieldsTransformCorrect(self, form_fields, generated_fields, read_r return for label, expected in generated_fields.items(): + if expected is None: # None value occurs with labeled tables and empty cells + continue field_type = expected.type self.assertEqual(adjust_value_type(field_type), form_fields[label].value_type) self.assertEqual(label, form_fields[label].name) diff --git a/sdk/formrecognizer/test-resources.json b/sdk/formrecognizer/test-resources.json index 3b16e0f0fca7..b643421a05fe 100644 --- a/sdk/formrecognizer/test-resources.json +++ b/sdk/formrecognizer/test-resources.json @@ -71,10 +71,6 @@ "type": "string", "defaultValue": "testingdata" }, - "selectionMarkTrainingDataContainer": { - "type": "string", - "defaultValue": "selectionmark" - }, "testingDataSasProperties": { "type": "object", "defaultValue": { @@ -110,6 +106,10 @@ "signedResource": "c" } }, + "selectionMarkTrainingDataContainer": { + "type": "string", + "defaultValue": "selectionmark" + }, "selectionMarkTrainingDataSasProperties": { "type": "object", "defaultValue": { @@ -118,6 +118,32 @@ "signedPermission": "rl", "signedResource": "c" } + }, + "labelTablesVariableRowsContainer": { + "type": "string", + "defaultValue": "labeled-tables-variable-rows" + }, + "labelTablesVariableRowsSasProperties": { + "type": "object", + "defaultValue": { + "canonicalizedResource": "[concat('/blob/', parameters('blobStorageAccount'), '/', parameters('labelTablesVariableRowsContainer'))]", + "signedExpiry": "[dateTimeAdd(utcNow('u'), 'PT3H')]", + "signedPermission": "rl", + "signedResource": "c" + } + }, + "labelTablesFixedRowsContainer": { + "type": "string", + "defaultValue": "labeled-tables-fixed-rows" + }, + "labelTablesFixedRowsSasProperties": { + "type": "object", + "defaultValue": { + "canonicalizedResource": "[concat('/blob/', parameters('blobStorageAccount'), '/', parameters('labelTablesFixedRowsContainer'))]", + "signedExpiry": "[dateTimeAdd(utcNow('u'), 'PT3H')]", + "signedPermission": "rl", + "signedResource": "c" + } } }, "variables": { @@ -199,6 +225,14 @@ "type": "string", "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('selectionMarkTrainingDataContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('selectionMarkTrainingDataSasProperties')).serviceSasToken)]" }, + "FORMRECOGNIZER_LABEL_TABLE_VARIABLE_ROWS_STORAGE_CONTAINER_SAS_URL": { + "type": "string", + "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('labelTablesVariableRowsContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('labelTablesVariableRowsSasProperties')).serviceSasToken)]" + }, + "FORMRECOGNIZER_LABEL_TABLE_FIXED_ROWS_STORAGE_CONTAINER_SAS_URL": { + "type": "string", + "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('labelTablesFixedRowsContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('labelTablesFixedRowsSasProperties')).serviceSasToken)]" + }, "FORMRECOGNIZER_REGION": { "type": "string", "value": "[parameters('location')]" From 23d34df0606fc3b53afd7d356859cb8f273f34ef Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 21 Apr 2021 18:32:36 -0700 Subject: [PATCH 2/4] fix input param --- ...from_url.test_label_tables_fixed_rows.yaml | 134 ++++++++--------- ...rl_async.test_label_tables_fixed_rows.yaml | 142 +++++++++--------- .../tests/test_custom_forms_from_url.py | 2 +- .../tests/test_custom_forms_from_url_async.py | 2 +- 4 files changed, 140 insertions(+), 140 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml index 469444dc6871..16c077481051 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_label_tables_fixed_rows.yaml @@ -22,19 +22,19 @@ interactions: string: '' headers: apim-request-id: - - baed6616-9048-4087-84fe-a04823d5e7f1 + - fb88ba21-8e3e-4a26-a4d2-ca2173ffc2b5 content-length: - '0' date: - - Thu, 22 Apr 2021 00:53:12 GMT + - Thu, 22 Apr 2021 01:29:38 GMT location: - - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338 + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d55d7c8d-1f62-43ad-b083-317205e12621 strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '224' + - '533' status: code: 201 message: Created @@ -50,12 +50,12 @@ interactions: User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338?includeKeys=true + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d55d7c8d-1f62-43ad-b083-317205e12621?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "d5a6bf66-4d9c-45a9-85de-5e660a892338", "attributes": - {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T00:53:12Z", - "lastUpdatedDateTime": "2021-04-22T00:53:14Z"}, "trainResult": {"averageModelAccuracy": + string: '{"modelInfo": {"modelId": "d55d7c8d-1f62-43ad-b083-317205e12621", "attributes": + {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T01:29:38Z", + "lastUpdatedDateTime": "2021-04-22T01:29:41Z"}, "trainResult": {"averageModelAccuracy": 0.995, "trainingDocuments": [{"documentName": "label_table_fixed_rows1.pdf", "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows2.pdf", "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows3.pdf", @@ -65,19 +65,19 @@ interactions: 0.995}], "errors": []}}' headers: apim-request-id: - - 7c2437b8-a5b2-4af1-803a-ca8a31309241 + - 59a83ea2-d358-4620-8d0d-5d569c20b9fd content-length: - '720' content-type: - application/json; charset=utf-8 date: - - Thu, 22 Apr 2021 00:53:17 GMT + - Thu, 22 Apr 2021 01:29:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '14' + - '17' status: code: 200 message: OK @@ -91,31 +91,31 @@ interactions: Connection: - keep-alive Content-Length: - - '233' + - '230' Content-Type: - application/json User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyze?includeTextDetails=false + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d55d7c8d-1f62-43ad-b083-317205e12621/analyze?includeTextDetails=false response: body: string: '' headers: apim-request-id: - - 37744bc0-71ef-4aca-9de9-438dec3cff88 + - 10f98cd9-0aa5-4987-84b1-9cb206208c54 content-length: - '0' date: - - Thu, 22 Apr 2021 00:53:17 GMT + - Thu, 22 Apr 2021 01:29:43 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyzeresults/9673d590-37f7-4ee1-a068-1d05e6be7af0 + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d55d7c8d-1f62-43ad-b083-317205e12621/analyzeresults/59b6a250-6815-45c3-9029-d67a1a4f6571 strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '428' + - '347' status: code: 202 message: Accepted @@ -131,26 +131,26 @@ interactions: User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyzeresults/9673d590-37f7-4ee1-a068-1d05e6be7af0 + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d55d7c8d-1f62-43ad-b083-317205e12621/analyzeresults/59b6a250-6815-45c3-9029-d67a1a4f6571 response: body: - string: '{"status": "notStarted", "createdDateTime": "2021-04-22T00:53:18Z", - "lastUpdatedDateTime": "2021-04-22T00:53:22Z"}' + string: '{"status": "notStarted", "createdDateTime": "2021-04-22T01:29:44Z", + "lastUpdatedDateTime": "2021-04-22T01:29:48Z"}' headers: apim-request-id: - - f44dc236-440a-4112-949a-a31ba847e8f0 + - 27da524d-3b74-4832-ac70-2fee5d03f1dd content-length: - '109' content-type: - application/json; charset=utf-8 date: - - Thu, 22 Apr 2021 00:53:22 GMT + - Thu, 22 Apr 2021 01:29:49 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '15' status: code: 200 message: OK @@ -166,49 +166,49 @@ interactions: User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d5a6bf66-4d9c-45a9-85de-5e660a892338/analyzeresults/9673d590-37f7-4ee1-a068-1d05e6be7af0 + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d55d7c8d-1f62-43ad-b083-317205e12621/analyzeresults/59b6a250-6815-45c3-9029-d67a1a4f6571 response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-04-22T00:53:18Z", - "lastUpdatedDateTime": "2021-04-22T00:53:25Z", "analyzeResult": {"version": + string: '{"status": "succeeded", "createdDateTime": "2021-04-22T01:29:44Z", + "lastUpdatedDateTime": "2021-04-22T01:29:51Z", "analyzeResult": {"version": "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 5, "columns": - 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Item", "boundingBox": - [0.9965, 1.6215, 2.2935, 1.6215, 2.2935, 1.8221, 0.9965, 1.8221]}, {"rowIndex": - 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.2935, 1.6215, 3.585, - 1.6215, 3.5904, 1.8221, 2.2935, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, - "text": "Tax", "boundingBox": [3.585, 1.6215, 4.8981, 1.6215, 4.8981, 1.8221, - 3.5904, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": - [4.8981, 1.6215, 6.1951, 1.6215, 6.1951, 1.8272, 4.8981, 1.8221]}, {"rowIndex": - 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9965, 1.8221, 2.2935, - 1.8221, 2.2935, 2.0078, 0.9965, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, - "text": "5.00", "boundingBox": [2.2935, 1.8221, 3.5904, 1.8221, 3.5904, 2.0078, - 2.2935, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": - [3.5904, 1.8221, 4.8981, 1.8221, 4.8981, 2.0078, 3.5904, 2.0078]}, {"rowIndex": - 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8981, 1.8221, 6.1951, - 1.8272, 6.1951, 2.0128, 4.8981, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, - "text": "Orange", "boundingBox": [0.9965, 2.0128, 2.2935, 2.0078, 2.2935, - 2.2034, 0.9965, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", - "boundingBox": [2.2935, 2.0078, 3.5904, 2.0078, 3.5904, 2.2034, 2.2935, 2.2034]}, - {"rowIndex": 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5904, - 2.0078, 4.8981, 2.0078, 4.8981, 2.2034, 3.5904, 2.2034]}, {"rowIndex": 2, - "columnIndex": 3, "text": "3.00", "boundingBox": [4.8981, 2.0078, 6.1951, - 2.0128, 6.1951, 2.2034, 4.8981, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, - "text": "", "boundingBox": [0.9965, 2.2084, 2.2935, 2.2034, 2.2935, 2.3991, - 0.9965, 2.3991]}, {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": - [2.2935, 2.2034, 3.5904, 2.2034, 3.5904, 2.3991, 2.2935, 2.3991]}, {"rowIndex": - 3, "columnIndex": 2, "text": "4.00", "boundingBox": [3.5904, 2.2034, 4.8981, - 2.2034, 4.8981, 2.3991, 3.5904, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, - "text": "5.00", "boundingBox": [4.8981, 2.2034, 6.1951, 2.2034, 6.1951, 2.3991, - 4.8981, 2.3991]}, {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": - [0.9965, 2.3991, 2.2935, 2.3991, 2.2935, 2.5947, 0.9965, 2.5947]}, {"rowIndex": - 4, "columnIndex": 1, "text": "", "boundingBox": [2.2935, 2.3991, 3.5904, 2.3991, - 3.5958, 2.5947, 2.2935, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": - "2.00", "boundingBox": [3.5904, 2.3991, 4.8981, 2.3991, 4.8981, 2.5947, 3.5958, - 2.5947]}, {"rowIndex": 4, "columnIndex": 3, "text": "2.00", "boundingBox": - [4.8981, 2.3991, 6.1951, 2.3991, 6.1951, 2.5947, 4.8981, 2.5947]}], "boundingBox": - [0.9979, 1.6139, 6.2003, 1.6153, 6.1999, 2.5942, 0.9973, 2.5931]}]}], "documentResults": - [{"docType": "custom:d5a6bf66-4d9c-45a9-85de-5e660a892338", "modelId": "d5a6bf66-4d9c-45a9-85de-5e660a892338", + 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "", "boundingBox": + [0.9904, 1.6215, 2.297, 1.6215, 2.297, 1.8221, 0.9958, 1.8272]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.297, 1.6215, 3.5874, + 1.6215, 3.5928, 1.8221, 2.297, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, + "text": "Tax", "boundingBox": [3.5874, 1.6215, 4.8994, 1.6215, 4.8994, 1.8221, + 3.5928, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": + [4.8994, 1.6215, 6.1952, 1.6215, 6.1952, 1.8272, 4.8994, 1.8221]}, {"rowIndex": + 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9958, 1.8272, 2.297, + 1.8221, 2.297, 2.0078, 0.9958, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, + "text": "5.00", "boundingBox": [2.297, 1.8221, 3.5928, 1.8221, 3.5928, 2.0078, + 2.297, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5928, 1.8221, 4.8994, 1.8221, 4.8994, 2.0078, 3.5928, 2.0078]}, {"rowIndex": + 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8994, 1.8221, 6.1952, + 1.8272, 6.1952, 2.0128, 4.8994, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, + "text": "Orange", "boundingBox": [0.9958, 2.0128, 2.297, 2.0078, 2.297, 2.2034, + 0.9958, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", "boundingBox": + [2.297, 2.0078, 3.5928, 2.0078, 3.5928, 2.2034, 2.297, 2.2034]}, {"rowIndex": + 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5928, 2.0078, 4.8994, + 2.0078, 4.8994, 2.2034, 3.5928, 2.2034]}, {"rowIndex": 2, "columnIndex": 3, + "text": "3.00", "boundingBox": [4.8994, 2.0078, 6.1952, 2.0128, 6.1952, 2.2034, + 4.8994, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, "text": "Grapefruit", + "boundingBox": [0.9958, 2.2084, 2.297, 2.2034, 2.297, 2.3991, 0.9958, 2.3991]}, + {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": [2.297, 2.2034, + 3.5928, 2.2034, 3.5928, 2.3991, 2.297, 2.3991]}, {"rowIndex": 3, "columnIndex": + 2, "text": "4.00", "boundingBox": [3.5928, 2.2034, 4.8994, 2.2034, 4.8994, + 2.3991, 3.5928, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, "text": "5.00", + "boundingBox": [4.8994, 2.2034, 6.1952, 2.2034, 6.1952, 2.3991, 4.8994, 2.3991]}, + {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": [0.9958, + 2.3991, 2.297, 2.3991, 2.297, 2.5947, 0.9958, 2.5947]}, {"rowIndex": 4, "columnIndex": + 1, "text": "", "boundingBox": [2.297, 2.3991, 3.5928, 2.3991, 3.5982, 2.5947, + 2.297, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5928, 2.3991, 4.8994, 2.3991, 4.8994, 2.5947, 3.5982, 2.5947]}, {"rowIndex": + 4, "columnIndex": 3, "text": "2.00", "boundingBox": [4.8994, 2.3991, 6.1952, + 2.3991, 6.1952, 2.5947, 4.8994, 2.5947]}], "boundingBox": [0.9986, 1.6168, + 6.2004, 1.6179, 6.2004, 2.597, 0.9981, 2.5961]}]}], "documentResults": [{"docType": + "custom:d55d7c8d-1f62-43ad-b083-317205e12621", "modelId": "d55d7c8d-1f62-43ad-b083-317205e12621", "pageRange": [1, 1], "fields": {"table": {"type": "object", "valueObject": {"Apple": {"type": "object", "valueObject": {"Price": {"type": "string", "valueString": "5.00", "text": "5.00", "page": 1, "boundingBox": [2.385, 1.87, 2.645, 1.87, @@ -234,22 +234,22 @@ interactions: "boundingBox": [3.685, 2.45, 3.945, 2.45, 3.945, 2.55, 3.685, 2.55]}, "Total": {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": [4.985, 2.45, 5.245, 2.45, 5.245, 2.55, 4.985, 2.55]}}}}}}, "docTypeConfidence": - 0.786}], "errors": []}}' + 0.979}], "errors": []}}' headers: apim-request-id: - - 32cc2f20-859d-4f81-95b1-13a1a0d3ebe4 + - 31eb026f-ea60-4f17-8c92-c6673073fd15 content-length: - - '4546' + - '4533' content-type: - application/json; charset=utf-8 date: - - Thu, 22 Apr 2021 00:53:28 GMT + - Thu, 22 Apr 2021 01:29:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '20' + - '19' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml index 473752a683bc..e45971d70b81 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_label_tables_fixed_rows.yaml @@ -17,13 +17,13 @@ interactions: body: string: '' headers: - apim-request-id: d4e9ad58-f5bf-4b04-8ad4-4297227c29ac + apim-request-id: cdcbb978-b4ab-4ccf-8037-ac0d4c43b586 content-length: '0' - date: Thu, 22 Apr 2021 01:03:35 GMT - location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f + date: Thu, 22 Apr 2021 01:30:01 GMT + location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183 strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '516' + x-envoy-upstream-service-time: '461' status: code: 201 message: Created @@ -34,12 +34,12 @@ interactions: User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f?includeKeys=true + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183?includeKeys=true response: body: - string: '{"modelInfo": {"modelId": "a12cae4f-6efd-4f8f-be35-6465d336a63f", "attributes": - {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T01:03:36Z", - "lastUpdatedDateTime": "2021-04-22T01:03:38Z"}, "trainResult": {"averageModelAccuracy": + string: '{"modelInfo": {"modelId": "f7ef8ae9-dc04-4218-bcda-f56037485183", "attributes": + {"isComposed": false}, "status": "ready", "createdDateTime": "2021-04-22T01:30:01Z", + "lastUpdatedDateTime": "2021-04-22T01:30:04Z"}, "trainResult": {"averageModelAccuracy": 0.995, "trainingDocuments": [{"documentName": "label_table_fixed_rows1.pdf", "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows2.pdf", "pages": 1, "status": "succeeded"}, {"documentName": "label_table_fixed_rows3.pdf", @@ -48,117 +48,117 @@ interactions: "pages": 1, "status": "succeeded"}], "fields": [{"fieldName": "table", "accuracy": 0.995}], "errors": []}}' headers: - apim-request-id: 2e40f21e-6a7c-4347-a691-43bb68f1fe1a + apim-request-id: 9fbbf165-4475-465d-883b-f2c4ca4834cb content-length: '720' content-type: application/json; charset=utf-8 - date: Thu, 22 Apr 2021 01:03:40 GMT + date: Thu, 22 Apr 2021 01:30:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '15' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f?includeKeys=true + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183?includeKeys=true - request: body: 'b''{"source": "blob_sas_url"}''' headers: Accept: - application/json Content-Length: - - '233' + - '230' Content-Type: - application/json User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyze?includeTextDetails=false + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyze?includeTextDetails=false response: body: string: '' headers: - apim-request-id: e8f5a925-fd45-4507-b0cd-1399c252f84d + apim-request-id: 8849c9df-fbe7-46fa-acd5-9539019d84cd content-length: '0' - date: Thu, 22 Apr 2021 01:03:40 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + date: Thu, 22 Apr 2021 01:30:06 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyzeresults/aa34dae4-8f5e-486b-9fce-8f0812feaa22 strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '346' + x-envoy-upstream-service-time: '336' status: code: 202 message: Accepted - url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyze?includeTextDetails=false + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyze?includeTextDetails=false - request: body: null headers: User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyzeresults/aa34dae4-8f5e-486b-9fce-8f0812feaa22 response: body: - string: '{"status": "notStarted", "createdDateTime": "2021-04-22T01:03:41Z", - "lastUpdatedDateTime": "2021-04-22T01:03:46Z"}' + string: '{"status": "notStarted", "createdDateTime": "2021-04-22T01:30:07Z", + "lastUpdatedDateTime": "2021-04-22T01:30:12Z"}' headers: - apim-request-id: bb74ec5f-b925-4542-8268-cf686119d795 + apim-request-id: 120ca4ae-a2a2-47ac-8f9e-72e137982895 content-length: '109' content-type: application/json; charset=utf-8 - date: Thu, 22 Apr 2021 01:03:46 GMT + date: Thu, 22 Apr 2021 01:30:11 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyzeresults/aa34dae4-8f5e-486b-9fce-8f0812feaa22 - request: body: null headers: User-Agent: - azsdk-python-ai-formrecognizer/3.1.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyzeresults/aa34dae4-8f5e-486b-9fce-8f0812feaa22 response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-04-22T01:03:41Z", - "lastUpdatedDateTime": "2021-04-22T01:03:49Z", "analyzeResult": {"version": + string: '{"status": "succeeded", "createdDateTime": "2021-04-22T01:30:07Z", + "lastUpdatedDateTime": "2021-04-22T01:30:15Z", "analyzeResult": {"version": "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 5, "columns": - 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Item", "boundingBox": - [0.9965, 1.6215, 2.2935, 1.6215, 2.2935, 1.8221, 0.9965, 1.8221]}, {"rowIndex": - 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.2935, 1.6215, 3.585, - 1.6215, 3.5904, 1.8221, 2.2935, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, - "text": "Tax", "boundingBox": [3.585, 1.6215, 4.8981, 1.6215, 4.8981, 1.8221, - 3.5904, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": - [4.8981, 1.6215, 6.1951, 1.6215, 6.1951, 1.8272, 4.8981, 1.8221]}, {"rowIndex": - 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9965, 1.8221, 2.2935, - 1.8221, 2.2935, 2.0078, 0.9965, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, - "text": "5.00", "boundingBox": [2.2935, 1.8221, 3.5904, 1.8221, 3.5904, 2.0078, - 2.2935, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": - [3.5904, 1.8221, 4.8981, 1.8221, 4.8981, 2.0078, 3.5904, 2.0078]}, {"rowIndex": - 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8981, 1.8221, 6.1951, - 1.8272, 6.1951, 2.0128, 4.8981, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, - "text": "Orange", "boundingBox": [0.9965, 2.0128, 2.2935, 2.0078, 2.2935, - 2.2034, 0.9965, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", - "boundingBox": [2.2935, 2.0078, 3.5904, 2.0078, 3.5904, 2.2034, 2.2935, 2.2034]}, - {"rowIndex": 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5904, - 2.0078, 4.8981, 2.0078, 4.8981, 2.2034, 3.5904, 2.2034]}, {"rowIndex": 2, - "columnIndex": 3, "text": "3.00", "boundingBox": [4.8981, 2.0078, 6.1951, - 2.0128, 6.1951, 2.2034, 4.8981, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, - "text": "", "boundingBox": [0.9965, 2.2084, 2.2935, 2.2034, 2.2935, 2.3991, - 0.9965, 2.3991]}, {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": - [2.2935, 2.2034, 3.5904, 2.2034, 3.5904, 2.3991, 2.2935, 2.3991]}, {"rowIndex": - 3, "columnIndex": 2, "text": "4.00", "boundingBox": [3.5904, 2.2034, 4.8981, - 2.2034, 4.8981, 2.3991, 3.5904, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, - "text": "5.00", "boundingBox": [4.8981, 2.2034, 6.1951, 2.2034, 6.1951, 2.3991, - 4.8981, 2.3991]}, {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": - [0.9965, 2.3991, 2.2935, 2.3991, 2.2935, 2.5947, 0.9965, 2.5947]}, {"rowIndex": - 4, "columnIndex": 1, "text": "", "boundingBox": [2.2935, 2.3991, 3.5904, 2.3991, - 3.5958, 2.5947, 2.2935, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": - "2.00", "boundingBox": [3.5904, 2.3991, 4.8981, 2.3991, 4.8981, 2.5947, 3.5958, - 2.5947]}, {"rowIndex": 4, "columnIndex": 3, "text": "2.00", "boundingBox": - [4.8981, 2.3991, 6.1951, 2.3991, 6.1951, 2.5947, 4.8981, 2.5947]}], "boundingBox": - [0.9979, 1.6139, 6.2003, 1.6153, 6.1999, 2.5942, 0.9973, 2.5931]}]}], "documentResults": - [{"docType": "custom:a12cae4f-6efd-4f8f-be35-6465d336a63f", "modelId": "a12cae4f-6efd-4f8f-be35-6465d336a63f", + 4, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "", "boundingBox": + [0.9904, 1.6215, 2.297, 1.6215, 2.297, 1.8221, 0.9958, 1.8272]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Price", "boundingBox": [2.297, 1.6215, 3.5874, + 1.6215, 3.5928, 1.8221, 2.297, 1.8221]}, {"rowIndex": 0, "columnIndex": 2, + "text": "Tax", "boundingBox": [3.5874, 1.6215, 4.8994, 1.6215, 4.8994, 1.8221, + 3.5928, 1.8221]}, {"rowIndex": 0, "columnIndex": 3, "text": "Total", "boundingBox": + [4.8994, 1.6215, 6.1952, 1.6215, 6.1952, 1.8272, 4.8994, 1.8221]}, {"rowIndex": + 1, "columnIndex": 0, "text": "Apple", "boundingBox": [0.9958, 1.8272, 2.297, + 1.8221, 2.297, 2.0078, 0.9958, 2.0128]}, {"rowIndex": 1, "columnIndex": 1, + "text": "5.00", "boundingBox": [2.297, 1.8221, 3.5928, 1.8221, 3.5928, 2.0078, + 2.297, 2.0078]}, {"rowIndex": 1, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5928, 1.8221, 4.8994, 1.8221, 4.8994, 2.0078, 3.5928, 2.0078]}, {"rowIndex": + 1, "columnIndex": 3, "text": "7.00", "boundingBox": [4.8994, 1.8221, 6.1952, + 1.8272, 6.1952, 2.0128, 4.8994, 2.0078]}, {"rowIndex": 2, "columnIndex": 0, + "text": "Orange", "boundingBox": [0.9958, 2.0128, 2.297, 2.0078, 2.297, 2.2034, + 0.9958, 2.2084]}, {"rowIndex": 2, "columnIndex": 1, "text": "2.00", "boundingBox": + [2.297, 2.0078, 3.5928, 2.0078, 3.5928, 2.2034, 2.297, 2.2034]}, {"rowIndex": + 2, "columnIndex": 2, "text": "1.00", "boundingBox": [3.5928, 2.0078, 4.8994, + 2.0078, 4.8994, 2.2034, 3.5928, 2.2034]}, {"rowIndex": 2, "columnIndex": 3, + "text": "3.00", "boundingBox": [4.8994, 2.0078, 6.1952, 2.0128, 6.1952, 2.2034, + 4.8994, 2.2034]}, {"rowIndex": 3, "columnIndex": 0, "text": "Grapefruit", + "boundingBox": [0.9958, 2.2084, 2.297, 2.2034, 2.297, 2.3991, 0.9958, 2.3991]}, + {"rowIndex": 3, "columnIndex": 1, "text": "1.00", "boundingBox": [2.297, 2.2034, + 3.5928, 2.2034, 3.5928, 2.3991, 2.297, 2.3991]}, {"rowIndex": 3, "columnIndex": + 2, "text": "4.00", "boundingBox": [3.5928, 2.2034, 4.8994, 2.2034, 4.8994, + 2.3991, 3.5928, 2.3991]}, {"rowIndex": 3, "columnIndex": 3, "text": "5.00", + "boundingBox": [4.8994, 2.2034, 6.1952, 2.2034, 6.1952, 2.3991, 4.8994, 2.3991]}, + {"rowIndex": 4, "columnIndex": 0, "text": "Pear", "boundingBox": [0.9958, + 2.3991, 2.297, 2.3991, 2.297, 2.5947, 0.9958, 2.5947]}, {"rowIndex": 4, "columnIndex": + 1, "text": "", "boundingBox": [2.297, 2.3991, 3.5928, 2.3991, 3.5982, 2.5947, + 2.297, 2.5947]}, {"rowIndex": 4, "columnIndex": 2, "text": "2.00", "boundingBox": + [3.5928, 2.3991, 4.8994, 2.3991, 4.8994, 2.5947, 3.5982, 2.5947]}, {"rowIndex": + 4, "columnIndex": 3, "text": "2.00", "boundingBox": [4.8994, 2.3991, 6.1952, + 2.3991, 6.1952, 2.5947, 4.8994, 2.5947]}], "boundingBox": [0.9986, 1.6168, + 6.2004, 1.6179, 6.2004, 2.597, 0.9981, 2.5961]}]}], "documentResults": [{"docType": + "custom:f7ef8ae9-dc04-4218-bcda-f56037485183", "modelId": "f7ef8ae9-dc04-4218-bcda-f56037485183", "pageRange": [1, 1], "fields": {"table": {"type": "object", "valueObject": {"Apple": {"type": "object", "valueObject": {"Price": {"type": "string", "valueString": "5.00", "text": "5.00", "page": 1, "boundingBox": [2.385, 1.87, 2.645, 1.87, @@ -184,17 +184,17 @@ interactions: "boundingBox": [3.685, 2.45, 3.945, 2.45, 3.945, 2.55, 3.685, 2.55]}, "Total": {"type": "string", "valueString": "2.00", "text": "2.00", "page": 1, "boundingBox": [4.985, 2.45, 5.245, 2.45, 5.245, 2.55, 4.985, 2.55]}}}}}}, "docTypeConfidence": - 0.786}], "errors": []}}' + 0.979}], "errors": []}}' headers: - apim-request-id: c7b0f8cf-a293-4cdb-a9ea-44e36ad992de - content-length: '4546' + apim-request-id: 2877cc34-d1ae-4a4e-8e5b-ace383a36b69 + content-length: '4533' content-type: application/json; charset=utf-8 - date: Thu, 22 Apr 2021 01:03:51 GMT + date: Thu, 22 Apr 2021 01:30:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/a12cae4f-6efd-4f8f-be35-6465d336a63f/analyzeresults/fc48f896-ada4-490c-9fe6-8d35d4b3bd84 + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/f7ef8ae9-dc04-4218-bcda-f56037485183/analyzeresults/aa34dae4-8f5e-486b-9fce-8f0812feaa22 version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py index ee8297e4958b..0f8352e42e6d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py @@ -503,7 +503,7 @@ def callback(raw_response, _, headers): poller = fr_client.begin_recognize_custom_forms_from_url( model.model_id, - self.label_table_variable_row_url_pdf, + self.label_table_fixed_row_url_pdf, cls=callback ) form = poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py index f39abeeebdd4..3ffcd5f4b899 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py @@ -546,7 +546,7 @@ def callback(raw_response, _, headers): poller = await fr_client.begin_recognize_custom_forms_from_url( model.model_id, - self.label_table_variable_row_url_pdf, + self.label_table_fixed_row_url_pdf, cls=callback ) form = await poller.result() From 2e7f48db4fb069510e6fb1142dff474a7af63c95 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Thu, 22 Apr 2021 14:03:12 -0700 Subject: [PATCH 3/4] shorten test variable names --- .../azure-ai-formrecognizer/tests/preparers.py | 4 ++-- .../tests/test_custom_forms_from_url.py | 8 ++++---- .../tests/test_custom_forms_from_url_async.py | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py index 62bf73e98b01..139aaa100bd8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py @@ -25,8 +25,8 @@ formrecognizer_multipage_storage_container_sas_url="container_sas_url", formrecognizer_multipage_storage_container_sas_url_2="container_sas_url", formrecognizer_selection_mark_storage_container_sas_url="container_sas_url", - formrecognizer_label_table_variable_rows_storage_container_sas_url="container_sas_url", - formrecognizer_label_table_fixed_rows_storage_container_sas_url="container_sas_url", + formrecognizer_table_variable_rows_container_sas_url="container_sas_url", + formrecognizer_table_fixed_rows_container_sas_url="container_sas_url", formrecognizer_resource_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.CognitiveServices/accounts/frname", formrecognizer_region="region" ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py index 0f8352e42e6d..4291c8420d29 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py @@ -451,10 +451,10 @@ def test_pages_kwarg_specified(self, client, formrecognizer_testing_data_contain @FormRecognizerPreparer() @GlobalClientPreparer() - def test_label_tables_variable_rows(self, client, formrecognizer_label_table_variable_rows_storage_container_sas_url): + def test_label_tables_variable_rows(self, client, formrecognizer_table_variable_rows_container_sas_url): fr_client = client.get_form_recognizer_client() - training_poller = client.begin_training(formrecognizer_label_table_variable_rows_storage_container_sas_url, use_training_labels=True) + training_poller = client.begin_training(formrecognizer_table_variable_rows_container_sas_url, use_training_labels=True) model = training_poller.result() responses = [] @@ -487,10 +487,10 @@ def callback(raw_response, _, headers): @FormRecognizerPreparer() @GlobalClientPreparer() - def test_label_tables_fixed_rows(self, client, formrecognizer_label_table_fixed_rows_storage_container_sas_url): + def test_label_tables_fixed_rows(self, client, formrecognizer_table_fixed_rows_container_sas_url): fr_client = client.get_form_recognizer_client() - training_poller = client.begin_training(formrecognizer_label_table_fixed_rows_storage_container_sas_url, use_training_labels=True) + training_poller = client.begin_training(formrecognizer_table_fixed_rows_container_sas_url, use_training_labels=True) model = training_poller.result() responses = [] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py index 3ffcd5f4b899..1930f6b82038 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py @@ -490,7 +490,7 @@ async def test_pages_kwarg_specified(self, client, formrecognizer_testing_data_c @FormRecognizerPreparer() @GlobalClientPreparer() - async def test_label_tables_variable_rows(self, client, formrecognizer_label_table_variable_rows_storage_container_sas_url): + async def test_label_tables_variable_rows(self, client, formrecognizer_table_variable_rows_container_sas_url): fr_client = client.get_form_recognizer_client() responses = [] @@ -503,7 +503,7 @@ def callback(raw_response, _, headers): async with client: training_poller = await client.begin_training( - formrecognizer_label_table_variable_rows_storage_container_sas_url, use_training_labels=True) + formrecognizer_table_variable_rows_container_sas_url, use_training_labels=True) model = await training_poller.result() poller = await fr_client.begin_recognize_custom_forms_from_url( @@ -529,7 +529,7 @@ def callback(raw_response, _, headers): @FormRecognizerPreparer() @GlobalClientPreparer() - async def test_label_tables_fixed_rows(self, client, formrecognizer_label_table_fixed_rows_storage_container_sas_url): + async def test_label_tables_fixed_rows(self, client, formrecognizer_table_fixed_rows_container_sas_url): fr_client = client.get_form_recognizer_client() responses = [] @@ -541,7 +541,7 @@ def callback(raw_response, _, headers): responses.append(form) async with client: - training_poller = await client.begin_training(formrecognizer_label_table_fixed_rows_storage_container_sas_url, use_training_labels=True) + training_poller = await client.begin_training(formrecognizer_table_fixed_rows_container_sas_url, use_training_labels=True) model = await training_poller.result() poller = await fr_client.begin_recognize_custom_forms_from_url( From 549de3a2d92ff5c86ed66a620fc54b82f1b9360d Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Thu, 22 Apr 2021 14:04:31 -0700 Subject: [PATCH 4/4] update test-resources.json env var names --- sdk/formrecognizer/test-resources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/formrecognizer/test-resources.json b/sdk/formrecognizer/test-resources.json index b643421a05fe..ed991b471483 100644 --- a/sdk/formrecognizer/test-resources.json +++ b/sdk/formrecognizer/test-resources.json @@ -225,11 +225,11 @@ "type": "string", "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('selectionMarkTrainingDataContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('selectionMarkTrainingDataSasProperties')).serviceSasToken)]" }, - "FORMRECOGNIZER_LABEL_TABLE_VARIABLE_ROWS_STORAGE_CONTAINER_SAS_URL": { + "FORMRECOGNIZER_TABLE_VARIABLE_ROWS_CONTAINER_SAS_URL": { "type": "string", "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('labelTablesVariableRowsContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('labelTablesVariableRowsSasProperties')).serviceSasToken)]" }, - "FORMRECOGNIZER_LABEL_TABLE_FIXED_ROWS_STORAGE_CONTAINER_SAS_URL": { + "FORMRECOGNIZER_TABLE_FIXED_ROWS_CONTAINER_SAS_URL": { "type": "string", "value": "[concat(reference(parameters('blobResourceId'), '2019-06-01').primaryEndpoints.blob, parameters('labelTablesFixedRowsContainer'), '?', listServiceSas(parameters('blobResourceId'), '2019-06-01', parameters('labelTablesFixedRowsSasProperties')).serviceSasToken)]" },