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

TPS, result.poller and 429 errors when using python begin_classify_document from Document Intelligence SDK #39643

Open
mennolaan opened this issue Feb 10, 2025 · 4 comments
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 needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@mennolaan
Copy link

Hi,

We have build a solution where we utilize the client_async.begin_classify_document from the Document Intelligence Python SDK.

When we experienced 429 errors we implemented a load balance logic by using semaphore and async logic. This way we keep the initial paralel calls to 14 (1 lower than max tps) and make sure we can only have 14 simultaneous transactions per second.

However, we still seem to receive the 429 http errors.

In the documentation it isn't clear how to approach the TPS by definition. Do we need to assume that result.poller also contributes to the TPS? There isn't a way for us to control the amount of latency in poller. In our usecase we have pdf's of different sizes, and thus we stream it to the endpoint. Therefor we do not know how long a classification takes. And we do not know how many times the poller will try to fetch the end result.

Obviously the best practices state, implement retry logic. But that feels like a bandage solution. We would like to actually have a better grasp of the expected output and prevent any 429 as much as possible. This will also benefit the backend so it doesn't have to send 429 all the time.

What is the life cycle of a singular TPS? for begin classify to poller.result.

I saw similar mention here: #35952 Is there any progress on this?

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 10, 2025
@xiangyan99 xiangyan99 added Client This issue points to a problem in the data-plane of the library. Document Intelligence and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Feb 10, 2025
@xiangyan99
Copy link
Member

Thanks for reaching out, we’ll investigate asap.

@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Feb 10, 2025
@kristapratico kristapratico added the Service Attention Workflow: This issue is responsible by Azure service team. label Feb 10, 2025
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @bojunehsu @vkurpad.

@TFR258
Copy link
Contributor

TFR258 commented Feb 10, 2025

@mennolaan , could you reach out to [email protected], quoting this ticket, and adding your azure resource id?
We should be able to troubleshoot this issue further.

Thanks

@kristapratico kristapratico added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Feb 12, 2025
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Feb 12, 2025
Copy link

Hi @mennolaan. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

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 needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants