Skip to content

v2.0.0a1

Pre-release
Pre-release

Choose a tag to compare

@BillHuang2001 BillHuang2001 released this 30 Oct 17:53
· 3 commits to main since this release

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.compile does not always resolve these performance issues. More importantly, its functional transformations (torch.vmap, torch.cond etc.) 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, and batch_functions for 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) and step(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 .exv traces.
  • Hyperparameter optimization: Host-side HPO workflows.
  • Extensions: Automatic discovery through the evox_ext namespace 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.