Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve multiple models with both CPU and GPU #3078

Open
hungtrieu07 opened this issue Apr 10, 2024 · 3 comments
Open

Serve multiple models with both CPU and GPU #3078

hungtrieu07 opened this issue Apr 10, 2024 · 3 comments
Labels
question Further information is requested triaged Issue has been reviewed and triaged

Comments

@hungtrieu07
Copy link

Hi guys, I have a question: Can I serve several models (about 5 - 6 models) using both CPU and GPU inference?

@agunapal
Copy link
Collaborator

Hi @hungtrieu07 Yes, TorchServe supports multi model endpoints

You can refer to this
https://github.com/pytorch/serve/pull/3040/files#diff-b70d3a47c15879d308451b54821682f1d63518db732881b434c4110d9ca7a767R44

@agunapal agunapal added triaged Issue has been reviewed and triaged question Further information is requested labels Apr 10, 2024
@hungtrieu07
Copy link
Author

Hi @hungtrieu07 Yes, TorchServe supports multi model endpoints

You can refer to this https://github.com/pytorch/serve/pull/3040/files#diff-b70d3a47c15879d308451b54821682f1d63518db732881b434c4110d9ca7a767R44

Hi @agunapal, I'm coding an python app using PyQT5, like an surveilance camera app. My pipeline look like this:
The program reads frames from RTSP link or video file ---> send frame to Inference API using requests python lib ---> get results from Torchserve API responses ---> process the response results (draw bounding box on frame) ---> convert processed frame from numpy array to QPixMap to display on app.

In each camera, I have 2 queues: 1 for stores the original frames, 1 for stores the processed frames. But it too slow, take about 4-5 seconds for 1 frame processed. What strategy I can use in this situation?

@agunapal
Copy link
Collaborator

Hi @hungtrieu07 I would start off with couple of things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triaged Issue has been reviewed and triaged
Projects
None yet
Development

No branches or pull requests

2 participants