Giter VIP home page Giter VIP logo

Comments (9)

agunapal avatar agunapal commented on May 31, 2024

@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.

agunapal avatar agunapal commented on May 31, 2024

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.

rajeshmore1 avatar rajeshmore1 commented on May 31, 2024

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.

agunapal avatar agunapal commented on May 31, 2024

@rajeshmore1 No, that should be fine. Can you please check the ipex example that I shared.

from serve.

agunapal avatar agunapal commented on May 31, 2024

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.

rajeshmore1 avatar rajeshmore1 commented on May 31, 2024

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.

agunapal avatar agunapal commented on May 31, 2024

@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

https://github.com/pytorch/serve/tree/master/examples/image_classifier/resnet_18#debug-torchserve-backend

from serve.

rajeshmore1 avatar rajeshmore1 commented on May 31, 2024

Thank you. We are working on it.

from serve.

agunapal avatar agunapal commented on May 31, 2024

please re-open if you need more assistance

from serve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.