-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
🐛 Bug: Bentoml and Python3.12 compatibility #1379
Comments
@Abellegese I remember the stack trace having more to it - ie specifically, I am asking for the part of the trace where this bug originates from ersilia's copy of bentoml. If possible could you attach that to the issue as well? |
Okay @DhanshreeA will update it. |
Hi @DhanshreeA and @Abellegese Can you update this issue? And set a deadline for completion |
I am unable to reproduce the exact error that @Abellegese has reported here, however, I do notice an issue with Python 3.12 and fetching from github, however I do experience a similar error (ie in that it is coming from Traceback (most recent call last):
File "/home/dee/.pyenv/versions/ersilia-312/bin/bentoml", line 5, in <module>
from bentoml.cli import cli
File "/home/dee/.pyenv/versions/3.12.5/envs/ersilia-312/lib/python3.12/site-packages/bentoml/__init__.py", line 27, in <module>
from bentoml.saved_bundle import load_from_dir, save_to_dir # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dee/.pyenv/versions/3.12.5/envs/ersilia-312/lib/python3.12/site-packages/bentoml/saved_bundle/__init__.py", line 15, in <module>
from bentoml.saved_bundle.bundler import save_to_dir
File "/home/dee/.pyenv/versions/3.12.5/envs/ersilia-312/lib/python3.12/site-packages/bentoml/saved_bundle/bundler.py", line 31, in <module>
from bentoml.saved_bundle.local_py_modules import (
File "/home/dee/.pyenv/versions/3.12.5/envs/ersilia-312/lib/python3.12/site-packages/bentoml/saved_bundle/local_py_modules.py", line 27, in <module>
from bentoml.saved_bundle.pip_pkg import get_all_pip_installed_modules
File "/home/dee/.pyenv/versions/3.12.5/envs/ersilia-312/lib/python3.12/site-packages/bentoml/saved_bundle/pip_pkg.py", line 23, in <module>
from pkg_resources import Requirement
ModuleNotFoundError: No module named 'pkg_resources' Edit: This was in a fresh ersilia environment created using Python 3.12, and then running: |
Okay, I believe we have run into this before. However, this only fixed ersilia code using the |
Downgrading the priority here for two reasons:
|
Another update: We will continue to use our BentoML fork for packaging models, however, we will utilise Ersilia Pack for as many old models, and all new models. This is necessary because Ersilia Pack utilises FastAPI which only supports Python 3.8 and above. We will refactor most models to use an upgraded Python version especially if they use Python 3.7 or below. However, for those models that cannot be upgraded, and are still important for us to keep in the hub, we will continue to utilise BentoML. This scenario merits adding to the code, a conditional check that checks if the user is running ersilia in a Python 3.12 (or above) environment - in this case, if the user is fetching a model from source, ie GitHub, local path, or S3, we will force packing this model using Ersilia Pack. |
Describe the bug.
Recently got this error when fetching
eos3b5e
from a github onpython 3.12
conda env and got this error:Describe the steps to reproduce the behavior
No response
Operating environment
Ubuntu
The text was updated successfully, but these errors were encountered: