blackboxopt


Nameblackboxopt JSON
Version 5.0.4 PyPI version JSON
download
home_pagehttps://github.com/boschresearch/blackboxopt
SummaryA common interface for blackbox optimization algorithms along with useful helpers like parallel optimization loops, analysis and visualization scripts.
upload_time2024-03-06 08:54:14
maintainer
docs_urlNone
authorBosch Center for AI, Robert Bosch GmbH
requires_python>=3.8,<3.12
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Blackbox Optimization

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![CI/CD](https://github.com/boschresearch/blackboxopt/workflows/ci-cd-pipeline/badge.svg)](https://github.com/boschresearch/blackboxopt/actions?query=workflow%3Aci-cd-pipeline+branch%3Amain)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/blackboxopt)](https://pypi.org/project/blackboxopt/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/blackboxopt)](https://pypi.org/project/blackboxopt/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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](https://boschresearch.github.io/blackboxopt/)**

## Development

Install poetry >= 1.5.0

```
pip install --upgrade poetry
```

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

```
poetry install
```

(Optional) Install [pre-commit](https://pre-commit.com) hooks to check code standards
before committing changes:

```
poetry run pre-commit install
```

## Test

Make sure to install all extras before running tests

```
poetry install -E testing
poetry run pytest tests/
```

For HTML test coverage reports run

```
poetry run pytest tests/ --cov --cov-report html:htmlcov
```

## Building Documentation

Make sure to install _all_ necessary dependencies:

```
poetry install --extras=all
```

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

```
poetry run mkdocs build --clean --no-directory-urls
```

For serving it locally while working on the documentation run:

```
poetry 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](LICENSE)
file for details.

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/boschresearch/blackboxopt",
    "name": "blackboxopt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.12",
    "maintainer_email": "",
    "keywords": "",
    "author": "Bosch Center for AI, Robert Bosch GmbH",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/8c/18/6a36ae86bd4b5df9fe38230488e91684acc99a95ab4770ed7664df1525ea/blackboxopt-5.0.4.tar.gz",
    "platform": null,
    "description": "# Blackbox Optimization\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![CI/CD](https://github.com/boschresearch/blackboxopt/workflows/ci-cd-pipeline/badge.svg)](https://github.com/boschresearch/blackboxopt/actions?query=workflow%3Aci-cd-pipeline+branch%3Amain)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/blackboxopt)](https://pypi.org/project/blackboxopt/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/blackboxopt)](https://pypi.org/project/blackboxopt/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nVarious blackbox optimization algorithms with a common interface along with useful\nhelpers like parallel optimization loops, analysis and visualization scripts.\n\nRandom search is provided as an example optimizer along with tests for the interface.\n\nNew optimizers can require `blackboxopt` as a dependency, which is just the light-weight\ninterface definition.\nIf you want all optimizer implementations that come with this package, install\n`blackboxopt[all]`\nAlternatively, you can get individual optimizers with e.g. `blackboxopt[bohb]`\n\nThis software is a research prototype.\nThe software is not ready for production use.\nIt has neither been developed nor tested for a specific use case.\nHowever, the license conditions of the applicable Open Source licenses allow you to\nadapt the software to your needs.\nBefore using it in a safety relevant setting, make sure that the software fulfills your\nrequirements and adjust it according to any applicable safety standards\n(e.g. ISO 26262).\n\n## Documentation\n\n**Visit [boschresearch.github.io/blackboxopt](https://boschresearch.github.io/blackboxopt/)**\n\n## Development\n\nInstall poetry >= 1.5.0\n\n```\npip install --upgrade poetry\n```\n\nInstall the `blackboxopt` package from source by running the following from the root\ndirectory of _this_ repository\n\n```\npoetry install\n```\n\n(Optional) Install [pre-commit](https://pre-commit.com) hooks to check code standards\nbefore committing changes:\n\n```\npoetry run pre-commit install\n```\n\n## Test\n\nMake sure to install all extras before running tests\n\n```\npoetry install -E testing\npoetry run pytest tests/\n```\n\nFor HTML test coverage reports run\n\n```\npoetry run pytest tests/ --cov --cov-report html:htmlcov\n```\n\n## Building Documentation\n\nMake sure to install _all_ necessary dependencies:\n\n```\npoetry install --extras=all\n```\n\nThe documentation can be built from the repository root as follows:\n\n```\npoetry run mkdocs build --clean --no-directory-urls\n```\n\nFor serving it locally while working on the documentation run:\n\n```\npoetry run mkdocs serve\n```\n\n## Architectural Decision Records\n\n### Create evaluation result from specification\n\nIn the context of initializing an evaluation result from a specification, facing the\nconcern that having a constructor with a specification argument while the specification\nattributes end up as toplevel attributes and not summarized under a specification\nattribute we decided for unpacking the evaluation specification like a dictionary into\nthe result constructor to prevent the said cognitive dissonance, accepting that the\nunpacking operator can feel unintuitive and that users might tend to matching the\nattributes explictly to the init arguments.\n\n### Report multiple evaluations\n\nIn the context of many optimizers just sequentally reporting the individual evaluations\nwhen multiple evaluations are reported at once and thus not leveraging any batch\nreporting benefits, facing the concern that representing that common behaviour in the\noptimizer base class requires the definition of an abstract report single and an\nabstract report multi method for which the report single does not need to be implemented\nif the report multi is, we decided to refactor the arising redundancy into a function\n`call_functions_with_evaluations_and_collect_errors`, accepting that this increases the\ncognitive load when reading the code.\n\n## License\n\n`blackboxopt` is open-sourced under the Apache-2.0 license. See the [LICENSE](LICENSE)\nfile for details.\n\nFor a list of other open source components included in `blackboxopt`, see the file\n[3rd-party-licenses.txt](3rd-party-licenses.txt).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A common interface for blackbox optimization algorithms along with useful helpers like parallel optimization loops, analysis and visualization scripts.",
    "version": "5.0.4",
    "project_urls": {
        "Homepage": "https://github.com/boschresearch/blackboxopt",
        "Repository": "https://github.com/boschresearch/blackboxopt"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61c320eacd5801cdd53135271d0afdb43ec4b0c524e41612a07ffd6f1974fa8b",
                "md5": "1c7cca7ae3fd148ee5e1a98a8c5da854",
                "sha256": "f22f6f6fea6c22084383c08af72b75f6b977c6f723fc58c49243e3cea5f3aab1"
            },
            "downloads": -1,
            "filename": "blackboxopt-5.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1c7cca7ae3fd148ee5e1a98a8c5da854",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.12",
            "size": 66221,
            "upload_time": "2024-03-06T08:54:12",
            "upload_time_iso_8601": "2024-03-06T08:54:12.101264Z",
            "url": "https://files.pythonhosted.org/packages/61/c3/20eacd5801cdd53135271d0afdb43ec4b0c524e41612a07ffd6f1974fa8b/blackboxopt-5.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c186a36ae86bd4b5df9fe38230488e91684acc99a95ab4770ed7664df1525ea",
                "md5": "331294c070745382622bf884ffaf29eb",
                "sha256": "1c41c4c6796e335b5d6822bdfe6ceca941ee48e49b0ea2e1f8c48847ae7a9e40"
            },
            "downloads": -1,
            "filename": "blackboxopt-5.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "331294c070745382622bf884ffaf29eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.12",
            "size": 49814,
            "upload_time": "2024-03-06T08:54:14",
            "upload_time_iso_8601": "2024-03-06T08:54:14.255305Z",
            "url": "https://files.pythonhosted.org/packages/8c/18/6a36ae86bd4b5df9fe38230488e91684acc99a95ab4770ed7664df1525ea/blackboxopt-5.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-06 08:54:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "boschresearch",
    "github_project": "blackboxopt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "blackboxopt"
}
        
Elapsed time: 0.21556s