Skip to main content

Native Rust implementation of fast, parallel, gradient-free optimization.

Project description

fcmaes-rust for Python

fcmaes-rust provides Python access to fast, parallel, gradient-free optimization algorithms implemented in native Rust. The optimizer core is pure Rust and does not compile, link, or load the historical C++ backend.

Installation

python -m pip install fcmaes-rust

The initial release supports CPython 3.11 through 3.13 on the platforms for which wheels are listed on PyPI.

Quick check

import fcmaes_rust

print(fcmaes_rust.__version__)
print(fcmaes_rust.phase1_build_info())

Optimizers

The package exposes one-shot and ask/tell interfaces for Differential Evolution, active CMA-ES, CR-FM-NES, PGPE and BiteOpt, plus Dual Annealing, MODE, MAP-Elites, the Diversifier, independent retry, coordinated retry and weighted multi-objective retry.

The functions currently return low-level NumPy arrays, tuples or dictionaries. See the Python binding guide for signatures, examples, parallelism behavior and result layouts. SciPy is a runtime dependency because retry callbacks receive a public scipy.optimize.Bounds object.

import numpy as np
import fcmaes_rust

def sphere(x):
    return float(np.dot(x, x))

dim = 4
empty = np.empty(0, dtype=np.float64)
x, value, evaluations, iterations, stop = fcmaes_rust.optimize_de(
    sphere,
    dim,
    np.full(dim, -5.0),
    np.full(dim, 5.0),
    empty,
    empty,
    np.empty(0, dtype=np.bool_),
    seed=7,
    max_evaluations=4_000,
    popsize=20,
)
print(value, evaluations, x)

Python callbacks must reacquire the GIL. Native Rust objectives offer the strongest parallel scaling; cheap pure-Python callbacks are usually callback-bound.

Project links

License

MIT

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

