Skip to content
Permalink
Browse files

use pip_dependencies instead of conda_pip for examples (#240)

* use pip_dependencies instead of conda_pip for examples
  • Loading branch information...
yubozhao committed Jul 31, 2019
1 parent 9829607 commit f5770880e06a2f51c51e987039bdec8b232f5778
@@ -72,7 +72,7 @@
"# figure out the dependency chain and package all those python modules\n",
"\n",
"@artifacts([PickleArtifact('model')])\n",
"@env(conda_pip_dependencies=[\"scikit-learn\"])\n",
"@env(pip_dependencies=[\"scikit-learn\"])\n",
"class IrisClassifier(BentoService):\n",
"\n",
" @api(DataframeHandler)\n",
@@ -202,7 +202,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.7.2"
}
},
"nbformat": 4,
@@ -163,7 +163,7 @@
"from bentoml.artifact import FastaiModelArtifact\n",
"from bentoml.handlers import FastaiImageHandler\n",
"\n",
"@env(conda_pip_dependencies=['fastai'])\n",
"@env(pip_dependencies=['fastai'])\n",
"@artifacts([FastaiModelArtifact('pet_classifer')])\n",
"class PetClassification(BentoService):\n",
" \n",
@@ -143,7 +143,7 @@
"from bentoml.handlers import DataframeHandler\n",
"\n",
"@bentoml.artifacts([PickleArtifact('sentiment_lr')])\n",
"@bentoml.env(conda_dependencies=[\"scikit-learn\", \"pandas\"])\n",
"@bentoml.env(pip_dependencies=[\"scikit-learn\", \"pandas\"])\n",
"class SentimentLRModel(bentoml.BentoService):\n",
" \n",
" @bentoml.api(DataframeHandler, typ='series')\n",
@@ -121,7 +121,7 @@
"from bentoml.handlers import DataframeHandler\n",
"\n",
"@bentoml.artifacts([H2oModelArtifact('model')])\n",
"@bentoml.env(conda_pip_dependencies=['h2o'])\n",
"@bentoml.env(pip_dependencies=['h2o'])\n",
"class H2oModelService(bentoml.BentoService):\n",
"\n",
" @bentoml.api(DataframeHandler)\n",
@@ -351,7 +351,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.2"
}
},
"nbformat": 4,
@@ -376,7 +376,7 @@
"class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',\n",
" 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']\n",
"\n",
"@env(conda_pip_dependencies=['tensorflow==1.13.1', 'Pillow', 'numpy'])\n",
"@env(pip_dependencies=['tensorflow==1.13.1', 'Pillow', 'numpy'])\n",
"@artifacts([KerasModelArtifact('classifier')])\n",
"class KerasFashionMnistService(BentoService):\n",
" \n",
@@ -554,7 +554,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.2"
}
},
"nbformat": 4,
@@ -8,7 +8,7 @@
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']

@env(conda_pip_dependencies=['tensorflow==1.13.1', 'Pillow', 'numpy'])
@env(pip_dependencies=['tensorflow==1.13.1', 'Pillow', 'numpy'])
@artifacts([KerasModelArtifact('classifier')])
class KerasFashionMnistService(BentoService):

@@ -74,7 +74,7 @@
"# figure out the dependency chain and package all those python modules\n",
"\n",
"@artifacts([PickleArtifact('model')])\n",
"@env(conda_pip_dependencies=[\"scikit-learn\"])\n",
"@env(pip_dependencies=[\"scikit-learn\"])\n",
"class IrisClassifier(BentoService):\n",
"\n",
" @api(DataframeHandler)\n",
@@ -545,7 +545,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.2"
}
},
"nbformat": 4,
@@ -6,7 +6,7 @@
# figure out the dependency chain and package all those python modules

@artifacts([PickleArtifact('model')])
@env(conda_pip_dependencies=["scikit-learn"])
@env(pip_dependencies=["scikit-learn"])
class IrisClassifier(BentoService):

@api(DataframeHandler)
@@ -4,7 +4,7 @@
from bentoml.handlers import DataframeHandler

@bentoml.artifacts([PickleArtifact('sentiment_lr')])
@bentoml.env(conda_dependencies=["scikit-learn", "pandas"])
@bentoml.env(pip_dependencies=["scikit-learn", "pandas"])
class SentimentLRModel(bentoml.BentoService):

@bentoml.api(DataframeHandler, typ='series')
@@ -147,7 +147,7 @@
"from bentoml.handlers import DataframeHandler\n",
"\n",
"@bentoml.artifacts([PickleArtifact('sentiment_lr')])\n",
"@bentoml.env(conda_dependencies=[\"scikit-learn\", \"pandas\"])\n",
"@bentoml.env(pip_dependencies=[\"scikit-learn\", \"pandas\"])\n",
"class SentimentLRModel(bentoml.BentoService):\n",
"\n",
" @bentoml.api(DataframeHandler, typ='series')\n",
@@ -400,7 +400,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.2"
}
},
"nbformat": 4,
@@ -143,7 +143,7 @@
"from bentoml.handlers import DataframeHandler\n",
"\n",
"@bentoml.artifacts([XgboostModelArtifact('model')])\n",
"@bentoml.env(conda_dependencies=['xgboost'])\n",
"@bentoml.env(pip_dependencies=['xgboost'])\n",
"class TitanicModel(bentoml.BentoService):\n",
" \n",
" @bentoml.api(DataframeHandler)\n",
@@ -263,7 +263,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.2"
}
},
"nbformat": 4,
@@ -5,7 +5,7 @@
from bentoml.handlers import DataframeHandler

@bentoml.artifacts([XgboostModelArtifact('model')])
@bentoml.env(conda_dependencies=['xgboost'])
@bentoml.env(pip_dependencies=['xgboost'])
class TitanicModel(bentoml.BentoService):

@bentoml.api(DataframeHandler)

0 comments on commit f577088

Please sign in to comment.
You can’t perform that action at this time.