preferred way of adding python package dependencies? #1408
Unanswered
vgeshiktor
asked this question in
General
Replies: 1 comment
-
Hi @vgeshiktor - the recommended way is letting BentoML automatically discover required python packages with the @env(infer_pip_packages=True)
@artifacts([SklearnModelArtifact('my_model')])
class MyPredictionService(BentoService):
@api(input=DataframeInput(orient="records"), batch=True)
def predict(self, df: pd.DataFrame):
model_input = preprocess(df)
return self.artifacts.my_model.predict(model_input) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
what is preferred way of adding dependencies to BentoML, mostly additional python packages?
Beta Was this translation helpful? Give feedback.
All reactions