This message was deleted.
# ask-for-help
s
This message was deleted.
a
hey, are you thinking about debugging the runnable?
p
yes. I want to be able to debug the full path of the request. from the server receiving a request to the runnable and to the response. just like a regular flask server. I can debug if I run the server
.init_local()
but I can’t make the full server working with a debugger.
a
I will discuss with the team to about this usecase
a
@Pavel Schudel What would be different between doing
.init_local()
and running a separate runner, in terms of debugging?
a
init_local
will load the model memory, whereas runner is distributed by default. What this means is when running in the serving environment, BentoML will provisioned resource and initialize model correctly within a distributed env (such as k8s)
a
@Aaron Pham I understand but why do we want to debug at distributed env, should we debug behavior's using in memory using
init_local
, if in-memory works, so would the distributed system right?
a
Usually, thats the
init_local
workflow, where you debug it locally. What Pavel is asking is that he wants to debug within the server
iirc theres a thread describing how you can attach svc.asgi_app into uvicorn server to run on vscode
Not sure if this is what you are looking for, https://bentoml.slack.com/archives/CKRANBHPH/p1687197287391039
a
I recommended that solution, I'm trying to understand, what is Pavel's use case here, does this solution of `uvicorn`and `asgi_app`work for his debugging needs?
p
sorry for the late response. well, the optimal scenario is the debug everything as close to production as possible. will the least amount of non production debugging code. the reason is when a bug happens in production, I need to simulate the request separately with .init_local(), and not debug it in the natural application ecosystem. (the service is called by another service). so every bug take a lot more time to debug then a regular flask server.