Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decision to move to Python -- Why? #1226

Open
zerothi opened this issue Jul 1, 2020 · 3 comments
Open

Decision to move to Python -- Why? #1226

zerothi opened this issue Jul 1, 2020 · 3 comments

Comments

@zerothi
Copy link

zerothi commented Jul 1, 2020

Dear torch dev's

I have tried searching around for figuring out why you discontinued the Lua interface and moved to Python.

In particular this has my interest since we also have a Lua interface, but are struggling a bit with end-users adapting it.

So any thoughts on your switch that might be useful for the community who are in the (maybe?) same position as you were would be extremely helpful.
Arguments, pros-cons, why Python, etc.. ;)

Hope you'll take the time to answer!

Thanks!

@4mig4
Copy link

4mig4 commented Dec 1, 2020

Python is much slower so I also do not understand the impetus here.

@yash-fn
Copy link

yash-fn commented Sep 6, 2021

Could just be popularity of python for data science. Ultimately any successful product has to go where the customers are right? Could be learning lua just to use a framework is an overhead people don't want to do.

@tastyminerals
Copy link

tastyminerals commented Sep 10, 2021

PyTorch is written in C/C++ not Python, it is as fast as it can be. Python is used to call the C/C++ functions and it is just ffi overhead which for Python is a bit slower than for Lua. But at the end of the day it is about convenience and adoption. Python has tons of libraries it is much easier to integrate into the existing tech stack without writing tons of boilerplate. It is also widespread in academia. Lua although technically an awesome language is much more specialised and requires effort to learn.

Another thing, luajit which is actively used in Torch7 to interface with C is stuck with Lua 5.1 while the language progresses further. Lua 5.3 is not compatible with luajit anymore and never will. This means that you can only use Lua 5.1 with Torch. After luajit maintainer decided to do other things in life, the Lua world was split in halves: with luajit and 5.1 and without, with newer Lua but much slower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants