Rust backend interest? #1197
MilesCranmer
started this conversation in
General
Replies: 1 comment
-
|
i would like to contribute to this. a julia free version would be nice and more flexible. i can work on a PR for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We now have a fairly complete port of SymbolicRegression.jl in Rust: https://github.com/astroautomata/symbolic_regression.rs. I was thinking it could be nice to expose this to PySR. It is much less flexible due to being statically compiled rather than JIT like Julia, but it also means it should offer a faster startup time and smaller install size (we wouldn't need to ship all of Julia for example).
Perhaps a PySR backend could be an pip "extra" such as
pysr[rust]or maybe an API config option likePySRRegressor(backend="rust").Then again, I am not sure the appetite for this, because it would lose some of the key features that make PySR nice, like the high level of configurability like custom operators, custom losses, custom templates. But perhaps for "vanilla" symbolic regression it might be nice.
So far I've also been slightly more successful in building a fast native GPU backend in the Rust port, which could be interesting. But again, this would be nowhere near as flexible as if we got it working from Julia. So I'm not too sure.
Another aside: the Rust backend can compile to WebAssembly so you can literally run symbolic_regression.rs in the browser: https://astroautomata.com/symbolic_regression.rs/ (even works on your phone!).
Beta Was this translation helpful? Give feedback.
All reactions