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
This keeps happening with mainly transformer based models. However, this error keeps prevailing only after containerizing like using bentoml containerize bento_svc:latest and running the container like docker run --rm -p 3000:3000 bento_svc:t5mqzwdlzoxbjdx2
I cloned the source code of this sentence embedding and tried using containerize and run. it still fails but works like charm if used docker container out of the box.
This happened with bentoml 1.1.6 and updated version 1.1.7 as well.
Also, I am using Mac OS with Apple Silicon chip if that matters.
I am able to run with scikit learn models and even torch based models that I trained.
Wonder what am I doing wrong here.
strack-trace for further introspection:
2023-10-16T02:32:33+0000 [ERROR] [api_server:4] Exception on /encode [POST] (trace=f755596b7d185db8d620262d333fa9ae,span=2c59e1cd9a90f9cb,sampled=0,service.name=sentence-embedding-svc) Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/server/http_app.py", line 341, in api_func output = await api.func(*args) File "/home/bentoml/bento/src/service.py", line 38, in encode return await embed_runner.encode.async_run(docs.dict()) File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/runner/runner.py", line 55, in async_run return await self.runner._runner_handle.async_run_method(self, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/runner/runner_handle/remote.py", line 216, in async_run_method async with self._client.post( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1167, in __aenter__ self._resp = await self._coro File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 586, in _request await resp.start(conn) File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 905, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 616, in read await self._waiter aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
As some additional notes to the above issue, it definitely seems to be memory issue, we were also facing the same issue and could resolve it for now by adding more memory to the container. In our case, we are deploying in ECS and running multiple models (i.e. multiple runners) in each EC2 instance.
As some additional notes to the above issue, it definitely seems to be memory issue, we were also facing the same issue and could resolve it for now by adding more memory to the container. In our case, we are deploying in ECS and running multiple models (i.e. multiple runners) in each EC2 instance.
Thanks for your finding! Do you find the memory slowly building up over time? Can you share a graph of memory consumption with respect to request volume?
Describe the bug
This keeps happening with mainly transformer based models. However, this error keeps prevailing only after containerizing like using
bentoml containerize bento_svc:latest
and running the container likedocker run --rm -p 3000:3000 bento_svc:t5mqzwdlzoxbjdx2
I have worked on multiple models like the one in documentation
https://docs.bentoml.com/en/latest/quickstarts/deploy-a-transformer-model-with-bentoml.html
even distil bert models and also sentence embedding.
I cloned the source code of this sentence embedding and tried using containerize and run. it still fails but works like charm if used docker container out of the box.
https://github.com/bentoml/sentence-embedding-bento/blob/main/requirements.txt
This happened with bentoml 1.1.6 and updated version 1.1.7 as well.
Also, I am using Mac OS with Apple Silicon chip if that matters.
I am able to run with scikit learn models and even torch based models that I trained.
Wonder what am I doing wrong here.
strack-trace for further introspection:
2023-10-16T02:32:33+0000 [ERROR] [api_server:4] Exception on /encode [POST] (trace=f755596b7d185db8d620262d333fa9ae,span=2c59e1cd9a90f9cb,sampled=0,service.name=sentence-embedding-svc) Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/server/http_app.py", line 341, in api_func output = await api.func(*args) File "/home/bentoml/bento/src/service.py", line 38, in encode return await embed_runner.encode.async_run(docs.dict()) File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/runner/runner.py", line 55, in async_run return await self.runner._runner_handle.async_run_method(self, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/runner/runner_handle/remote.py", line 216, in async_run_method async with self._client.post( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1167, in __aenter__ self._resp = await self._coro File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 586, in _request await resp.start(conn) File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 905, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 616, in read await self._waiter aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
To reproduce
No response
Expected behavior
No response
Environment
Environment variable
System information
bentoml
: 1.1.7python
: 3.9.18platform
: macOS-13.6-arm64-i386-64bituid_gid
: 502:20conda
: 23.1.0in_conda_env
: Trueconda_packages
pip_packages
The text was updated successfully, but these errors were encountered: