Hey!!! I am building a api using bentoml for prod...
# ask-for-help
r
Hey!!! I am building a api using bentoml for production but in docs there is only cli running option. is there any way and code snippets that we can run using code itself. it will help while debugging the codes. Thanks in Advance
Copy code
import bentoml
from dextor.src.api_service import Summarization

if __name__ == "__main__":
    bentoml.serve(Summarization)
j
you can look into the source code of what is under
bentoml serve
, however, why would you want that? you could do debugging with running with CLI
r
can you send me any references for that
r
And also , if there will be any refernce to debug the code in pycharm or any other editor, in running cli would be great
j
just put
breakpoint()
in your code where you want to intercept the execution.
r
Which parameter i have to pass while running for breakpoints. because it is working for reload but not in breakpoints. I am using pycharm professional