Open DequanZhu opened 1 year ago
My triton client is 2.26.0 version
@DequanZhu Hi, have you solved this issue? I also meet this issue, and I can't even successfully call it once...
@nnshah1 any progress of this issue?
After further investigation, this is because the triton_client
is not in the same event_loop of flask app. Make sure both triton aio client and flask app are in the same async session can fix this issue, for example init the DemoModelClient
in the startup event of flask app.
I have a flask app, app need to post a infer request to triton-server during flask request. I use the tritonclient.http.aio to create my client and to avoid creating the client repeatedly for each request, I have created a reusable client in the initialization function like below.
the app will produce "Timeout context manager should be used inside a task" error: if created triton client every time calling the infer function like below,no errors occured:
I don't want to create a client for each request because I'm concerned that it may have potential performance implications for the program.Anyone can tell me why reusing the client did't work