How to debug a bentoml app like fastapi flavor? #4621
Answered
by
decadance-dance
decadance-dance
asked this question in
Q&A
|
To debug the fast api application we just need to set breakpoints somewhere in code and run app using uvicorn sdk: import uvicorn
from some_module import fastapi_app
if __name__ == "__main__":
uvicorn.run(fastapi_app, host="0.0.0.0", port=3001)How I can achieve the same flow using the bentoml? |
Answered by
decadance-dance
Mar 29, 2024
Replies: 3 comments
|
I think I answered it. |
0 replies
Answer selected by
decadance-dance
|
Is there any workaround to use with new Thanks in advance. |
0 replies
|
This way: import uvicorn
from bentoml._internal.service.loader import load
if __name__ == "__main__":
svc = load(bento_identifier='my-bento:latest')
uvicorn.run(svc.to_asgi(), host="0.0.0.0", port=3001)The |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think I answered it.
There is a way to do: