Comments (9)
@rajeshmore1 Could you please share the logs and if possible, the handler you are using?
Also, you said you are using without GPU, any specific reason to use the pytorch/torchserve:latest-gpu
image?
from serve.
If you are running on intel cpu, please refer to this link to improve performance
https://github.com/pytorch/serve/tree/master/examples/intel_extension_for_pytorch
from serve.
We used pytorch/torchserve:latest-gpu this base image because if we want to go for gpu in future, we don't need to update this. Is this base image causing a problem for getting good throughput (without gpu)? Please guide.
from serve.
@rajeshmore1 No, that should be fine. Can you please check the ipex example that I shared.
from serve.
The error happens here https://github.com/pytorch/serve/blob/master/ts/service.py#L161
I notice that you have many try/except statements . If a batch of 4 is being processed, the result must have 4 elements. Please make sure you are handling this
To benchmark torchserve and see the effect of num_workers , you can use this example to benchmark with different batch_sizes. concurrent requests, workers
https://github.com/pytorch/serve/tree/master/examples/benchmarking/resnet50
from serve.
What I understood is I need to update the handler script that will process the multiple requests let's say 4? Could you please provide sample scrip for that? Do I need to update the inference function? Could you please elaborate this solution?
Also I will try to implement the ipex example that you have provided and let you know.
from serve.
@rajeshmore1 You can refer to this https://github.com/pytorch/serve/blob/master/examples/image_classifier/near_real_time_video/near_real_time_video_handler.py
Basically, you need to make sure that if n
requests are being batched, the output has a list of n
elements
If this is not happening, problem is usually in the pre-process or post-process function. You can print the number of elements or use a debugger.
You can also follow this example to debug your handler with a debugger
from serve.
Thank you. We are working on it.
from serve.
please re-open if you need more assistance
from serve.
Related Issues (20)
- Nightly cpu benchmark failed HOT 1
- Nightly cpu benchmark failed HOT 1
- Docker Regression on ubuntu-20.04 failed HOT 1
- Docker Regression on Array failed HOT 1
- Docker Regression on ubuntu-20.04 failed HOT 1
- Docker Regression on Array failed HOT 1
- Service build successfully with Docker, but not run on GPU HOT 1
- Difference between `Custom handler with module level entry point` and `Custom handler with class level entry point` HOT 2
- Setting log level of handler HOT 2
- How can I implement batch inference in my model? HOT 5
- Low GPU utilization due to CPU-bound preprocessing HOT 2
- How torchserve uses grpc in java HOT 2
- Can i use multiple workers in single GPU? HOT 4
- How to use torchserve metrics HOT 1
- Create CPP release artifacts
- Add script to recreate unit test artifacts
- Add caching support for PT2 compile HOT 1
- Polling Mode HOT 2
- Accept image data in MNIST cpp example instead of .pt file HOT 1
- How would you deploy a new model on a torch server running within a container? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serve.