Example #1
0
 def set_dependencies(self, env: BentoServiceEnv):
     # Note that keras module is not required, user can use tf.keras as an
     # replacement for the keras module. Although tensorflow module is required to
     #  be used as the default Keras backend
     pip_deps = ['tensorflow']
     if self._keras_module_name == 'keras':
         pip_deps.append('keras')
     env.add_pip_packages(pip_deps)
Example #2
0
 def set_dependencies(self, env: BentoServiceEnv):
     logger.warning(
         "BentoML by default does not include spacy and torchvision package when "
         "using FastaiModelArtifact. To make sure BentoML bundle those packages if "
         "they are required for your model, either import those packages in "
         "BentoService definition file or manually add them via "
         "`@env(pip_packages=['torchvision'])` when defining a BentoService"
     )
     env.add_pip_packages(['torch', "fastai<2.0.0"])
Example #3
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(['coremltools>=4.0b2'])
Example #4
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(["fasttext"])
Example #5
0
 def set_dependencies(self, env: BentoServiceEnv):
     if self.backend == "onnxruntime":
         env.add_pip_packages(["onnxruntime"])
     elif self.backend == "onnxruntime-gpu":
         env.add_pip_packages(["onnxruntime-gpu"])
Example #6
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(['tensorflow'])
Example #7
0
 def set_dependencies(self, env: BentoServiceEnv):
     if env._infer_pip_packages:
         env.add_pip_packages(['xgboost'])
Example #8
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(['spacy'])
Example #9
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(['torch', "detectron2"])
Example #10
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(["easyocr>=1.3.0"])
Example #11
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(['h2o'])
     env.add_conda_dependencies(['openjdk'])
Example #12
0
 def set_dependencies(self, env: BentoServiceEnv):
     if env._infer_pip_packages:
         env.add_pip_packages(["mxnet"])
Example #13
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(["numpy"])
Example #14
0
 def set_dependencies(self, env: BentoServiceEnv):
     env.add_pip_packages(['pytorch-lightning'])
Example #15
0
 def set_dependencies(self, env: BentoServiceEnv):
     if self.backend == 'onnxruntime':
         env.add_pip_packages(['onnxruntime'])
Example #16
0
 def set_dependencies(self, env: BentoServiceEnv):
     if env._infer_pip_packages:
         env.add_pip_packages(['scikit-learn'])