Repository Details
Shared by


HelloGitHub Rating
0 ratings
Free•Apache-2.0
Claim
Discuss
Collect
Share
8k
Stars
No
Chinese
Python
Language
Yes
Active
231
Contributors
139
Issues
Yes
Organization
1.4.22
Latest
871
Forks
Apache-2.0
License
More
一个机器学习工具用来打包和发布模型。帮助数据科学家用不到 5 分钟把在 ipython notebook 里的模型发布到生产环境
```python
%%writefile iris_classifier.py
from bentoml import BentoService, api, env, artifacts
from bentoml.artifact import PickleArtifact
from bentoml.handlers import DataframeHandler
# You can also import your own python module here and BentoML will automatically
# figure out the dependency chain and package all those python modules
@artifacts([PickleArtifact('model')])
@env(conda_pip_dependencies=["scikit-learn"])
class IrisClassifier(BentoService):
@api(DataframeHandler)
def predict(self, df):
# arbitrary preprocessing or feature fetching code can be placed here
return self.artifacts.model.predict(df)
```
Included in:
Vol.38
Comments
Rating:
No comments yet