fcmaes_rust-0.1.2.tar.gz (121.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fcmaes_rust-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.2-cp313-cp313-win_amd64.whl (692.9 kB view details)

Uploaded CPython 3.13Windows x86-64

fcmaes_rust-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (739.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.2-cp313-cp313-macosx_11_0_arm64.whl (639.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fcmaes_rust-0.1.2-cp313-cp313-macosx_10_12_x86_64.whl (702.7 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

fcmaes_rust-0.1.2-cp312-cp312-win_amd64.whl (693.4 kB view details)

Uploaded CPython 3.12Windows x86-64

fcmaes_rust-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (739.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (639.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fcmaes_rust-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl (703.1 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fcmaes_rust-0.1.2-cp311-cp311-win_amd64.whl (691.0 kB view details)

Uploaded CPython 3.11Windows x86-64

fcmaes_rust-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (737.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (640.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fcmaes_rust-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl (704.7 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file fcmaes_rust-0.1.2.tar.gz.

File metadata

  • Download URL: fcmaes_rust-0.1.2.tar.gz
  • Upload date:
  • Size: 121.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6cfd72af0ce2e29ceefa9eab616fc248d83c8f41082e84d4dea8a3994f2a7a93
MD5 7bb8d9e563444452b33b46996fba8357
BLAKE2b-256 4681b0bba5ee97b14d790217bb4af58914f268c1cb8f602cbf94395b38223546

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 738.8 kB
  • Tags: PyPy, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b3eb44ebc223699d707cb57b18efae2f2f9ca979c88a75ad8234fb766dc5792
MD5 abae228fed7474deacec6ddd5671808b
BLAKE2b-256 c3ae91c5a74ad9a0da68dc962fa1a11d26ec8a855a76ceefb861a7584252b498

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 692.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6831860df8321eb92f48fb1884b33b8475e697d8ac4c550c19cc47733a271135
MD5 c79efb07f0da568027710fb040849a52
BLAKE2b-256 4f78db2ef0a9b30c7c53ff41fb6b097922be3ae0853f346bda352f823cb57d66

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 739.0 kB
  • Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31fa8b0601e420e26ca08791f889a3b7b515774d21168c2b2b6c4b7293bb9623
MD5 5eae39ada8f4512e3373de0e3064b1ba
BLAKE2b-256 c0ab16bedefb22835f3500360da0ab518ac08a9e3d5181b7c6c8070b61eac7db

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 639.2 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0eec616a7ebf764998667aaadf263ce15571f3b2a033745f968d713f5053e631
MD5 75d5e9db8a442d4c55f98c70e8929648
BLAKE2b-256 bae0139b39581346f548f120f8eacc7be01960fbca3363a660da2d540c22ebd4

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp313-cp313-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 702.7 kB
  • Tags: CPython 3.13, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ad572fcc5e16fe3693876b2bddab1f9160c91a31d14408c4b481c412fcfef9d3
MD5 9abf1abce7114c0edc38ec798cacec7c
BLAKE2b-256 1c29055c7fd65e0121152a397d6979186a08566f16e7bb5e65a24b0c9c10b837

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 693.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 af7a043e8ce207d93969cfbcd0ed78c44eb9b1623dd923b4cfefc491f653415c
MD5 da717560b95717cb60892233a1564e6d
BLAKE2b-256 71f1c17888f995f88b88c3ffdf3bcb40a0c445857ba5911d5c0a2a9be2d83392

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 739.4 kB
  • Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87201809c39bdc1eb8f605f055b184f393f2e411f2de89166c9299ce86c23cc1
MD5 0f4ebd210c31c97023d9cb785b9157e2
BLAKE2b-256 993c1773beee4a3a4e5171d1287e518ce550e86b6a23d4c256400cb33ed03785

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 639.6 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 293f7ae72a2fef8524a2774b85693c16249fc130667e69156230aa3468da1c5b
MD5 8b4a11e86a3e59d583becb6b9ff77c83
BLAKE2b-256 5735e93961a27df9a4780efeae6ddaf0e2fa6359d4300fb1794aed3126ed539c

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 703.1 kB
  • Tags: CPython 3.12, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7acfc452bfa2dcc7dc08e47502b5a038993ab6611a19581d2d8ee1df69483a36
MD5 d90409dce1700f77954dcc5af6c2cbe6
BLAKE2b-256 f5f88ce8dfef9ba2dfba43fbe7a75ab213e21646490ca04926308bbde628ce43

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 691.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f71369e800afc2dc96a2e48e17c4ec27344500ca8d26247126080fc33bc04b22
MD5 fc14c0bef01bcef59950b5382d2b01c5
BLAKE2b-256 46ed9afe804e36bfb4067b9e9da10cd92807d99b57bfa81d4387f10f4840d97c

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 737.9 kB
  • Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1c1fb3e2a7e2ea7caa21d785c1872f2a7fbed6c1c64ca2f2fa81c245fd4c1ae9
MD5 1db40fedd9773ef8670fdde4d0264338
BLAKE2b-256 a4a086baf14ba3987e3731b403977cb8158f9089fe83cb2297c91ef2ca2b96f8

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 640.0 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 998777fd66a8f1b9ea192a654c25a75d4ff1ab54bc2ec18a3768405e70d41f12
MD5 aceedde0544bccadb0192996f62e10cd
BLAKE2b-256 2836f929ab795db397e417227335415d4660c2a477c066f9f2557d15629057b5

See more details on using hashes here.

File details

Details for the file fcmaes_rust-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fcmaes_rust-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 704.7 kB
  • Tags: CPython 3.11, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fcmaes_rust-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6efae9c4f7286aedf16fa86bf79b7c933bb14bd2ff0ad35dabc2726a07f208da
MD5 ef68e983ec3e45fcb86abe0e0302ec5e
BLAKE2b-256 124b8f21fe23a9af10df75d121e575419ffaa53ba53afde8d30bfe28c60541a5

See more details on using hashes here.

Supported by

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