This message was deleted.
# ask-for-help
s
This message was deleted.
👀 1
🏁 1
🍱 1
s
Hiya! How are you calling the model?
h
Copy code
f=open('extra.pkl', 'rb')
model = pickle.load(f)
f.close()
# saved_model = bentoml.sklearn.save_model("extra", model)
# print(f"Model saved: {saved_model}")
extra= bentoml.sklearn.get('extra:latest').to_runner()
here is my code to load model from pickle.
s
And how are you calling the runner?
h
Copy code
result_extra = extra.predict.run([output])[0]
s
Is that inside an api function?
h
after loadmodel. here is my code to predict
yes. I do exactly the same as randomforest, it's ok
s
Are you calling the endpoint from an HTTP client?
h
yes. i got a bug in the predict step. The randomforest model is ok, so I wonder if bentoml can load the extratree model or not?
s
Hm, have you passed that runner into the service?
h
yes. I got bug in predict step. " result_extra = extra.predict.run([output])[0]"
s
Right; can you send me the line where you define your service?
h
s
In the line where you do
bentoml.Service
you need to pass
extra
along with
[rf,xgb,extra]
h
ohhh
i see
thanks very much
my bad
s
👍 no problem, that error should definitely be made more clear