This message was deleted.
# ask-for-help
s
This message was deleted.
l
Hi Taeef, could you just use
custom_objects
? After saved your model, you can do the following in `service.py`:
Copy code
import bentoml
bento_model = bentoml.models.get("iris_clf:latest")
mapping = bento_model.custom_objects["mapping"]
runner = bento_model.to_runner()

# then use runner and mapping functions
t
Hi @larme (shenyang) thanks for your response. Yes I think this is what I need to do. However, if I save my mapping or any other variable in
main.py
can I import it in my
save_model.py
?
l
It should be loaded because custom_objects are saved as pickle
👍 1