This message was deleted.
# ask-for-help
s
This message was deleted.
🏁 1
j
How do you save the model? @yadwinder kaur
m
We need to make sure the custom object pass when saving the model in the
train.ipynb
notebook. Also, check the for spellings if there is any difference.
🍺 3
y
This is how saved the model: import bentoml bentoml.xgboost.save_model("credit_risk_model", model)
m
We need to pass the
DictVectorizer
in the custom objects parameter. The model needs it to transform incoming data. Here's how we should do:
Copy code
import bentoml

bentoml.xgboost.save_model("credit_risk_model", model, custom_objects={"dictVectorizer": dv})
Also, we need to ensure that dictVectorizer spellings are same in
service.py
as well.
🧡 2
y
Thanks a ton! this worked finally 🙂
🙂 1