diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-17 03:41:26 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-17 03:41:26 +0000 |
| commit | 3b5c4111fd88cf4ee0858db8fb9896a3dcf14555 (patch) | |
| tree | 5aa9a5c4e1087184c64a6d739a1077d9f99b5640 | |
| parent | d902f56ba6ec1ca0122eca6c63a249640553c935 (diff) | |
automatic import of python-blackboxopt
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-blackboxopt.spec | 472 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 474 insertions, 0 deletions
@@ -0,0 +1 @@ +/blackboxopt-4.14.0.tar.gz diff --git a/python-blackboxopt.spec b/python-blackboxopt.spec new file mode 100644 index 0000000..bf97bc7 --- /dev/null +++ b/python-blackboxopt.spec @@ -0,0 +1,472 @@ +%global _empty_manifest_terminate_build 0 +Name: python-blackboxopt +Version: 4.14.0 +Release: 1 +Summary: A common interface for blackbox optimization algorithms along with useful helpers like parallel optimization loops, analysis and visualization scripts. +License: Apache-2.0 +URL: https://github.com/boschresearch/blackboxopt +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/65/1d/db7e8756c0dbcf559a74de7e3011d67f3d6815a64d335369cbce364d5459/blackboxopt-4.14.0.tar.gz +BuildArch: noarch + +Requires: python3-parameterspace +Requires: python3-numpy +Requires: python3-plotly +Requires: python3-scipy +Requires: python3-statsmodels +Requires: python3-dask +Requires: python3-distributed +Requires: python3-pandas +Requires: python3-botorch +Requires: python3-pymoo + +%description +# Blackbox Optimization + +[](LICENSE) +[](https://github.com/boschresearch/blackboxopt/actions?query=workflow%3Aci-cd-pipeline+branch%3Amain) + +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 + +``` +pip install 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 +``` + +### Custom Optimizers + +When you develop an optimizer based on the interface defined as part of +`blackboxopt.base`, you can use `blackboxopt.testing` to directly test whether your +implementation follows the specification by adding a test like this to your test suite. + +```python +from blackboxopt.testing import ALL_REFERENCE_TESTS + +@pytest.mark.parametrize("reference_test", ALL_REFERENCE_TESTS) +def test_all_reference_tests(reference_test): + reference_test(CustomOptimizer, custom_optimizer_init_kwargs) +``` + +## 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). + + +%package -n python3-blackboxopt +Summary: A common interface for blackbox optimization algorithms along with useful helpers like parallel optimization loops, analysis and visualization scripts. +Provides: python-blackboxopt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-blackboxopt +# Blackbox Optimization + +[](LICENSE) +[](https://github.com/boschresearch/blackboxopt/actions?query=workflow%3Aci-cd-pipeline+branch%3Amain) + +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 + +``` +pip install 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 +``` + +### Custom Optimizers + +When you develop an optimizer based on the interface defined as part of +`blackboxopt.base`, you can use `blackboxopt.testing` to directly test whether your +implementation follows the specification by adding a test like this to your test suite. + +```python +from blackboxopt.testing import ALL_REFERENCE_TESTS + +@pytest.mark.parametrize("reference_test", ALL_REFERENCE_TESTS) +def test_all_reference_tests(reference_test): + reference_test(CustomOptimizer, custom_optimizer_init_kwargs) +``` + +## 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). + + +%package help +Summary: Development documents and examples for blackboxopt +Provides: python3-blackboxopt-doc +%description help +# Blackbox Optimization + +[](LICENSE) +[](https://github.com/boschresearch/blackboxopt/actions?query=workflow%3Aci-cd-pipeline+branch%3Amain) + +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 + +``` +pip install 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 +``` + +### Custom Optimizers + +When you develop an optimizer based on the interface defined as part of +`blackboxopt.base`, you can use `blackboxopt.testing` to directly test whether your +implementation follows the specification by adding a test like this to your test suite. + +```python +from blackboxopt.testing import ALL_REFERENCE_TESTS + +@pytest.mark.parametrize("reference_test", ALL_REFERENCE_TESTS) +def test_all_reference_tests(reference_test): + reference_test(CustomOptimizer, custom_optimizer_init_kwargs) +``` + +## 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). + + +%prep +%autosetup -n blackboxopt-4.14.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-blackboxopt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 17 2023 Python_Bot <Python_Bot@openeuler.org> - 4.14.0-1 +- Package Spec generated @@ -0,0 +1 @@ +78a5b9ef5604ee6ad6211b9b43d20943 blackboxopt-4.14.0.tar.gz |
