We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See https://github.com/bentoml/BentoML/blob/main/src/_bentoml_impl/client/http.py#L183-L186 and https://github.com/bentoml/BentoML/blob/main/src/_bentoml_impl/client/http.py#L332-L334. This completely hangs the event queue. As we used to create new clients repeatedly, this adds up.
I suggest wrapping AsyncHttpClient in a await asyncio.get_running_loop().run_in_executor(None, AsyncHttpClient) for now.
AsyncHttpClient
await asyncio.get_running_loop().run_in_executor(None, AsyncHttpClient)
Add breakpoints to the quoted code and run:
AsyncHttpClient()
I expect that all http requests are done asynchronously with the AsyncHttpClient.
bentoml: v1.4.5 python: 3.12 environment: Arch Linux
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
See https://github.com/bentoml/BentoML/blob/main/src/_bentoml_impl/client/http.py#L183-L186 and https://github.com/bentoml/BentoML/blob/main/src/_bentoml_impl/client/http.py#L332-L334. This completely hangs the event queue. As we used to create new clients repeatedly, this adds up.
I suggest wrapping
AsyncHttpClient
in aawait asyncio.get_running_loop().run_in_executor(None, AsyncHttpClient)
for now.To reproduce
Add breakpoints to the quoted code and run:
AsyncHttpClient()
Expected behavior
I expect that all http requests are done asynchronously with the AsyncHttpClient.
Environment
bentoml: v1.4.5
python: 3.12
environment: Arch Linux
The text was updated successfully, but these errors were encountered: