This message was deleted.
# ask-for-help
s
This message was deleted.
🏁 1
🍱 1
j
Could you share more details? For eg, How did you know it doesn't work? cc @Aaron Pham
a
Can you share with us the logs?
b
How do I know it doesn't work: First I run bentoml serve service.py:svc in a terminal, go to localhost:3000 and play with bentoml on browser. Then I do some edit to service.py, save it. Then I run bentoml serve service.py:svc --reload in another terminal. This should stop bentoml running in the previous terminal and start the new command in new terminal. But it gives me error
Copy code
2022-10-20T12:56:45+0200 [INFO] [cli] Prometheus metrics for HTTP BentoServer from "service.py:svc" can be accessed at <http://localhost:3000/metrics>.
2022-10-20T12:56:46+0200 [ERROR] [cli] Could not bind 0.0.0.0:3000
@Aaron Pham How do I share the logs? What does it mean? newbie here.
j
The error message is clear here. There is another process binding on 3000. Kill that process or start bentoml on another port would work
b
That another process is: bentoml that I have run on the first terminal. Idea of --reload is, as I have understood from the video, it automatically updates the service.py, stops the bento that is running with previous version of service.py and runs the new service.py. I can also do ctrl+C on the first terminal and then run. Just that --relaod as shown in the video doesn't work.
j
ah ic what you mean.
--reload doesn't work like that.
It's not a handle command to reload a running server. It is an option added to server starting. When you run
bentoml serve --reload .
, it will start a server, and watch the changes on the file system and the model store. Once changes detected, it will reload itself automatically, so you don't need to restart it manually
b
I see. Thanks a lot for the explanation.
🍻 1
j
cc @Aaron Pham Shall we rename this option or modify the doc string?