Repository navigation
Releases
v2.0.0a1
EvoX 2.0.0a1 — Rebuilt on the EvoX Compiler
Warning
Experimental pre-release — not a drop-in upgrade. EvoX 2.0 is a complete rewrite with a new API. The stable 1.x series remains recommended for production use.
To try the alpha release in a separate environment:
pip install --pre "evox==2.0.0a1"Why rewrite EvoX (again)?
EvoX started with JAX and later moved to PyTorch. Both are excellent frameworks, but neither ultimately provided the flexibility and control we needed for evolutionary computation.
- JAX inspired us with its functional programming model and composable transformations. However, its increasingly complex compiler stack, tight coupling with Google's own infrastructure, opaque debugging experience, and difficult extension paths made it challenging to understand, modify, and extend. Supporting new operations, kernels, graph transformations, or hardware backends are often impossible, and caching is not well supported either.
- PyTorch offered better ergonomics and a rich ecosystem, but its architecture is fundamentally oriented toward deep learning rather than general-purpose tensor computation. Eager execution introduces significant overhead for evolutionary workloads, while
torch.compiledoes not always resolve these performance issues. More importantly, its functional transformations (torch.vmap,torch.condetc.) still have compatibility gaps, especially when combined with compilation.
For EvoX, graph transformations, efficient execution, and compiler extensibility are fundamental requirements, not optional features.
We wanted a smaller, more transparent foundation where tensor programs are explicit, inspectable, transformable, and executable across different backends.
So we built one.
Introducing the EvoX Compiler (evoxc)
EvoX Compiler is a lightweight, compiler-neutral tensor graph compiler and runtime, designed around explicit staging and composable graph transformations.
defn → trace → Graph → transform → lower → compile → load → run
Unlike traditional eager tensor frameworks, evoxc treats computational graphs as first-class objects. Programs can be inspected, transformed, serialized, and compiled independently of Python execution.
Key capabilities include:
- Explicit, functional compilation stages: Tracing, graph transformations, lowering, compilation, and execution are separate, composable steps with accessible intermediate representations.
- Hackable by design: Users have direct access to the compiler pipeline. Extend or replace graph transformations, introduce custom operations and kernels, configure underlying ML compilers, or integrate entirely new backends without modifying the framework's core.
- Composable graph transformations:
vectorize/vmap,grad,jvp,vjp, andbatch_functionsfor combining populations of programs into a single graph. - Pluggable compiler backends: NumPy, IREE, TVM, and XLA through PJRT.
- Minimal dependencies: NumPy is the only required runtime dependency; compiled backends are optional.
- Compiler independence: StableHLO provides a common lowering boundary, while established compiler infrastructures handle hardware-specific optimization and code generation.
Instead of reinventing XLA, IREE, or TVM, evoxc provides the missing layer that makes them accessible through a unified, extensible tensor programming model.
What's new in EvoX 2.0?
A completely redesigned functional API
Algorithms and problems now follow a purely functional programming model:
- Algorithms:
init(config, key)andstep(config, state, evaluate). - Problems:
evaluate(config, state, candidates). - Immutable configurations and explicit tensor state.
- Stateless random number generation with reproducible PRNG keys.
- No dependency on PyTorch or JAX.
Unified compilation and execution
StdWorkflow traces an evolutionary step into an evoxc graph, compiles it through the selected backend, and executes the optimization loop.
import evox
workflow = evox.StdWorkflow(
algorithm=...,
problem=...,
monitor=evox.EvalMonitor(...),
backend="numpy", # numpy | iree | tvm | xla
device="cpu",
)
state = workflow.run(steps=500)Switching execution backends no longer requires rewriting the algorithm.
Algorithms, problems, and utilities
The first alpha includes:
- 32 algorithm classes, including PSO, DE variants, CMA-ES, NES/ES variants, NSGA-II/III, MOEA/D, RVEA, HypE, and more.
- 15 evolutionary operators for selection, crossover, mutation, and sampling.
- Benchmark problems: Basic numerical benchmarks, DTLZ, CEC2022, and virtual neuroevolution.
- Metrics: GD, IGD, and hypervolume.
- Visualization: Plotly-based visualization and
.exvtraces. - Hyperparameter optimization: Host-side HPO workflows.
- Extensions: Automatic discovery through the
evox_extnamespace package.
The release also incorporates fixes from the latest 1.x development, with 552 tests passing on the NumPy backend.
Installation
Requires Python 3.11+.
# Minimal installation (NumPy backend)
pip install --pre "evox==2.0.0a1"
# With IREE compiler support
pip install --pre "evox[iree]==2.0.0a1"
# With IREE and TVM
pip install --pre "evox[compilers]==2.0.0a1"The default installation requires no heavyweight ML framework or compiler toolchain.
Current limitations
This is an early alpha release. Some important features are still under development:
- Breaking changes: The 1.x API is not compatible with 2.0.
- Missing integrations: Distributed workflows, Brax/MuJoCo, PyTorch neural-network integration, and Triton kernels have not yet been ported.
- Backend maturity: The NumPy backend has the most comprehensive test coverage. Compiled backends and GPU execution remain experimental.
- Compiler limitations: Some operators and control-flow patterns are not yet supported across all backends.
- Host-side operations: Monitoring, visualization, metrics, and HPO currently execute outside compiled graphs.
We expect APIs and implementation details to evolve throughout the pre-release series.
What's next?
EvoX 2.0 establishes a new foundation for evolutionary computation. Our next priorities include expanding compiler and backend coverage, improving performance, restoring key integrations, and building exciting new features.
This release is also an opportunity to revisit the API and programming model before they stabilize.
We welcome bug reports, benchmarks, feature requests, and design feedback. If something doesn't work, or an API feels unnecessarily complicated, please open an issue.
Release v1.4.1
What's Changed
This is a minor release with bug fixes.
- Fix CMA-ES rank-one covariance update by @bbopen in #251
- Ignore points that do not dominate the reference point in hv by @raashish1601 in #254
- Fix DE_binary_crossover sampling from a normal instead of uniform distribution by @Arthur031221 in #252
- Fix PSO bound device transfer by @Arthur031221 in #253
- Fix CMA-ES crashing in torch.cond and re-enable its test by @flyingdoubleG in #255
- Fix the CMA-ES cumulation constant c_c by @flyingdoubleG in #256
- Fix ASEBO once its gradient subspace activates by @flyingdoubleG in #257
- Fix SHADE never adapting F and CR, and sample DE-variant initial populations within bounds by @flyingdoubleG in #258
- Fix crashes in tournament selection (n_round=1), XNES/SeparableNES default pop_size and Guided ES subspaces by @flyingdoubleG in #259
New Contributors
- @bbopen made their first contribution in #251
- @raashish1601 made their first contribution in #254
- @Arthur031221 made their first contribution in #252
- @flyingdoubleG made their first contribution in #255
Full Changelog: v1.4.0...v1.4.1
🔖 Release Note: v1.4.0
EvoX v1.4.0 is now available! This release is primarily a maintenance update focused on bug fixes, compatibility improvements, and general polish across the framework — including support for newer PyTorch versions, refinements to evolutionary-strategy variants and the Triton kernel infrastructure, cleaner algorithm import/export chains, documentation updates, and a stronger test suite.
If you’ve wondered what kept us busy over the past 10 months: we have been building EvoX Genesis, an AI agent system that can reliably navigate, reason over, modify and build massive codebases (100k+ LOC). Genesis is actively powering the next chapter of EvoX, enabling us to accelerate development at an unprecedented speed and scale. You can track our first major fruits of this workflow landing soon via our etl-refactor branch — stay tuned! 🚀
Full Changelog: v1.3.0...v1.4.0
v1.3.0
🔖 Release Note: v1.3.0
Feature
- Workflow now accepts a list of opt_direction.
Fixes
- Several fixes about indexing and other bugs by @sses7757 in #242
- Fix win installer by @ZaberKo in #243
- reconstruct cec2022, fix and add funcs of basic.py by @XU-Boqing in #240
use_statewhen there are multiple additional arguments
Full Changelog: v1.2.2...v1.3.0
v1.2.2 Release Note
🔖 Release Note: v1.2.2
This is a minor release focused solely on bug fixes:
- Removed unused imports to improve code cleanliness.
- Fixed unintended behavior in certain Differential Evolution (DE) algorithms where
stepwas being called withininit_step. - Various fixes in the documentation.
Full Changelog: [v1.2.1...v1.2.2](v1.2.1...v1.2.2)
Release note v1.2.1
🔖 Release Note: v1.2.1
This is a minor release focused on improving stability and addressing bugs, with a few quality-of-life enhancements.
✨ New Features
- New Benchmark Functions: Added single-objective numerical functions:
EllipsoidandGriewank.
🐛 Bug Fixes
- Fixed an issue where
StdWorkflowfailed to work with algorithms that inherit from other algorithms. - Corrected a bug in
latin_hypercube_sampling_standardfunction. - Resolved an issue with
non_dominatefailing undertorch.compile. - Corrected a problem where
PSOdid not use the default device properly in certain cases.
🧹 Refactoring & Maintenance
- Re-exported commonly used utilities to the top level for convenience, for example:
evox.compileinstead ofevox.core.compileevox.vmapinstead ofevox.core.vmap.
- Removed deprecated or redundant code.
Full Changelog: v1.2.0...v1.2.1
v1.2.0
🎉 EvoX v1.2.0 Release! 🎉
We’re excited to announce the release of EvoX v1.2.0, packed with new features, improvements, and important bug fixes! This update enhances the framework's flexibility and performance across key modules.
🔧 Highlights:
- 🚀 Added
final_step()and updatedhpo_wrapperandstd_workflowfor smoother execution workflows. - 🤖 Introduced the Mujoco Playground – a new environment for reinforcement learning experiments.
- 📘 Released a brand-new tutorial to help users get up to speed quickly.
- 🔌 Added new EvoX extension functions, enabling better integration with sister projects like EvoMO.
- 🐞 Various bug fixes and documentation updates for better stability and clarity.
Related pull requests
- Update Docstring of MOEAs by @Zhenyu2Liang in #230
- Fix the vmap used in the hpo_wrapper.py by @starquakee in #232
- Add RVEAa and final_step, and modify DTLZ, IGD and RVEA by @XU-Boqing in #231
- Update hpo_wrapper and std_workflow (final_step()) by @XU-Boqing in #233
- Add mujoco_playground problem. by @Nam-dada in #234
- Update docstring by @Zhenyu2Liang in #235
- Fix bugs of mujoco_playground by @Nam-dada in #236
- Tutorial by @BillHuang2001 in #237
🔗 Full Changelog: v1.1.2 → v1.2.0
v1.1.2
What's Changed
- Update README with usage notes and parameter adjustments by @JiangTao97 in #225
- Some vmap and HPO-related features and bug fixes by @sses7757 in #226
- Some documentation fixes @JiangTao97 in #227 and #228
- Some fixes about benchmark code by @sses7757 in #229
- Initial distributed workflow support has landed!
Full Changelog: v1.1.1...v1.1.2
v1.1.1
What's Changed
This minor release primarily includes bug fixes and improvements:
- Fixed an issue where
torch.compiledid not properly captureworkflow.step. - Fixed an issue where
use_stateleads to a graph break. - Fixed some incorrect model buffer usage.
- Fixed an issue where monitor.plot was not functioning as intended in certain situation.
- Introduced a new wrapper,
evox.compile, to work around certain limitations withtorch.compileandtorch.vmap. - Resolved various
BatchedTensor-related issues:- Fixed a bug where vmapping a workflow with EvalMonitor could cause BatchedTensor leaks.
- Fixed an issue preventing HPOProblem from working with BraxProblem.
- Enhanced the implementations of RVEA and CSO for better performance and reliability.
- Enhanced the implementation of BraxProblem.
- Various small fixes and improvements.
Related Pull requests
- Add compile & vmap support for while loops and external functions by @sses7757 in #221
- Update RVEA by @Zhenyu2Liang in #222
- Fix
std_workflow._evaluatecannot be captured bytorch.compilebug by @sses7757 in #223 - BatchedTensor fixes by @BillHuang2001 in #224
Full Changelog: v1.1.0...v1.1.1
v1.1.0
Major Changes
Dynamo Integration 🚀
We have transitioned to torch.compile as our compiler backend, replacing TorchScript. This update simplifies the compilation workflow, making it more user-friendly while maintaining high performance and efficiency.
Why Move to torch.compile?
Previously, EvoX used tracing to obtain the computation graph—JAX tracing in pre-1.0.0 and TorchScript in v1.0.0. However, tracing modes were difficult for users, lacked compatibility with many Python functions (especially non-PyTorch functions), and required manual intervention to handle dynamic workflow. While tracing was fast and produced a full computation graph, its limitations made it less flexible and hard to use.
With torch.compile, EvoX can now provide a smoother and robust compilation process:
✅ Ease of Use – No need for explicit scripting or tracing; simply use torch.compile(workflow.step), and your code gets optimized automatically.
✅ Better Performance – The torch.compile backend is actively maintained and optimized, delivering better performance than previous tracing methods, and works on more hardware backends.
✅ Full Python Compatibility – Works directly with Python code and non-PyTorch functions, eliminating compatibility issues.
✅ Future-Proof – Aligns with PyTorch’s long-term strategy, making torch.compile the recommended approach for graph capture.
This transition enhances usability while ensuring compatibility with PyTorch's evolving ecosystem.
What's Changed
- Translations update from Hosted Weblate by @weblate in #209
- Change cec2022.py to avoid accuracy blowout in the extreme by @starquakee in #210
- Fix possible shape bug in DE_differential_sum function by @starquakee in #211
- Brax now supports Single-layer vmap (Hpo Problem) by @starquakee in #212
- Fix bug of APD calculation by @Zhenyu2Liang in #213
- Some vmap related improvements by @sses7757 in #214
- Fix brax problem not evaluating in jit.trace and vmap by @sses7757 in #215
- Add NSGA3 by @LiHao-MS in #216
- Dynamo by @BillHuang2001 in #217
- Add HypE by @Zhenyu2Liang in #218
Full Changelog: v1.0.1...v1.1.0