Error in Python: deploying custom clssification model from Form Recognizer

Nguyen, Ngoc Anh 0 Reputation points
2023-07-10T10:52:34.34+00:00

I haved use the sample_classify_document.py to deploy my custom clssification model. But there is an error:

'DocumentAnalysisClient' object has no attribute 'begin_classify_document'
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,443 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 46,996 Reputation points
    2023-07-10T20:30:48.17+00:00

    Hello @Nguyen, Ngoc Anh

    Thanks for reaching out to us, I have seen similar issue as yours, the reason of it is the wrong version SDK.

    begin_classify_document() method will be available in the pre-release version of the SDK 3.3.0.b1since this is equivalent to custom classification model of FR, please check if you have installed this version and try again. Do let me know if you have installed this version but still see this error.

    If you have just started using the python SDK, then please try the GA version 3.2.0 and there are several examples on the GitHub repo to analyze documents with the prebuilt or custom models.

    For SDK reference, please use this link and select the required SDK version to lookup the reference.

    I hope this helps!

    Regards,

    Yutong

    -Please kindly accept the answer and vote 'Yes' if you feel helpful to support the community, thanks a lot.

    0 comments No comments