Giter Club home page Giter Club logo

Comments (5)

t-vi avatar t-vi commented on August 18, 2024 2

Well there are various ways of creating RESTful service, say FastAPI, Flask, Django, Node.js, what not. But If we use Torchserve we don't have to worry about multi-processing over CPU, GPU, supporting all OSes, scaling to say Kubernetes, etc.

When I looked around in the context of ch 15 of our book, it seemed that the key questions with using Python (I used sanic over flask because it seemed like simple to use but async) were 1) is it safe (when it calls into extensions, e.g. for image processing)? 2) can you avoid copying as much as possible. Note that TorchScript pretty much solves the "GIL topic" for the model parts.
For the " multi-processing over CPU, GPU, supporting all OSes, scaling" bits, it might be even more natural to look at lightning over TorchServe for us here, so it might be good to have a comparison what is missing that lightning cannot provide here. Personally, I am not a huge fan of installing Java in more places than I have to.

from lightning-flash.

oke-aditya avatar oke-aditya commented on August 18, 2024 1

True that it would be possible with Python and there are ways to overcome with GIL.
But there are to of issues that could occur while we implement. Working with scripted models, metrics management, logging. Supporting more than 1 model serving parallel, distributing models over CPU Cores.

Installing Java is not needed for users !

All they would need to do is

curl server_ip/endpoint -T some_image.jpg

or send a POST Request.

Torchserve is very very well maintained and engineered. There was really a long discussion in PyTorch about this. Refer here

Let me know more thoughts. Maybe I should elaborate on idea ?

from lightning-flash.

aniketmaurya avatar aniketmaurya commented on August 18, 2024

Reposting my comment from slack:

Thanks for posting this @oke-aditya
As you mentioned Torchserve is a great tool for people who would like to productionize their model or even for a simple demo.
I am not sure about Flash Serving but a general PL Serving may help a wider audience I guess.

PS. It is a much-needed tool and I would love to contribute to this.

from lightning-flash.

aniketmaurya avatar aniketmaurya commented on August 18, 2024

Torchserve is very very well maintained and engineered. There was really a long discussion in PyTorch about this. Refer here

Torchserve allows serving by versioning the models and also provides both gRPC and REST API support.
It is well maintained and expected to be maintained in future too. We can follow the main core value of Lightning One less thing to remember and provide users with an API which they can use without any effort.

from lightning-flash.

stale avatar stale commented on August 18, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from lightning-flash.

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.