Skip to main content

evox

Reason this release was yanked:

There is a bug in the lazy import that causes import failure when torch is not installed

Project description

EvoX: A Distributed GPU-accelerated Library for Evolutionary Computation

[Docs] [Paper]

Features

  • Single-objective and multi-objective algorithms.
  • GPU computing.
  • Easy to use distributed pipeline.
  • Support a wide range of problems.

Index

Installation

pip install evox

Getting started

To start with, import evox

import evox
from evox import algorithm, problem, pipeline

Then, create an algorithm and a problem:

pso = algorithms.PSO(
    lb=jnp.full(shape=(2,), fill_value=-32),
    ub=jnp.full(shape=(2,), fill_value=32),
    pop_size=100,
)
ackley = problems.classic.Ackley()

The algorithm and the problem are composed together using pipeline:

pipeline = pipelines.StdPipeline(pso, ackley)

To initialize the whole pipeline, call init on the pipeline object with a PRNGKey. Calling init will recursively initialize a tree of objects, meaning the algorithm pso and problem ackley are automatically initialize as well.

key = jax.random.PRNGKey(42)
state = pipeline.init(key)

To run the pipeline, call step on the pipeline.

# run the pipeline for 100 steps
for i in range(100):
    state = pipeline.step(state)

For more detailed usage, please refer to our documentation.

Exmaple

The example folder has many examples on how to use EvoX.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evox-0.0.2.tar.gz (42.9 kB view hashes)

Uploaded Source

Built Distribution

evox-0.0.2-py3-none-any.whl (65.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page