Skip to main content

Blackbox Optimization

License CI/CD PyPI - Wheel PyPI - Python Version Code style: black

Various blackbox optimization algorithms with a common interface along with useful helpers like parallel optimization loops, analysis and visualization scripts.

Random search is provided as an example optimizer along with tests for the interface.

New optimizers can require blackboxopt as a dependency, which is just the light-weight interface definition. If you want all optimizer implementations that come with this package, install blackboxopt[all] Alternatively, you can get individual optimizers with e.g. blackboxopt[bohb]

This software is a research prototype. The software is not ready for production use. It has neither been developed nor tested for a specific use case. However, the license conditions of the applicable Open Source licenses allow you to adapt the software to your needs. Before using it in a safety relevant setting, make sure that the software fulfills your requirements and adjust it according to any applicable safety standards (e.g. ISO 26262).

Documentation

Visit boschresearch.github.io/blackboxopt

Development

Install uv

Install the blackboxopt package from source by running the following from the root directory of this repository

uv sync

(Optional) Install pre-commit hooks to check code standards before committing changes:

uv run pre-commit install

Test

Make sure to install all extras before running tests

uv sync --extra all
uv run pytest tests/

For HTML test coverage reports run

uv run pytest --cov=. --cov-report=html tests/

Building Documentation

Make sure to install all necessary dependencies:

uv sync --extra all

The documentation can be built from the repository root as follows:

uv run mkdocs build --clean --no-directory-urls

For serving it locally while working on the documentation run:

uv run mkdocs serve

Architectural Decision Records

Create evaluation result from specification

In the context of initializing an evaluation result from a specification, facing the concern that having a constructor with a specification argument while the specification attributes end up as toplevel attributes and not summarized under a specification attribute we decided for unpacking the evaluation specification like a dictionary into the result constructor to prevent the said cognitive dissonance, accepting that the unpacking operator can feel unintuitive and that users might tend to matching the attributes explictly to the init arguments.

Report multiple evaluations

In the context of many optimizers just sequentally reporting the individual evaluations when multiple evaluations are reported at once and thus not leveraging any batch reporting benefits, facing the concern that representing that common behaviour in the optimizer base class requires the definition of an abstract report single and an abstract report multi method for which the report single does not need to be implemented if the report multi is, we decided to refactor the arising redundancy into a function call_functions_with_evaluations_and_collect_errors, accepting that this increases the cognitive load when reading the code.

License

blackboxopt is open-sourced under the Apache-2.0 license. See the LICENSE file for details.

For a list of other open source components included in blackboxopt, see the file 3rd-party-licenses.txt.

Metadata

Release files for blackboxopt 5.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blackboxopt 5.3.8
File Size Uploaded
blackboxopt-5.3.8.tar.gz 317.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blackboxopt 5.3.8
File Interpreter ABI Platform
blackboxopt-5.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 389.7 kB

Release files / blackboxopt-5.3.8.tar.gz

Download URL blackboxopt-5.3.8.tar.gz
Size 317.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2469446fa54d1469e3a593a98d6475081e71cde3409997642cf7b73488f94a8f
BLAKE2b-256 checksum
How to use checksums
648b6b031b55fe73eeb1c20426d2edc13ad8cd7b8d7f61c396574711c05d7399
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blackboxopt-5.3.8-py3-none-any.whl

Download URL blackboxopt-5.3.8-py3-none-any.whl
Size 72.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43f4e308aa732dfde2f94d132272d2ef12b8b1e0df2f4e9830ad67eabfd22ecd
BLAKE2b-256 checksum
How to use checksums
bc22f6d2c8ae4277d1ef97383e87383f0fe473ea6348bc5bf1eeb424448a496d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

5.3.8 This release

2 release files

5.3.7

2 release files

5.3.6

2 release files

5.3.5

2 release files

5.3.4

2 release files

5.3.3

2 release files

5.3.2

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.4

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.14.0

2 release files

4.13.1

2 release files

4.13.0

2 release files

4.12.0

2 release files

4.10.0

2 release files

4.9.1

2 release files

4.9.0

2 release files

4.8.4

2 release files

4.8.3

2 release files

4.8.2

2 release files

4.8.1

2 release files

4.8.0

2 release files

4.7.2

2 release files

4.7.1

2 release files

4.7.0

2 release files

4.6.4

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.1

2 release files

4.5.0

2 release files

4.4.7

2 release files

4.4.6

2 release files

4.4.5

2 release files

4.4.4

2 release files

4.4.3

2 release files

4.4.2

2 release files

4.4.0

2 release files

4.3.3

2 release files

4.3.2

2 release files

4.3.1

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.0.2

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page