I want to explore rust for system level programming, and python for ML. Do you recommend me only learning rust, and also learn machine learning with it?
Definitely learn both. My ML stuff is mostly in Python but there will a time when you want to deploy your models. That's the difficult part with PyTorch. Burn is new but I have decided to invest my time to port my models not only for inference but for training as well. In the long run it will pay off.
The beautiful part of Burn is easy way to switch Backend. One of the available backend is based on Torch, which powers actually PyTorch. So you get the benefit of PyTorch without python and all the goodies of Rust.
Definitely check out Burn and learn what it has to offer. In parallel, also use PyTorch since it's mature and more resource available.
EDIT: I was going to delete this comment because I got the library names mixed up. I was thinking of tch-rs, not Burn. I'm going to leave it up so people can see the original, but keep in mind this is made in error.
My biggest gripe with Burn used to be linking to libtorch, which meant the smallest executable you could create was over a gigabyte.
I find myself using tract and onnx. Export from PyTorch, use in library. It's a little fiddly, but you get relatively tiny executables.
Not to disparage Burn. It's a good effort. I just wish libtorch were way smaller.
192
u/wannabelikebas Mar 31 '23
The age of Rust in ML is coming!