Cant find Form Recognizer Custom Model id

Taiye Malomo 21 Reputation points
2022-03-05T14:06:24.987+00:00

I have trained a customer model using the form recognizer studio and it was successfull. However, the model id generated isnt the usual with alphanumeric but just the name. Under the Models tab in Studio, Model Id is actually the name (all string) but when i try to test a new form in my application using python SDK, it keeps coming up with"Code: 1001 Message: Specified model not found or not ready".

Can someone pls advise why this is not working or telling me model is not ready even though, the status is successful and I can run new tests in the studio?

I want to be able to use this model in the Python SDK. Thank you

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

Accepted answer
  1. romungi-MSFT 48,906 Reputation points Microsoft Employee Moderator
    2022-03-07T07:42:27.843+00:00

    @Taiye Malomo Are you using the SDK client which supports API version 2022-01-30-preview ?

    If not you can install the version 3.2.0b3 - Latest Beta and try the following steps to list the new models supported with this version.

    from azure.core.credentials import AzureKeyCredential  
    from azure.ai.formrecognizer import DocumentModelAdministrationClient  
      
      
    credential = AzureKeyCredential("your_key")  
      
    endpoint = "https://<your_resource>.cognitiveservices.azure.com/"  
      
    document_model_admin_client = DocumentModelAdministrationClient(endpoint, credential)  
    models = document_model_admin_client.list_models()  
    print("We have models with the following ids: {}".format(", ".join([m.model_id for m in models])))  
    

    Using the listed model, you can call analyze operation to test the forms using the SDK.

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Daniel Middleditch 1 Reputation point
    2022-03-31T16:26:21.323+00:00

    Hello, just found the above @romungi-MSFT and tried this but I still get the ModelIDs in the format of the title.

    We have models with the following ids: prebuilt-businessCard, prebuilt-document, prebuilt-idDocument, prebuilt-invoice, prebuilt-layout, prebuilt-receipt, prebuilt-tax.us.w2, tfinvoices

    tfinvoices is the model that I am trying to use in Automate but get the exact same error where I am assuming there is another longer unique ID?

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.