You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading the image is efficient (0.08-0.1 seconds), but returning it asynchronously incurs a delay of up to 10 seconds.
Attempting to resolve this with a runner leads to a format error:
Traceback (most recent call last):
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/server/http_app.py", line 334, in api_func
output = await api.func(**input_data)
File "/root/snowflake/backend/python/firm/services/inpaint/service.py", line 215, in api
return await post_process_runner.forward.async_run(source=image, target=output_image)
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/runner/runner.py", line 56, in async_run
return await self.runner._runner_handle.async_run_method(self, *args, **kwargs)
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/runner/runner_handle/remote.py", line 201, in async_run_method
payload_params = Params[Payload](*args, **kwargs).map(
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/runner/utils.py", line 65, in map
kwargs = {k: function(v) for k, v in self.kwargs.items()}
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/runner/utils.py", line 65, in <dictcomp>
kwargs = {k: function(v) for k, v in self.kwargs.items()}
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/runner/container.py", line 700, in to_payload
return container_cls.to_payload(batch, batch_dim)
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/bentoml/_internal/runner/container.py", line 490, in to_payload
batch.save(buffer, format=batch.format)
File "/root/miniconda3/envs/firm/lib/python3.10/site-packages/PIL/Image.py", line 2546, in save
raise ValueError(msg) from e
ValueError: unknown file extension:
How can I properly handle async returns with bentoml.io.Image() to avoid these delays?
Describe the bug
Hello,
I'm facing an issue with BentoML API serving where significant delays occur during the async return of images.
Here’s the simplified code:
Loading the image is efficient (0.08-0.1 seconds), but returning it asynchronously incurs a delay of up to 10 seconds.
Attempting to resolve this with a runner leads to a format error:
How can I properly handle async returns with bentoml.io.Image() to avoid these delays?
Thank you for your assistance.
To reproduce
No response
Expected behavior
No response
Environment
Environment variable
System information
bentoml
: 1.2.16python
: 3.10.14platform
: Linux-4.18.0-425.19.2.el8_7.x86_64-x86_64-with-glibc2.31uid_gid
: 0:0conda
: 23.5.0in_conda_env
: Trueconda_packages
pip_packages
The text was updated successfully, but these errors were encountered: