This message was deleted.
# ask-for-help
s
This message was deleted.
c
Could you share your code for saving the model?
Btw you can also put your python code in a Runnable and use it with the service
p
i am using the example code provided in the docs:
Copy code
def my_python_model(input_list: List[int]) -> List[int]:
    return np.square(np.array(input_list))

# `save_model` saves a given python object or function
saved_model = bentoml.picklable_model.save_model(
    'themodel',
    my_python_model,
    signatures={"__call__": {"batchable": True}}
)
print(f"Model saved: {saved_model}")
ok seems to happen when i save the model and load it using different versions of python. i was initially saving it in python3.7, bentoml version 1.0.21 and was trying to serve it in python3.10, bentoml version 1.0.15. when i changed to python3.10 the issue seems to hve resolved itself.
👍 1