Re:Ask HN: Why are a lot of AI projects written in Python?
by jstx1 on Friday October 28, 2022 @04:25AM
(#33368948)
> Once you're done with your model, you write it in C (or whatever) for production, but that's a more traditional software engineering project.
This doesn't always need to happen IRL, most large ML systems are running TensorFlow/PyTorch (a few run C++ without the Python layer).
The ideal setup for that is the interpreted shell/compiled core approach that languages like Python have championed forever. Competitors to Python would be the likes of R, Lua, Ruby, Perl, Javascript; not C, C++ or Rust.
Why Python in particular? The answer is that it has an excellent scientific stack with Numpy, Scipy and Pandas.
R is very competitive for statistical work.
Julia is an interesting, if unproven, alternative.
Once you're done with your model, you write it in C (or whatever) for production, but that's a more traditional software engineering project.
In academia, the incentives are such that most people don't really care about code. Their careers depend on them publishing papers, so that's where they're going to focus their efforts. Code is a way to prove a point for publication, not a product that needs to generate value.
> a lot of things are popularly rewritten in Rust or Zig
Beware of the HN bubble. Rust and especially Zig are tiny, fringe players in the industry, regardless of their technological merits.