3 ms·
For Rust and ML, are the tooling libraries available to any quantity in Rust that are present in Python? I was under the impression Python has such an advance r
by czbond 4y ago
For Rust and ML, are the tooling libraries available to any quantity in Rust that are present in Python? I was under the impression Python has such an advance runaway any other languages will be hard to catchup (eg: Go has been trying, R <ugh>, etc)
- microtonal 4y agoThere are obviously fewer ML libraries than for Python (sometimes worse quality, sometimes better), but if you are willing to invest time, it's definitely doable. E.g. I made a multi-task transformer-based syntax annotator in Rust using the tch Torch binding: https://github.com/tensordot/syntaxdot https://github.com/tensordot/syntaxdot In my current job I do NLP with Python, Cython, and some C++. I don't think implementing ML stuff in Rust was much more work. Once you are beyond the stage of implementing a small research project or toy model, most systems are going to contain a lot of custom, specialized code. You will have to do that work in any language.
- czbond 4y agoThank you for the informed response - really helpful
- qchris 4y agoThe most comprehensive current view of the Rust machine learning ecosystem at the moment is probably at https://www.arewelearningyet.com/ https://www.arewelearningyet.com/ (I sometimes help maintain this site) Rust has a weird mix at the moment, and not one that's likely to significantly change within the next 12 months, at least. Certain tools are genuinely best-in-class, especially around simple operations on insane amounts of data. Rust kills it in that space due to its native speed and focus on concurrency. There's also growing projects like Linfa [1]. that while not at the level of scikit-learn, have significantly increased their coverage on common data science/classical ML problems in the past couple years, along with improved tooling. The space does have a few pure-Rust projects coming down the pipeline around autodifferentiation, GPU compute, etc. that are likely to yield some really valuable results in deep learning, but that aren't quite available and will take some time to pick up some traction even once they're released. At the same time, areas like data visualization are unlikely to reach parity with something like matplotlib/pyplot in the near future. Python is the de-facto standard, and will be for some time, but Rust's ability to build accessible high-level APIs on top of performant, language-native libraries is attracting some attention and I wouldn't be surprised to start seeing ingress in the certain areas over the next few years, where instead of the Python/C++ combination, it's just Rust all the way down. [1] https://github.com/rust-ml/linfa https://github.com/rust-ml/linfa
- disgruntledphd2 4y ago> R <ugh> You may not like R (and I do totally understand that), but it's probably ahead of Python in specialised statistical (i.e. non unstructured ML) tools and packages. Python is definitely better if you want to interact with a GPU and/or do "modern ML" (i.e. neural nets).
- czbond 4y agoThe ugh was a personal comment. I learned programming OO style (C++) and can go as far as scripted - but R seems like a Math professor went on an acid trip and made a language.
- disgruntledphd2 4y agoYeah, I get it. I learned R first, so I was really irritated by all the OO/mutable state stuff in Python when I learned it. I guess it's what you learn first that shapes your mind the most.