4 ms·
Why use Django when Flask is so much simpler and has less overhead? For just a REST ML model endpoint, Flask does everything you need, and no more. It's a perf
by VHRanger 6y ago
Why use Django when Flask is so much simpler and has less overhead?
For just a REST ML model endpoint, Flask does everything you need, and no more. It's a perfect fit.
- anaganisk 6y agoMay be Op wanted to take the advantage of batteries included features like, admin panel, templates etc. Or is just very comfortable with django. If we are talking speed and simplicity then I would father go with Fast Api rather than flask.
- wdroz 6y agoI agree, for simple things, FastAPI is really nice to work with. I'm currently rewriting some Flask/Sanic projects with FastAPI to make it easier to maintain.
- pplonski86 6y agoYou are right! I like Django admin panel, without coding you get UI and I'm comfortable with Django + DRF. In Flask you need to add many things to make it usable. If you check the code of the tutorial you will see that it differs from the most of the ML-to-REST-API tutorials. It's not only setting the endpoint. You can have many algorithms with many versions and stages (testing, production). There is A/B testing example. Of course you can do all in Flask but I prefer Django because many things are there already.
- deleted 6y ago[deleted]
- mabcat 6y agoIn our case we've already got all the stuff for serving web pages out of Django... the data model, DRF, auto scaling, access control, CI/CD. If I can use the same infrastructure to serve predictions, without having to duplicate anything or learn new frameworks, that's a huge win. Dealing with CPU overhead is easier than dealing with brain overhead.