A Python package built by BentoML requires the bentoml Python package implicitly.
$ pip install my_packaged_model
Then:
>>> import my_packaged_model
ModuleNotFoundError: No module named 'bentoml'
Not only do I need to install BentoML, I need to install the precise version used to create the Python package, else the package fails to import because of apparent BentoML API changes.
import my_packaged_model should Just Work.
python:3.7@Kevlar1818 Thanks for reporting this issue! The BentoML package should indeed be added to the install_requires list with fixed version, will follow up with a PR soon.
The fix has just been merged to master https://github.com/bentoml/BentoML/pull/396 @kevlar1818 thanks again for reporting the issue.
We will do some more testing before making a release, in the meanwhile, feel free to try it out by installing BentoML from master branch: pip install git+https://github.com/bentoml/BentoML.git
Release 0.5.2 is out now including the fix. It should be able to use saved BentoService bundle as PyPI package with all the pip dependencies specified with the setup.py file.
Closing this issue now, feel free to reopen if you are still seeing this/related issues with it.