BentoML
BentoML copied to clipboard
bug: io import errors on versions 1.0.4 and 1.0.5
Describe the bug
When I run the BentoML Tutorial with versions 1.0.4 or 1.0.5, the bentoml serve service:svc command hangs. On 1.0.3 it works as expected. I did notice that in moving from 1.0.3 to later versions, the host of the URI that the logs point you changed from 127.0.0.1 to 0.0.0.0.
To reproduce
- Create a directory to run the tests in
- Run
python3 -m venv venv - Run
source venv/bin/activate - Run
pip install bentoml==1.0.4 scikit-learn - Run the code for Saving a Model
- Run the code for Creating a Service
- The server will never start. Kill the process.
- Run Run
pip install bentoml==1.0.3 - Run the code for Creating a Service
- The server will start as expected.
Expected behavior
The server will start.
Environment
bentoml: 1.0.4
python: 3.9.13
platform: macOS-12.5-arm64-arm-64bit
uid:gid: 501:20
pip_packages
aiohttp==3.8.1
aiosignal==1.2.0
anyio==3.6.1
appdirs==1.4.4
asgiref==3.5.2
async-timeout==4.0.2
attrs==22.1.0
bentoml==1.0.4
build==0.8.0
cattrs==22.1.0
certifi==2022.6.15
charset-normalizer==2.1.1
circus==0.17.1
click==8.1.3
cloudpickle==2.1.0
commonmark==0.9.1
contextlib2==21.6.0
deepmerge==1.0.1
Deprecated==1.2.13
exceptiongroup==1.0.0rc9
frozenlist==1.3.1
fs==2.4.16
h11==0.13.0
idna==3.3
Jinja2==3.1.2
joblib==1.1.0
MarkupSafe==2.1.1
multidict==6.0.2
numpy==1.23.2
opentelemetry-api==1.12.0
opentelemetry-instrumentation==0.33b0
opentelemetry-instrumentation-aiohttp-client==0.33b0
opentelemetry-instrumentation-asgi==0.33b0
opentelemetry-sdk==1.12.0
opentelemetry-semantic-conventions==0.33b0
opentelemetry-util-http==0.33b0
packaging==21.3
pathspec==0.10.1
pep517==0.13.0
pip-tools==6.8.0
prometheus-client==0.13.1
psutil==5.9.2
Pygments==2.13.0
pynvml==11.4.1
pyparsing==3.0.9
python-dateutil==2.8.2
python-dotenv==0.21.0
python-multipart==0.0.5
PyYAML==6.0
pyzmq==23.2.1
requests==2.28.1
rich==12.5.1
schema==0.7.5
scikit-learn==1.1.2
scipy==1.9.1
simple-di==0.1.5
six==1.16.0
sniffio==1.3.0
starlette==0.20.4
threadpoolctl==3.1.0
tomli==2.0.1
tornado==6.2
typing_extensions==4.3.0
urllib3==1.26.12
uvicorn==0.18.3
watchfiles==0.16.1
wrapt==1.14.1
yarl==1.8.1
This is due to having two instance of bentoml. You can try uninstall bentoml in outside of the env, and try again.
I don't think I have bentoml installed outside of the venv. Once I deactivate, running which bentoml results in bentoml not found.
I follow your reproduction step and I didn't encounter issue with 1.0.4 🤔
Can you send the output of printenv | grep BENTOML?
I get nothing in the output of that. Could this be related to being on the new Macbook with the ARM chips or are you on the same platform?
I'm using M1 mac atm. That command just to show whether you have any bentoml environment setup.
Would you be able to send a built copy of the Bento you're trying to run?
You should be able to get it with bentoml build . and then bentoml export <tag from build>.
Happy to send that, but am currently out of office until Monday. Will get it to you then. Thanks!
Hi @blaizeb-at-x, I was unable to reproduce this. Can you try out the latest release and see whether you run into this issue?
Feel free to reopen this if you still see this.