Comments (5)
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.
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.
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.
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.
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)
- Instance Segmentation Example Broken HOT 3
- Issue with `ImageClassificationData.from_dataset` HOT 1
- Remove or replace the active learning loop example
- `SemanticSegmentationData` - zero-size array to reduction operation maximum which has no identity HOT 1
- Support for files stored on Google drives.
- Support generation kwargs within Seq2SeqTasks
- Error when importing flash.video in v0.8.1 HOT 2
- `ObjectDetectionData.from_coco`: `transform_kwargs` and `image_size error` HOT 2
- Getting error while using backbones and head code HOT 1
- Object detection example broken HOT 6
- `ObjectDetectionData.from_images` raise an error
- ImportError: cannot import name 'Labels' from 'flash.core.classification' HOT 1
- ModuleNotFoundError with lightning-flash[image] and ImageEmbedder HOT 8
- apply_func has been moved, need to update import HOT 5
- Protobuf requirements too strict HOT 5
- `ImageClassificationDataFrameInput` object has no attribute `target_formatter` HOT 1
- Flash Trainer not working - No module named 'pytorch_lightning.utilities.apply_func' HOT 1
- `download_data` from `flash.core.data.utils` connects to the internet before checking if a file exists HOT 1
- No module named 'pytorch_lightning.utilities.apply_func' HOT 4
- SemanticSegmentation has no available heads or backbones in FlashRegistry
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 lightning-flash.