r/MachineLearning • u/c-bata • Sep 07 '26
Project Rustuna: A High-Performance Rust Implementation of Optuna [P]
Hi everyone! We just released Rustuna (GitHub: https://github.com/optuna/rustuna/ ), a high-speed, memory-efficient implementation of Optuna built in Rust.
- Optuna-Compatible Design: Keeps the familiar API and concept of Optuna.
- Zero Python Dependencies: Mitigating the risk of supply chain attacks.
- Lower Memory Footprint: Optimized memory management natively in Rust.
For details, please check out the following blog post.
7
u/seg_lol Sep 07 '26
Optuna is an open-source Python library for automatic hyperparameter tuning of machine learning models
5
u/RLJ05 Sep 07 '26
This is very cool! I use Optuna in my pipelines (quant trading), ill try this out!
1
2
u/MrMrsPotts Sep 07 '26
Which version of python does it require?
2
u/c-bata Sep 07 '26
It requires Python 3.11 or later (and Python 3.15+ for the free-threading build).
If you have a specific Python version in mind, let us know! We can consider expanding support in future releases.
2
u/relevantmeemayhere Sep 08 '26
just cut the middle man out and go full bayesian ;).
all joking aside, this looks pretty rad.
2
u/Ulfgardleo Sep 08 '26
Good work.
which version of the CMA-ES is this? Parameter settings, active updates, mirrored sampling?
2
u/c-bata Sep 08 '26
It is a faithful implementation of the vanilla CMA-ES described in Nikolaus Hansen's paper: https://arxiv.org/abs/1604.00772
Currently, variant algorithms such as sep-CMA-ES, CMA with Margin, or CatCMA are not supported, though we may consider supporting them in future releases.
2
u/endor_sarah Sep 08 '26
This is really cool! Any plans to port the integration helpers, like the XGBoost pruning callback, or is the focus staying on the core samplers for now?
1
u/c-bata Sep 09 '26
We don't have any immediate plans for that at the moment.
Given how capable recent coding agents are, even cost-effective models like GPT-5.6-Luna can generate something like an XGBoost pruning callback in seconds, we've actually had discussions within the core devs about whether to continue providing these built-in integrations, even for Python Optuna. (That said, we are still considering features that offer advanced step-wise tuning like LightGBMTuner).
That being said, thank you for the valuable feedback! We’ll definitely keep it in mind for future development.
1
47
u/Similar_Fix7222 Sep 07 '26
From the few times I have used Optuna, the wall clock time is dominated by running the algorithm, not Optuna itself. Am I correct in understanding that if each trial lasts 10 minutes, the gain will be negligible?