Model save process:
log_model = LogisticRegression(max_iter=1000, random_state=1,C=100,penalty='l2',solver='lbfgs')
log_model.fit(x_train, y_train)
bentoml.sklearn.save_model('stroke_prediction', log_model,
custom_objects={
'dicVectorizer': dv
})
Gregory Morris
11/06/2022, 3:31 PM
Solution, add this to save file:
ignatures={
"predict_proba": {
"batchable": True,
"batch_dim": 0
}