How to debug a bentoml app like fastapi flavor? #4621
-
|
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? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I think I answered it. |
Beta Was this translation helpful? Give feedback.
-
|
Is there any workaround to use with new Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
|
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 |
Beta Was this translation helpful? Give feedback.
I think I answered it.
There is a way to do: