NeuroEvoBench: Benchmarking Neuroevolution Methods for Machine Learning Applications 🦕 🦖 🐢
This repository contains benchmark results, helper scripts, ES configurations and logs for testing the performance of evolutionary strategies in
evosax and EvoJAX.
The benchmark is meant to facilitate benchmarking of evolutionary optimization (EO) methods specifically tailored towards neuroevolution methods.
All task evaluations are written in JAX so that population evaluations can be parallelized on accelerators (GPU/TPU). This reduces the evaluation times significantly.
Installation & Setup
# Create a clean conda environment
conda create -n es_bench python=3.9
source activate es_bench
# Install a GPU/TPU compatible jax/jaxlib version
pip install "jax[cuda11_cudnn82]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
# Install the neuroevobench benchmark from PyPi
pip install neuroevobench
Task Availability
Basic NeuroEvoBench Usage
Individual Benchmark Tasks
- Note that the strategy to be evaluated has to follow the
evosaxask-tellAPI.
from evosax import Strategies
from neuroevobench.problems.cifar import CifarPolicy
from neuroevobench.problems.cifar import CifarTask
from neuroevobench.problems.cifar import CifarEvaluator
# 1. Create policy for task (CNN classifier)
policy = CifarPolicy()
# 2. Define train/test task based on configs/eval settings
train_task = CifarTask(config.task_config.batch_size, test=False)
test_task = CifarTask(10000, test=True)
# 3. Setup task evaluator with strategy and policy
evaluator = CifarEvaluator(
policy=policy,
train_task=train_task,
test_task=test_task,
popsize=config.popsize,
es_strategy=Strategies[config.strategy_name],
es_config=config.es_config,
es_params=config.es_params,
seed_id=config.seed_id,
log=log,
)
# 4. Run the ES loop with logging
evaluator.run(config.num_generations, config.eval_every_gen)
Running Parameter Search Sweeps
-
Please visit
neuroevobench-analysisfor example configurations used for the 10 EO baselines and 9 neuroevolution tasks. -
You can execute random search sweeps, multi-seed evaluations for the best found settings and individual training runs via the following command line shortcuts:
neb-search --config_fname ${CONFIG_FNAME} --seed_id ${SEED_ID} --experiment_dir ${EXPERIMENT_DIR}
neb-eval --config_fname ${CONFIG_FNAME} --seed_id ${SEED_ID} --experiment_dir ${EXPERIMENT_DIR}
neb-run --config_fname ${CONFIG_FNAME} --seed_id ${SEED_ID} --experiment_dir ${EXPERIMENT_DIR}
Release files for neuroevobench 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neuroevobench-0.0.1.tar.gz | 46.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neuroevobench-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.4 kB
Release files / neuroevobench-0.0.1.tar.gz
| Download URL | neuroevobench-0.0.1.tar.gz |
|---|---|
| Size | 46.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e31ee5867f0aa4c6de251a30976f07771079df802c8b1f1047b2cc4c5a6aaed0
|
|
BLAKE2b-256 checksum How to use checksums |
472ad7cb4974da815b907ebdebda1cbe476e3f1a70bfa2fc95309e7d747951c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / neuroevobench-0.0.1-py3-none-any.whl
| Download URL | neuroevobench-0.0.1-py3-none-any.whl |
|---|---|
| Size | 77.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a4e6db518e5b4e91add9d87a5c1ed1fc51aaeb304129d44a00a2e24a11d7250
|
|
BLAKE2b-256 checksum How to use checksums |
e4d9f5247aedc8fd9281e849b8b56d8d59932fc8c82ce87f7eaadf621740e364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|