Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-ai-documentintelligence AIO capability is not working #36217

Closed
jacky0218 opened this issue Jun 24, 2024 · 6 comments
Closed

azure-ai-documentintelligence AIO capability is not working #36217

jacky0218 opened this issue Jun 24, 2024 · 6 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Document Intelligence issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@jacky0218
Copy link

  • Package Name:
    azure-ai-documentintelligence
  • Package Version:
    1.0.0b2
  • Operating System:
    Linux
  • Python Version:
    3.10.14

Describe the bug
The AIO version runs no faster than without AIO

To Reproduce
I just followed the code example as below.
(https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/documentintelligence/azure-ai-documentintelligence/samples/aio/sample_analyze_general_documents_async.py)

Expected behavior
AIO-level speed.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. Cognitive - Form Recognizer labels Jun 24, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 24, 2024
@kristapratico
Copy link
Member

@jacky0218 thanks for your feedback, @YalinLi0312 will take a look and get back to you as soon as possible. Can I ask how you're measuring speed between sync and async?

@jacky0218
Copy link
Author

jacky0218 commented Jun 24, 2024

@kristapratico
Thanks for the support.
I've tested a 5-page PDF, and the speed from sync is 11.322867231443524. Async yields a speed of 11.022184098139405.

@lmazuel
Copy link
Member

lmazuel commented Jun 26, 2024

Hi @jacky0218

AIO programming means that the HTTP IOs under the hood are managed using async/await and an asyncio event loop, in order to avoid blocking code on sockets. If the Azure service needs 11 seconds to process your PDF, you can't finish faster than what the service will do, you just do a better usage of your local CPU and socket usage with aio. Therefore, the times you got here sounds reasonable given your limitation is service related, not Python related. To say it differently, if you run the same PDF through C# or Java SDK, you will still get 11 seconds, since the SDK is just a messenger here and there isn't heavy processing done by the SDK in this specific scenario.

@lmazuel lmazuel added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Jun 26, 2024
Copy link

Hi @jacky0218. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jun 26, 2024
Copy link

github-actions bot commented Jul 4, 2024

Hi @jacky0218, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

@github-actions github-actions bot closed this as completed Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Document Intelligence issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants