GPU-native evolutionary computation: evolve formulas (symbolic regression) and learning algorithms (AutoML-Zero) from zero.
Project description
evozero
Evolve formulas and learning algorithms from zero — GPU-native evolutionary computation.
evozero is a GPU-accelerated evolutionary-computation toolkit with three engines that
share one tensorized core:
SymbolicRegressor— Eureqa-style symbolic regression: discovers an interpretable equationy = f(X). Island-model GP + tensorized postfix interpreter + linear scaling + constant optimization, returning a full complexity-vs-accuracy Pareto front.LearnerSearch— AutoML-Zero: evolves the learning algorithm itself (Setup/Predict/Learnover a typed-register VM), meta-trained across tasks so the discovered learner generalizes to unseen problems.launch_dashboard— a dependency-free (stdlib) live web dashboard of the search.
import evozero never imports torch: export utilities (LaTeX, NumPy) work on machines
without a GPU. PyTorch is only imported when you actually run a search.
Install
pip install evozero # CPU (brings the CPU torch wheel)
pip install "evozero[cuda]" --index-url https://download.pytorch.org/whl/cu128 # NVIDIA GPU
uv sync --extra cuda # from a clone, for development
evozero does not pin a CUDA build of PyTorch — you choose the wheel that matches your
driver. See https://pytorch.org/get-started/.
Quickstart — symbolic regression
import numpy as np
from evozero import SymbolicRegressor
X = np.random.randn(500, 2)
y = X[:, 0] ** 2 + X[:, 0] * X[:, 1] + np.sin(X[:, 1])
model = SymbolicRegressor(population_size=3000, generations=200,
device="auto", random_state=0, verbose=1)
model.fit(X, y)
print(model.best_equation_) # x0*(x0 + x1) + sin(x1)
print(model.to_latex()) # x_{0} \left(x_{0} + x_{1}\right) + \sin{x_{1}}
f = model.to_numpy_func() # pure-NumPy callable, no torch needed
model.pareto_front_ # [{'complexity', 'loss', 'r2', 'equation'}, ...]
Quickstart — AutoML-Zero
from evozero import LearnerSearch, Task
tasks = [Task(Xi, yi) for Xi, yi in my_meta_training_data]
search = LearnerSearch(population_size=200, max_time=60, device="auto", random_state=0)
search.fit(tasks)
learner = search.export_learner() # a discovered EvolvedLearner
learner.fit(X_train, y_train)
preds = learner.predict(X_test)
print(learner.to_python_source()) # the evolved learning algorithm, as code
Live dashboard
from evozero import launch_dashboard
with launch_dashboard(port=8080) as dash:
print("open", dash.url)
... # push metrics with dash.update({...}) from a training callback
or evozero dashboard --port 8080.
Documentation
https://evozero.readthedocs.io · Changelog · Contributing
Citing
If evozero helps your research, please cite it — see CITATION.cff.
License
Apache-2.0 © Karim Touma. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evozero-0.1.0.tar.gz.
File metadata
- Download URL: evozero-0.1.0.tar.gz
- Upload date:
- Size: 40.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce555f3b636d320e6caf21de06d5d28c3a02d94ac7c47b8aace8d1472a376948
|
|
| MD5 |
ba8415607e2f71b852c2ca8187de4a10
|
|
| BLAKE2b-256 |
335d2e95e8d129d9e350ed95e94a9dc274f94659b2958bb3616ce42977abd2fb
|
File details
Details for the file evozero-0.1.0-py3-none-any.whl.
File metadata
- Download URL: evozero-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
443343e44f4f7b0f37a37d2d1a4e875b8c60d3f95839f8f56ec12e4ab5f0fcdb
|
|
| MD5 |
072e35c1bdde18c57e742bd64d993cda
|
|
| BLAKE2b-256 |
467f74e0fdf1af56caef99314b43e41fe4e75ed3dc4b8b4fe8eb10515d8de772
|