Cases where a form recognizer composed model won't be built

Vittorio Tison 51 Reputation points
2021-08-18T10:10:14.02+00:00

Hello, i wanted to create a composed model of 8 custom models. However, the "composition" seems to work only by grouping some of these models, not all. The process does not return any error, the new composed model simply does not appear on the list.

Are there any limitations to the merger? The number of custom model assigned should not be an issue as the documentation states that up to 100 models can be assigned.
What i find strange is that it does not return an error.
Do you have any hint?

Thank you and best regards,

Vittorio

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,439 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ramr-msft 17,621 Reputation points
    2021-08-18T14:58:39.883+00:00

    @Vittorio Tison Thanks for the question. Model Compose is only available for custom models trained with labels. Attempting to compose unlabeled models will produce an error.
    Document: https://learn.microsoft.com/en-us/azure/applied-ai-services/form-recognizer/concept-custom?tabs=fott


  2. Michal Zbořil 11 Reputation points
    2021-08-23T13:18:17.8+00:00

    Hello,

    I have a similar problem. I want to compose model from two custom models via rest api.

    Both custom models labeled and trained via https://fott-preview.azurewebsites.net/. Both working well in different composed model.

    When I use method 'https://XXX//formrecognizer/v2.1-preview.2/custom/models/compose' ( payload = {"modelIds":["9d0f6f2c-397e-48fc-be96-62e1d6e605da","69576c0d-d5bc-4ab4-82c9-e0c8d5bb4b45"],"modelName": "modelik"}

    I get status 201 and link with model id in header:

    https://XXX/formrecognizer/v2.1-preview.2/custom/models/2d445bad-9165-439d-b669-796dac85318d

    I am calling get custom model and response is:

    b'{"modelInfo":{"modelId":"2d445bad-9165-439d-b669-796dac85318d","modelName":"modelik","status":"invalid","createdDateTime":"2021-08-23T13:09:32Z","lastUpdatedDateTime":"2021-08-23T13:09:32Z"},"trainResult":{"averageModelAccuracy":0.0,"errors":[{"code":"3200","innerError":{"requestId":"2d445bad-9165-439d-b669-796dac85318d"},"message":"Internal error during model reading for model 9d0f6f2c-397e-48fc-be96-62e1d6e605da."}]}}'

    {"modelInfo":{"modelId":"2d445bad-9165-439d-b669-796dac85318d","modelName":"modelik","status":"invalid","createdDateTime":"2021-08-23T13:09:32Z","lastUpdatedDateTime":"2021-08-23T13:09:32Z"},"trainResult":{"averageModelAccuracy":0.0,"errors":[{"code":"3200","innerError":{"requestId":"2d445bad-9165-439d-b669-796dac85318d"},"message":"Internal error during model reading for model 9d0f6f2c-397e-48fc-be96-62e1d6e605da."}]}}

    STATUS:
    200

    HEADER:
    {'Content-Length': '423', 'Content-Type': 'application/json; charset=utf-8', 'ms-azure-ai-errorcode': '3200', 'x-envoy-upstream-service-time': '25', 'apim-request-id': 'c9564c06-9f04-482e-abbc-da034985823e', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options': 'nosniff', 'Date': 'Mon, 23 Aug 2021 13:09:45 GMT'}

    Do you have any suggestion what am I doing wrong? I didn´t find description od code: 3200.

    Thank you!

    M.