Giter VIP home page Giter VIP logo

Comments (4)

agunapal avatar agunapal commented on May 30, 2024

Here is how the handle method in the base handler does it, You can pass the data as a tuple to inference, and pass the tuple from inference to post_process

https://github.com/pytorch/serve/blob/master/ts/torch_handler/base_handler.py#L420-L424

from serve.

pengxin233 avatar pengxin233 commented on May 30, 2024

以下是基处理程序中的 handle 方法,您可以将数据作为元组传递给推理,并将元组从推理传递给post_process

https://github.com/pytorch/serve/blob/master/ts/torch_handler/base_handler.py#L420-L424

Here is how the handle method in the base handler does it, You can pass the data as a tuple to inference, and pass the tuple from inference to post_process

https://github.com/pytorch/serve/blob/master/ts/torch_handler/base_handler.py#L420-L424

In ordinary requests, this can indeed be delivered. But we use micro-batch operations, so aren’t pre-processing and post-processing multi-threaded? At this time, there seems to be a problem using this method of delivery. My handler has no problem when the batchSize is 1, but an error occurs when the batchSize is 10.

from serve.

agunapal avatar agunapal commented on May 30, 2024

cc @mreso

from serve.

pengxin233 avatar pengxin233 commented on May 30, 2024

cc @mreso

Thank you very much for your help. This method of passing parameters is also correct in micro-batch. The error was caused by my incorrect usage method and has been fixed.

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.