项目详情
由
分享
HelloGitHub 评分
0 人评分
一个机器学习工具用来打包和发布模型
过去 7 天共收获 7 颗 Star ✨
使用方向键查看日期,Home 和 End 跳至首尾,Escape 关闭提示。| 日期 | Star | 较前日 |
|---|---|---|
| 周日 | 8,934 | — |
| 周一 | 8,935 | +1 |
| 周二 | 8,937 | +2 |
| 周三 | 8,941 | +4 |
| 周四 | 8,940 | -1 |
| 周五 | 8,940 | 0 |
| 周六 | 8,941 | +1 |
8.9k
星数
否
中文
Python
主语言
是
活跃
240
贡献者
279
Issues
是
组织
无
最新版本
1k
Forks
Apache-2.0
协议
一个机器学习工具用来打包和发布模型。帮助数据科学家用不到 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)
```
收录于:
第 38 期
评论
评分:
暂无精选评论