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.3.tar.gz (141.0 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.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.3-cp313-cp313-win_amd64.whl (701.7 kB view details)

Uploaded CPython 3.13Windows x86-64

fcmaes_rust-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.3-cp313-cp313-macosx_11_0_arm64.whl (647.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fcmaes_rust-0.1.3-cp313-cp313-macosx_10_12_x86_64.whl (711.1 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

fcmaes_rust-0.1.3-cp312-cp312-win_amd64.whl (702.1 kB view details)

Uploaded CPython 3.12Windows x86-64

fcmaes_rust-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (648.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fcmaes_rust-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl (711.4 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fcmaes_rust-0.1.3-cp311-cp311-win_amd64.whl (699.1 kB view details)

Uploaded CPython 3.11Windows x86-64

fcmaes_rust-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fcmaes_rust-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (648.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fcmaes_rust-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl (712.8 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3.tar.gz
  • Upload date:
  • Size: 141.0 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.3.tar.gz
Algorithm Hash digest
SHA256 08cdeb421f54e039ae6c5a22ea828019fcbda552eefcdc647aaa6d1aa1efcac2
MD5 0bfa6dd766358af79565c4906ff97660
BLAKE2b-256 c2d0593ec14ce03135dde134683dacfaf89b3e8b773084ab29af2b7f334c1113

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 747.0 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.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5b234d27946d126c62fba1fd059fc0f8816e28eae7beb7bdb197762a3ed914a4
MD5 5a66524867c2b6b9dbe238dc7835d7c4
BLAKE2b-256 da6becc761de4531a24d9a519c7d0a509f3268c63d2d4a6987deab8c242e97ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 701.7 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9935cd571aa667b679f2d3b126b6e99a454ecc4539f91b57622ff89101f162fa
MD5 0cbf9fa0947d498e1e0023da5e5dc85f
BLAKE2b-256 8789a36c2e3d50c3b7cbbafef475d6e83a53455ec3a04090ff4e27cab9c0d357

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 746.9 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.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 efe1a1c26ba2c5b05d25d72e4cc6547ae6bff839797adba0c5a505f4090de161
MD5 c192bcdf6343aca0133f131cdc435d08
BLAKE2b-256 095c836f9904cc04af5abcd784178072bfc0d30e42f64da97a059628040305d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 647.6 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.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 001d23a0a8e72c8b353830791e032b9c90a9fffea27cf00177abd1f4cb4f9d6f
MD5 9bee1883b85f448c7e6668fb3c3237f9
BLAKE2b-256 efc738a7f7835be42ad3fba7f93229ecbf4cc5b94b4b9b2c2a0056e2e448318f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp313-cp313-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 711.1 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.3-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f63f05d3d725999fc5b10bc96d7924d09dbcf523f9c129ea105b11182c9f3b16
MD5 f540acfec83fd3beebfd71997fcf7e31
BLAKE2b-256 8eed4b005487b877c4af0cf0b53f1de0efb366926004e6d4370c84da896557b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 702.1 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 346b2f697e286f29498325a2935f68ab3d2b7ae69a28194c1e51cd74f06ce0c2
MD5 fd740baa7e0bedc49441776d0cf24732
BLAKE2b-256 21c4586e18fb99cfede79375fd4d62b5ca3e8b025abe743947ccb07a0c39214f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 747.3 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.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7364a03173ba52898e69f4b19f365b94590f625dd34509089a963fc68877c3b1
MD5 7fae146d182db2b0c4a567aa0c09c011
BLAKE2b-256 26cdc0417a72dc97636b1b1030fdc5b94c734282f99083733d1485e37b339096

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 648.0 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.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4f5b48dc6420016e6bbd7a60388f32b086e11af11faed33c88aa2c4e76e57d2
MD5 d7bb87d85769b28ddac8128b0fe057ac
BLAKE2b-256 18037408b21963ce88d04f88d8b2cb0b9665fb5e8dbc1422bae1ea6c5e300812

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 711.4 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.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9ce16d74d42175e0ee09ccd6bdbf71163583d3c7b3f24e26b482b6cecad1403f
MD5 5afa487f6eb90fd4704387ef71a1e185
BLAKE2b-256 c213f7b1ae327d9910bd1c572a20673122ab71e7664abf1baf0a1faee466334d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 699.1 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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 573a942b664103c90c2bcd579ccf2ea5c8e27379cf3aeb43053db4bb0c03bc66
MD5 aa6ca5b4ef544f113268bd905384568e
BLAKE2b-256 9c579504949a89e6193d3e70ddc0dac7e75d465d6f2c1923910c9b43bd4fdaae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 746.1 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.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79eeb78ae5eeb07e1cd32cf59d3877a173ac60f7ff18c459b0df8088d7cfcecb
MD5 b7503aa523563597b0ad2f03505a7e47
BLAKE2b-256 7e57d733f47548c05064d3731747e4279113682f95a414f936834974550c12c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 648.4 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.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 108956c8c932caca8ce746e7baf1c01337cffbd22553e326e88b7bc20aa2e93c
MD5 8506b51b80c0cc771d03ac0edab42ed8
BLAKE2b-256 89b92472884c3b9a38115225d8141f20dcffea5bae8b2952680e044c98349253

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fcmaes_rust-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 712.8 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.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ca76489dc23b7613751786b569b148fa8118e90f0a1fec511d4dd33a7dacda71
MD5 a9003794e25a1b246ea31340f7a1ba4c
BLAKE2b-256 d40443c4b0255183bbbf325d95f71146e509be99a75cebbeddab6564b52a5a6e

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