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. Every exported function, stateful method, and property also provides an installed runtime docstring, for example help(fcmaes_rust.optimize_de) or help(fcmaes_rust.MODE). 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.4.tar.gz (150.2 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.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.4-cp313-cp313-win_amd64.whl (702.0 kB view details)

Uploaded CPython 3.13Windows x86-64

fcmaes_rust-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.4-cp313-cp313-macosx_11_0_arm64.whl (648.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fcmaes_rust-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl (711.5 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

fcmaes_rust-0.1.4-cp312-cp312-win_amd64.whl (702.4 kB view details)

Uploaded CPython 3.12Windows x86-64

fcmaes_rust-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.4-cp312-cp312-macosx_11_0_arm64.whl (648.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fcmaes_rust-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl (711.9 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fcmaes_rust-0.1.4-cp311-cp311-win_amd64.whl (699.5 kB view details)

Uploaded CPython 3.11Windows x86-64

fcmaes_rust-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (649.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fcmaes_rust-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl (713.2 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4.tar.gz
  • Upload date:
  • Size: 150.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4.tar.gz
Algorithm Hash digest
SHA256 b68a9292adbfde24ea9821013dfae84a4d6c3ee19770186565b9f2301ac9a103
MD5 0cd56f91bbdf964877a6bb5df7d1c107
BLAKE2b-256 bbf118f8dddc0566a6ed78b175266328a1d4ade43ef24a47abc39e3d7f9b84b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 747.5 kB
  • Tags: PyPy, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf86e805c462374cbdb9876419f5497859da46b8dfb32605b4276a4d45cfb525
MD5 82431cae8f01dff096aed26bbf31984a
BLAKE2b-256 a83ea01e692f41634b824e5aa324de4bfe2d86cfde6201ef411dc552c5179029

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 702.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1b8ca3e48a74867f659b5fd11fa19f5c7e421951b7fca5ff51a99bf81f90be94
MD5 790a613adf926dee9eb760a99a60c99d
BLAKE2b-256 f2294757148c7627fc2923ee029d0cafe0fe66aebfb824d35036343c34b61b2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 747.3 kB
  • Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2c14a4226735c6db7c9ef3b531272dcca84bd83a543ca57536ff466a638b9e6
MD5 65c0958d1f78989f3afcd034556f0370
BLAKE2b-256 716d23e3c128f84047c5a52cb6dc8b8b6c7a17976a4628d08e74186763b98e30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 648.2 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7122234ef86f92800a256fed34e5eed8001013aac5e3c3fc3ccce3d10a84f389
MD5 a47be1c6b09bc590cb56f44c4f5d5b63
BLAKE2b-256 d8dce74d333caf86a1baff59f0414f66ae639d11e13edccce83b331817ad167e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 711.5 kB
  • Tags: CPython 3.13, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aa4b0a91d3d889ca9a94fd8a5787c9a271d452e2f65b02f00aa5b67a4ad3722c
MD5 037c4833d50de6adf4d0c2ec086c1b04
BLAKE2b-256 bcbd2287e39667e24aa54f8a6270d77928c35485fbdbf30a1818b62b8539d725

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 702.4 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eeafb55f39cf44acca97c2cb0fae95d4b422413a144e0ec243e72b7ef4c7aa6a
MD5 c0d5d68136aa757cbbda0207b7438062
BLAKE2b-256 b5f9f162ea3a66c04d36173e00c80538377bc5c87b8a242f2d0a870a23691a59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 747.9 kB
  • Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7c9423048d1ad463fd737ee4152f2dcafdd6d113f30f195c7b18d17eab5fc83
MD5 753b06c40ef49393808ac50ddc6989ae
BLAKE2b-256 3a587adc0a8aba8905501b9e13e9091a36a47925eacc21cb726ce8934b048c3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 648.5 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9dc687f83872d61ad9b754ffae36dc523cd169dd4c1f103a97cdaac03119c77
MD5 873d1f4218cab5c524791be055021204
BLAKE2b-256 9e21e3043ead9eca9bbfa4ccdb6a493cf6215e07292899ccbaea1865eb679ef8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 711.9 kB
  • Tags: CPython 3.12, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cbf39083da1785838a7c5c06260aa38b6e2021e17724222408304858df25afac
MD5 a3a56f7a1efdcd6a509c139ffd1a5fd5
BLAKE2b-256 de7e8915fd145e515bb7b8cf76665dbe78bd597b0add10f423a9be552360c6fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 699.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 aaed198f9367c589b0932f0f74cfcf197e98d1dc648413a42cee2cb661175af3
MD5 aa0e627187f386f094fd80d0c0d09556
BLAKE2b-256 f8d3d4c8e6a50347e526b95d25a7203f3d2436998875c1ffb65635e53c5336e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 746.4 kB
  • Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd032bdcb97ac3b9993ff6b63dbb856fe0a11c6f5c96620ce3f8cd017470d870
MD5 5d8c2c171bda05b5b3d07696401ad2ec
BLAKE2b-256 c39a24c50e52c6c5e3ba34c0aa5aea7ef4a9ba5f415f4bb2354e7354bed760e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 649.1 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a64d5c21ea2727218cb1c711003e7cae91025ee643592c57db5bd379f3f86b5a
MD5 4f8d1de367f391e3850b56aa20c1525e
BLAKE2b-256 1eacf2093603aef6777e58755827e0886cb986c125f5e3e2ac2aa2f93165429d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 713.2 kB
  • Tags: CPython 3.11, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e86b226f3eb44001f3224a4d8c635f0351264afad3027a0acbe52cfe53b1eaf1
MD5 22cb88084af25b93307c14e1503ac8c1
BLAKE2b-256 5eeaaa124612cb1fff1b8b1058148fae218c0526c5dffb6466556af7957800e1

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