Live data from Hacker News

Candle: Torch Replacement in Rust

github.com

11–20 of 192 posts

Re: Candle: Torch Replacement in Rust

#11

Earlier quoted context omitted.

> I've been wondering what might move data scientists to Rust. I think dynamic typing is the missing piece. Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. Ease of experimentation and flexibility are key for this use case.

> Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. This surprises me. Hasn't everyone working with data (even at an "enthusiast" level) had to understand data types in the context of databases?

You underestimate the gusto of data engineers/scientists to just assume types.

Re: Candle: Torch Replacement in Rust

#12

Earlier quoted context omitted.

> I've been wondering what might move data scientists to Rust. I think dynamic typing is the missing piece. Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. Ease of experimentation and flexibility are key for this use case.

> Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. This surprises me. Hasn't everyone working with data (even at an "enthusiast" level) had to understand data types in the context of databases?

Yes, but Rust’s type system is waaaaay more sophisticated than your typical SQL database. Talk about “generic associated types” and you can see people start to shrink back in fear.

Plus, a surprisingly enormous fraction of the NoSQL hysteria was that “you don’t even need a schema!”

Re: Candle: Torch Replacement in Rust

#13

Earlier quoted context omitted.

> I've been wondering what might move data scientists to Rust. I think dynamic typing is the missing piece. Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. Ease of experimentation and flexibility are key for this use case.

> Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. This surprises me. Hasn't everyone working with data (even at an "enthusiast" level) had to understand data types in the context of databases?

There's a bit of general dev snobbery to assume that data scientists can't code, or don't want to learn to code, or are able to understand so many other things but not a compiled language or a static type system.

Re: Candle: Torch Replacement in Rust

#14
I am so happy about them releasing this. A few years ago I wrote a multi-task syntax annotator in Rust using Laurent Mazare's excellent Torch binding (tch-rs, it looks like he is also working on Candle):

https://github.com/tensordot/syntaxdot

However, the deployment story was always quite difficult. The PyTorch C++ API is not stable, so a particular version of tch-rs will only work with a particular PyTorch version. So, anyone wanting to use SyntaxDot always had to get exactly the right version of libtorch (and set some environment variables) to build the project.

The idea of making an abstraction over Torch and Rust ndarray (similar to Burn) crossed my mind several times, but there is only so much that I could do as a solo developer. So Candle would be a god-given if I was still working on this project.

Seeing Candle wants to make me port curated-transformers to Candle for fun:

https://github.com/explosion/curated-transformers

Re: Candle: Torch Replacement in Rust

#15
post #2

Oh man. I feel like this is a really big deal. I've been wondering what might move data scientists to Rust. Outside working through rustlings and trying new projects in Rust, I wonder if having this available will be it.

[deleted]

Re: Candle: Torch Replacement in Rust

#16
post #8
post #6

Earlier quoted context omitted.

id imagine repl, junpyter notebooks are pretty useful and not doable in rust atm

Rust in Jupyter Notebooks: https://users.rust-lang.org/t/getting-started-with-rust-jupy... REPLit for Rust: https://replit.com/languages/rust For general REPL and rust appears there are a few options. I don't think getting rid of Python completely will happen. But current approaches _typically_ looks something like: - Jupyter Notebook for custom parts of EDA - Jupyter Notebook for testing new libraries or learning ne…

hmm ill look later, i thought they needed some compiler work done and miri to do it

Re: Candle: Torch Replacement in Rust

#17
post #5
post #2

Oh man. I feel like this is a really big deal. I've been wondering what might move data scientists to Rust. Outside working through rustlings and trying new projects in Rust, I wonder if having this available will be it.

"I've been wondering what might move data scientists to Rust" I mean, writ large, the answer is "The availability of the ecosystem they need to use daily in Rust, without having to rewrite it themselves." That is more than just a torch replacement, so this won't do it for data scientists, even if Python is ... painful in a lot of ways to productionize or even use. Maybe it'll get some started on that ecosystem, thoug…

More than the ecosystem, it’s the speed and flexibility in prototyping python offers. I do not see rust becoming a replacement for that.

The uncomfortable fact is that you really don’t need thread safety or static typing to prototype and build models effectively.

Re: Candle: Torch Replacement in Rust

#18

Earlier quoted context omitted.

> I've been wondering what might move data scientists to Rust. I think dynamic typing is the missing piece. Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. Ease of experimentation and flexibility are key for this use case.

> Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. This surprises me. Hasn't everyone working with data (even at an "enthusiast" level) had to understand data types in the context of databases?

A lot of science/engineering/ML/data analysis happens from hacking around with only a vague idea of what to expect. Appeasing a type checker simultaneously is an enormous blow to productivity. Obviously possible, but challenging to get into a flow state when you cannot quickly iterate on ideas.

Re: Candle: Torch Replacement in Rust

#19
post #2

Oh man. I feel like this is a really big deal. I've been wondering what might move data scientists to Rust. Outside working through rustlings and trying new projects in Rust, I wonder if having this available will be it.

> I've been wondering what might move data scientists to Rust. I think dynamic typing is the missing piece. Rust's safety guarantees are great and I like the language, but the type system is a barrier for learners, especially people who aren't full-time devs. Ease of experimentation and flexibility are key for this use case.

It is not a barrier for learners. It is a barrier for people that just want to hack something together that works for one particular use-case.

Python is not popular because it is "easy" (far from it if you have to maintain it). But because it is easy to create executable code that does what you want, without having to have a background in coding.

Post reply on HN