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

Close aiohttp client on error #2294

Merged
merged 2 commits into from
May 30, 2024
Merged

Close aiohttp client on error #2294

merged 2 commits into from
May 30, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented May 30, 2024

Should fix warnings in optimum CI cc @dacorvo

At the moment if an error occurs while sending a POST with AsyncInferenceClient, we don't catch all errors. This PR makes sure that we close the connection "no matter what" and before raising the exception. Also added a test to ensure that.

Copy link

@dacorvo dacorvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promptly fixed, awesome !

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor Author

Wauplin commented May 30, 2024

Thanks for the quick review @dacorvo :) Failing tests are unrelated so merging it now.

@Wauplin Wauplin merged commit 0d0603f into main May 30, 2024
13 of 16 checks passed
@Wauplin Wauplin deleted the close-aiohttp-client-on-error branch May 30, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants