Collection of Evolution Strategies optimizers with native MPI parallelization.
Project description
About
Compact implementation of Evolution Strategies using MPI, together with an MPI-based wrapper for the `cmaes' Python library (only parallelizing the function evaluations). This repository uses part of the code from OpenAI's implementation (https://github.com/openai/evolution-strategies-starter).
Example usage:
from esmpi import ES_MPI
def eval_fn(x):
time.sleep(0.01)
return (x[0] - 3) ** 2 + (10 * (x[1] + 2)) ** 2
optimizer = ES_MPI(n_params=2, population_size=16, learning_rate=0.1, sigma=0.02)
for i in range(50):
fit = optimizer.step(eval_fn)
if optimizer.is_master == 0:
print(f"{i}: fitness {np.mean(fit)}, current best params {optimizer.get_parameters()}\n")
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 esmpi-1.0.tar.gz.
File metadata
- Download URL: esmpi-1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b266c75487531d68cc504794bafa3d7e8c6a065aa03282f58fb6b0ae511b6720
|
|
| MD5 |
5ec909d9d8d5316551dee2d863ec8e4d
|
|
| BLAKE2b-256 |
6efaf1d674104bf374479e2766aa8021ef0c87c2ee0386447827108dd3c9a363
|
File details
Details for the file esmpi-1.0-py3-none-any.whl.
File metadata
- Download URL: esmpi-1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a6c1c0e078ce38c45a71c61e1974305d731bef7312762b033a4cd12743eb299
|
|
| MD5 |
2644d87804b8ad39adcea071e3a3bf37
|
|
| BLAKE2b-256 |
c97fba8ca1bf74fe097d6fd259a0bc528820d7a410e2752c9f125b58b39eeb66
|