This message was deleted.
# ask-for-help
s
This message was deleted.
a
Hi there, you shouldn’t include save_model in the same file as our service definition
j
i see. because currently, we have a cloudrun instance that runs this bentoml service script
a
we import the service twice to ensure python paths are correctly setup. Though this is probably not a desired behaviour.
j
makes sense. our docker basically just calls that script with bentoml serve. so should i just create a script that saves the model then bentoml serve?
Copy code
python save_onnx.py my_model.onnx;bentoml serve ...
a
yes. Saving model and running service should never be in the same file.