openbox


Nameopenbox JSON
Version 0.8.3 PyPI version JSON
download
home_pageNone
SummaryEfficient and generalized blackbox optimization (BBO) system
upload_time2024-04-27 10:43:40
maintainerNone
docs_urlNone
authorDAIR Lab @ Peking University
requires_python>=3.7
licenseMIT License Copyright (c) 2023 DAIR Lab @ Peking University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The OpenBox license applies to all parts of OpenBox that are not externally maintained codes. The externally maintained codes used by OpenBox are parts of: - base surrogates, located at openbox/surrogate/base/, - acquisition functions, located at openbox/acquisition_function/acquisition.py, - acquisition optimizers, located at openbox/acq_optimizer/, are licensed as follows: ''' SMAC License ============ ============ BSD 3-Clause License Copyright (c) 2016-2018, Ml4AAD Group (http://www.ml4aad.org/) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License of other files ====================== ====================== RoBO ==== Gaussian process files are built on code from RoBO and/or are copied from RoBO: https://github.com/automl/RoBO smac/epm/gaussian_process.py smac/epm/gaussian_process_mcmc.py smac/epm/gp_base_prior.py smac/epm/gp_default_priors.py License: Copyright (c) 2015, automl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of RoBO nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. '''
keywords blackbox optimization bayesian optimization hyperparameter optimization automated machine learning multi-objective optimization constrained optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center"><a href="https://github.com/PKU-DAIR/open-box">
  <img src="docs/imgs/logo.png" width="40%" alt="OpenBox Logo">
</a></p>

-----------

[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](
  https://github.com/PKU-DAIR/open-box/blob/master/LICENSE)
[![Issues](https://img.shields.io/github/issues-raw/PKU-DAIR/open-box.svg)](
  https://github.com/PKU-DAIR/open-box/issues?q=is%3Aissue+is%3Aopen)
[![Pull Requests](https://img.shields.io/github/issues-pr-raw/PKU-DAIR/open-box.svg)](
  https://github.com/PKU-DAIR/open-box/pulls?q=is%3Apr+is%3Aopen)
[![Version](https://img.shields.io/github/release/PKU-DAIR/open-box.svg)](
  https://github.com/PKU-DAIR/open-box/releases)
[![Test](https://github.com/PKU-DAIR/open-box/actions/workflows/test.yml/badge.svg)](https://github.com/PKU-DAIR/open-box/actions/workflows/test.yml)
[![Documentation Status](https://readthedocs.org/projects/open-box/badge/?version=latest)](
  https://open-box.readthedocs.io/)
[![codecov](https://codecov.io/gh/PKU-DAIR/open-box/graph/badge.svg?token=5VWNCFAFQW)](https://codecov.io/gh/PKU-DAIR/open-box)

[OpenBox Documentation](https://open-box.readthedocs.io)
| [OpenBox中文文档](https://open-box.readthedocs.io/zh_CN/latest/)
| [中文README](https://github.com/PKU-DAIR/open-box/blob/master/README_zh_CN.md)

## OpenBox: Generalized and Efficient Blackbox Optimization System
**OpenBox** is an efficient and generalized blackbox optimization (BBO) system, which supports the following 
characteristics: 1) **BBO with multiple objectives and constraints**, 2) **BBO with transfer learning**, 3) 
**BBO with distributed parallelization**, 4) **BBO with multi-fidelity acceleration** and 5) **BBO with early stops**.
OpenBox is designed and developed by the AutoML team from the [DAIR Lab](http://net.pku.edu.cn/~cuibin/) at Peking 
University, and its goal is to make blackbox optimization easier to apply both in industry and academia, and help 
facilitate data science.


## Software Artifacts
#### Standalone Python package.
Users can install the released package and use it with Python.
#### Distributed BBO service.
We adopt the "BBO as a service" paradigm and implement OpenBox as a managed general service for black-box optimization. 
Users can access this service via REST API conveniently, and do not need to worry about other issues such as environment 
setup, software maintenance, programming, and optimization of the execution. Moreover, we also provide a Web UI,
through which users can easily track and manage the tasks.


## Design Goal

The design of OpenBox follows the following principles:
+ **Ease of use**: Minimal user effort, and user-friendly visualization for tracking and managing BBO tasks.
+ **Consistent performance**: Host state-of-the-art optimization algorithms; Choose the proper algorithm automatically.
+ **Resource-aware management**: Give cost-model-based advice to users, e.g., minimal workers or time-budget.
+ **Scalability**: Scale to dimensions on the number of input variables, objectives, tasks, trials, and parallel 
  evaluations.
+ **High efficiency**: Effective use of parallel resources, system optimization with transfer-learning and 
  multi-fidelities, etc.
+ **Fault tolerance**, **extensibility**, and **data privacy protection**.

## Links
+ [Documentations](https://open-box.readthedocs.io/en/latest/) | 
  [中文文档](https://open-box.readthedocs.io/zh_CN/latest/)
+ [Examples](https://github.com/PKU-DAIR/open-box/tree/master/examples)
+ [Pypi package](https://pypi.org/project/openbox/)
+ Conda package: [to appear soon]()
+ Blog post: [to appear soon]()

<!-- start of news (for docs) -->

## News
+ **OpenBox** based solutions achieved the **First Place** of 
  [ACM CIKM 2021 AnalyticCup](https://www.cikm2021.org/analyticup)
  (Track - Automated Hyperparameter Optimization of Recommendation System).
+ **OpenBox** team won the **Top Prize (special prize)** in the open-source innovation competition at 
  [2021 CCF ChinaSoft](http://chinasoft.ccf.org.cn/papers/chinasoft.html) conference.
+ [**Pasca**](https://github.com/PKU-DAIR/SGL), which adopts Openbox to support neural architecture search 
  functionality, won the **Best Student Paper Award at WWW'22**.

<!-- end of news (for docs) -->

## OpenBox Capabilities in a Glance
<table>
  <tbody>
    <tr align="center" valign="bottom">
      <td>
        <b>Build-in Optimization Components</b>
      </td>
      <td>
        <b>Optimization Algorithms</b>
      </td>
      <td>
        <b>Optimization Services</b>
      </td>
    </tr>
    <tr valign="top">
      <td>
      <ul><li><b>Surrogate Model</b></li>
        <ul>
          <li>Gaussian Process</li>
          <li>TPE</li>
          <li>Probabilistic Random Forest</li>
          <li>LightGBM</li>
        </ul>
        </ul>
      <ul>
        <li><b>Acquisition Function</b></li>
          <ul>
           <li>EI</li>
           <li>PI</li>
           <li>UCB</li>
           <li>MES</li>
           <li>EHVI</li>
           <li>TS</li>
          </ul>
      </ul>
        <ul>
        <li><b>Acquisition Optimizer</b></li>
        <ul>
           <li>Random Search</li>
           <li>Local Search</li>
           <li>Interleaved RS and LS</li>
           <li>Differential Evolution</li>
           <li>L-BFGS-B</li>
          </ul>
        </ul>
      </td>
      <td align="left" >
        <ul>
        <li><b>Bayesian Optimization</b></li>
        <ul>
            <li>GP-based BO</li>
            <li>SMAC</li>
            <li>TPE</li>
            <li>LineBO</li>
            <li>SafeOpt</li>
            </ul>
        </ul>
        <ul>
        <li><b>Multi-fidelity Optimization</b></li>
        <ul>
            <li>Hyperband</li>
            <li>BOHB</li>
            <li>MFES-HB</li>
            </ul>
        </ul>
        <ul>
        <li><b>Evolutionary Algorithms</b></li>
        <ul>
            <li>Surrogate-assisted EA</li>
            <li>Regularized EA</li>
            <li>Adaptive EA</li>
            <li>Differential EA</li>
            <li>NSGA-II</li>
            </ul>
        </ul>
        <ul>
        <li><b>Others</b></li>
        <ul>
            <li>Anneal</li>
            <li>PSO</li>
            <li>Random Search</li>
            </ul>
        </ul>
      </td>
      <td>
      <ul>
        <li><a href="https://open-box.readthedocs.io/en/latest/advanced_usage/parallel_evaluation.html">
          Local Machine</a></li>
        <li><a href="https://open-box.readthedocs.io/en/latest/advanced_usage/parallel_evaluation.html">
          Cluster Servers</a></li>
        <li><a href="https://open-box.readthedocs.io/en/latest/advanced_usage/parallel_evaluation.html">
          Hybrid mode</a></li>
        <li><a href="https://open-box.readthedocs.io/en/latest/openbox_as_service/openbox_as_service.html">
          Software as a Service</a></li>
      </ul>
      </td>
    </tr>
  </tbody>
</table>


## Installation

### System Requirements

Installation Requirements:
+ Python >= 3.8 (Python 3.8 is recommended!)

Supported Systems:
+ Linux (Ubuntu, ...)
+ macOS
+ Windows

We **strongly** suggest you to create a Python environment via 
[Anaconda](https://www.anaconda.com/products/individual#Downloads):
```bash
conda create -n openbox python=3.8
conda activate openbox
```

Then we recommend you to update your `pip`, `setuptools` and `wheel` as follows:
```bash
pip install --upgrade pip setuptools wheel
```

### Installation from PyPI

To install OpenBox from PyPI:

```bash
pip install openbox
```

For advanced features, [install SWIG](https://open-box.readthedocs.io/en/latest/installation/install_swig.html)
first and then run `pip install "openbox[extra]"`. 

### Manual Installation from Source

To install the newest OpenBox from the source code, please run the following commands:
```bash
git clone https://github.com/PKU-DAIR/open-box.git && cd open-box
pip install .
```

Also, for advanced features, [install SWIG](https://open-box.readthedocs.io/en/latest/installation/install_swig.html)
first and then run `pip install ".[extra]"`.

For more details about installation instructions, please refer to the 
[Installation Guide](https://open-box.readthedocs.io/en/latest/installation/installation_guide.html).

## Quick Start

A quick start example is given by:

```python
import numpy as np
from openbox import Optimizer, space as sp

# Define Search Space
space = sp.Space()
x1 = sp.Real("x1", -5, 10, default_value=0)
x2 = sp.Real("x2", 0, 15, default_value=0)
space.add_variables([x1, x2])

# Define Objective Function
def branin(config):
    x1, x2 = config['x1'], config['x2']
    y = (x2-5.1/(4*np.pi**2)*x1**2+5/np.pi*x1-6)**2+10*(1-1/(8*np.pi))*np.cos(x1)+10
    return {'objectives': [y]}

# Run
if __name__ == '__main__':
    opt = Optimizer(branin, space, max_runs=50, task_id='quick_start')
    history = opt.run()
    print(history)
```

The example with multi-objectives and constraints is as follows:

```python
import matplotlib.pyplot as plt
from openbox import Optimizer, space as sp

# Define Search Space
space = sp.Space()
x1 = sp.Real("x1", 0.1, 10.0)
x2 = sp.Real("x2", 0.0, 5.0)
space.add_variables([x1, x2])

# Define Objective Function
def CONSTR(config):
    x1, x2 = config['x1'], config['x2']
    y1, y2 = x1, (1.0 + x2) / x1
    c1, c2 = 6.0 - 9.0 * x1 - x2, 1.0 - 9.0 * x1 + x2
    return dict(objectives=[y1, y2], constraints=[c1, c2])

# Run
if __name__ == "__main__":
    opt = Optimizer(CONSTR, space, num_objectives=2, num_constraints=2,
                    max_runs=50, ref_point=[10.0, 10.0], task_id='moc')
    history = opt.run()
    history.plot_pareto_front()  # plot for 2 or 3 objectives
    plt.show()
```

We also provide **HTML Visualization**. Enable it by setting additional options
`visualization`=`basic`/`advanced` and `auto_open_html=True`(optional) in `Optimizer`:

```python
opt = Optimizer(...,
    visualization='advanced',  # or 'basic'. For 'advanced', run 'pip install "openbox[extra]"' first
    auto_open_html=True,       # open the visualization page in your browser automatically
)
history = opt.run()
```

For more visualization details, please refer to 
[HTML Visualization](https://open-box.readthedocs.io/en/latest/visualization/visualization.html).

**More Examples**:
+ [Single-Objective with Constraints](
  https://github.com/PKU-DAIR/open-box/blob/master/examples/optimize_problem_with_constraint.py)
+ [Multi-Objective](https://github.com/PKU-DAIR/open-box/blob/master/examples/optimize_multi_objective.py)
+ [Multi-Objective with Constraints](
  https://github.com/PKU-DAIR/open-box/blob/master/examples/optimize_multi_objective_with_constraint.py)
+ [Ask-and-tell Interface](https://github.com/PKU-DAIR/open-box/blob/master/examples/ask_and_tell_interface.py)
+ [Parallel Evaluation on Local](
  https://github.com/PKU-DAIR/open-box/blob/master/examples/evaluate_async_parallel_optimization.py)
+ [Distributed Evaluation](https://github.com/PKU-DAIR/open-box/blob/master/examples/distributed_optimization.py)
+ [Tuning LightGBM](https://github.com/PKU-DAIR/open-box/blob/master/examples/tuning_lightgbm.py)
+ [Tuning XGBoost](https://github.com/PKU-DAIR/open-box/blob/master/examples/tuning_xgboost.py)

## **Enterprise Users**
<img src="docs/imgs/logo_tencent.png" width="35%" class="align-left" alt="Tencent Logo">

* [Tencent Inc.](https://www.tencent.com/en-us/)

<img src="docs/imgs/logo_alibaba.png" width="35%" class="align-left" alt="Alibaba Logo">

* [Alibaba Group](https://www.alibabagroup.com/en-US/)

<img src="docs/imgs/logo_kuaishou.png" width="35%" class="align-left" alt="Kuaishou Logo">

* [Kuaishou Technology](https://www.kuaishou.com/en)


## **Contributing**
OpenBox has a frequent release cycle. Please let us know if you encounter a bug by 
[filling an issue](https://github.com/PKU-DAIR/open-box/issues/new/choose).

We appreciate all contributions. If you are planning to contribute any bug-fixes, 
please create a [pull request](https://github.com/PKU-DAIR/open-box/pulls).

If you plan to contribute new features, new modules, etc. please first open an issue or reuse an existing issue, 
and discuss the feature with us.

To learn more about making a contribution to OpenBox, please refer to our 
[How-to contribution page](https://github.com/PKU-DAIR/open-box/blob/master/CONTRIBUTING.md). 

We appreciate all contributions and thank all the contributors!


## **Feedback**
* [Fill an issue](https://github.com/PKU-DAIR/open-box/issues) on GitHub
* Email us via [*Yang Li*](https://thomas-young-2013.github.io/), 
  *shenyu@pku.edu.cn* or *jianghuaijun@pku.edu.cn*
* [Q&A] Join the QQ group: 227229622

<!-- start of related projects and publications (for docs) -->

## **Related Projects**

Targeting at openness and advancing AutoML ecosystems, we had also released few other open-source projects.

* [MindWare](https://github.com/PKU-DAIR/mindware): an open source system that provides end-to-end ML model training 
  and inference capabilities.
* [SGL](https://github.com/PKU-DAIR/SGL): a scalable graph learning toolkit for extremely large graph datasets.
* [HyperTune](https://github.com/PKU-DAIR/HyperTune): a large-scale multi-fidelity hyper-parameter tuning system.

## **Related Publications**

**OpenBox: A Python Toolkit for Generalized Black-box Optimization.**

Huaijun Jiang, Yu Shen, Yang Li, Wentao Zhang, Ce Zhang, Bin Cui.
https://arxiv.org/abs/2304.13339

**OpenBox: A Generalized Black-box Optimization Service.**

Yang Li, Yu Shen, Wentao Zhang, Yuanwei Chen, Huaijun Jiang, Mingchao Liu, Jiawei Jiang, Jinyang Gao, Wentao Wu,
Zhi Yang, Ce Zhang, Bin Cui; KDD 2021, CCF-A.
https://arxiv.org/abs/2106.00421

**MFES-HB: Efficient Hyperband with Multi-Fidelity Quality Measurements.**

Yang Li, Yu Shen, Jiawei Jiang, Jinyang Gao, Ce Zhang, Bin Cui; AAAI 2021, CCF-A.
https://arxiv.org/abs/2012.03011

**Transfer Learning based Search Space Design for Hyperparameter Tuning.**

Yang Li, Yu Shen, Huaijun Jiang, Tianyi Bai, Wentao Zhang, Ce Zhang, Bin Cui; KDD 2022, CCF-A.
https://arxiv.org/abs/2206.02511

**TransBO: Hyperparameter Optimization via Two-Phase Transfer Learning.**

Yang Li, Yu Shen, Huaijun Jiang, Wentao Zhang, Zhi Yang, Ce Zhang, Bin Cui; KDD 2022, CCF-A.
https://arxiv.org/abs/2206.02663

**PaSca: a Graph Neural Architecture Search System under the Scalable Paradigm.**

Wentao Zhang, Yu Shen, Zheyu Lin, Yang Li, Xiaosen Li, Wen Ouyang, Yangyu Tao, Zhi Yang, and Bin Cui; 
WWW 2022, CCF-A, 🏆 Best Student Paper Award.
https://arxiv.org/abs/2203.00638

**Hyper-Tune: Towards Efficient Hyper-parameter Tuning at Scale.**

Yang Li, Yu Shen, Huaijun Jiang, Wentao Zhang, Jixiang Li, Ji Liu, Ce Zhang, Bin Cui; VLDB 2022, CCF-A.
https://arxiv.org/abs/2201.06834

<!-- end of related projects and publications (for docs) -->

## **License**

The entire codebase is under [MIT license](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "openbox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Yang Li <liyang.cs@pku.edu.cn>, Huaijun Jiang <jianghuaijun@pku.edu.cn>, Yu Shen <shenyu@pku.edu.cn>",
    "keywords": "blackbox optimization, Bayesian optimization, hyperparameter optimization, automated machine learning, multi-objective optimization, constrained optimization",
    "author": "DAIR Lab @ Peking University",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ca/c7/b4699abe70e0f129713b4f97d889b52881928de5775802e6b543fe49149f/openbox-0.8.3.tar.gz",
    "platform": null,
    "description": "<p align=\"center\"><a href=\"https://github.com/PKU-DAIR/open-box\">\n  <img src=\"docs/imgs/logo.png\" width=\"40%\" alt=\"OpenBox Logo\">\n</a></p>\n\n-----------\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](\n  https://github.com/PKU-DAIR/open-box/blob/master/LICENSE)\n[![Issues](https://img.shields.io/github/issues-raw/PKU-DAIR/open-box.svg)](\n  https://github.com/PKU-DAIR/open-box/issues?q=is%3Aissue+is%3Aopen)\n[![Pull Requests](https://img.shields.io/github/issues-pr-raw/PKU-DAIR/open-box.svg)](\n  https://github.com/PKU-DAIR/open-box/pulls?q=is%3Apr+is%3Aopen)\n[![Version](https://img.shields.io/github/release/PKU-DAIR/open-box.svg)](\n  https://github.com/PKU-DAIR/open-box/releases)\n[![Test](https://github.com/PKU-DAIR/open-box/actions/workflows/test.yml/badge.svg)](https://github.com/PKU-DAIR/open-box/actions/workflows/test.yml)\n[![Documentation Status](https://readthedocs.org/projects/open-box/badge/?version=latest)](\n  https://open-box.readthedocs.io/)\n[![codecov](https://codecov.io/gh/PKU-DAIR/open-box/graph/badge.svg?token=5VWNCFAFQW)](https://codecov.io/gh/PKU-DAIR/open-box)\n\n[OpenBox Documentation](https://open-box.readthedocs.io)\n| [OpenBox\u4e2d\u6587\u6587\u6863](https://open-box.readthedocs.io/zh_CN/latest/)\n| [\u4e2d\u6587README](https://github.com/PKU-DAIR/open-box/blob/master/README_zh_CN.md)\n\n## OpenBox: Generalized and Efficient Blackbox Optimization System\n**OpenBox** is an efficient and generalized blackbox optimization (BBO) system, which supports the following \ncharacteristics: 1) **BBO with multiple objectives and constraints**, 2) **BBO with transfer learning**, 3) \n**BBO with distributed parallelization**, 4) **BBO with multi-fidelity acceleration** and 5) **BBO with early stops**.\nOpenBox is designed and developed by the AutoML team from the [DAIR Lab](http://net.pku.edu.cn/~cuibin/) at Peking \nUniversity, and its goal is to make blackbox optimization easier to apply both in industry and academia, and help \nfacilitate data science.\n\n\n## Software Artifacts\n#### Standalone Python package.\nUsers can install the released package and use it with Python.\n#### Distributed BBO service.\nWe adopt the \"BBO as a service\" paradigm and implement OpenBox as a managed general service for black-box optimization. \nUsers can access this service via REST API conveniently, and do not need to worry about other issues such as environment \nsetup, software maintenance, programming, and optimization of the execution. Moreover, we also provide a Web UI,\nthrough which users can easily track and manage the tasks.\n\n\n## Design Goal\n\nThe design of OpenBox follows the following principles:\n+ **Ease of use**: Minimal user effort, and user-friendly visualization for tracking and managing BBO tasks.\n+ **Consistent performance**: Host state-of-the-art optimization algorithms; Choose the proper algorithm automatically.\n+ **Resource-aware management**: Give cost-model-based advice to users, e.g., minimal workers or time-budget.\n+ **Scalability**: Scale to dimensions on the number of input variables, objectives, tasks, trials, and parallel \n  evaluations.\n+ **High efficiency**: Effective use of parallel resources, system optimization with transfer-learning and \n  multi-fidelities, etc.\n+ **Fault tolerance**, **extensibility**, and **data privacy protection**.\n\n## Links\n+ [Documentations](https://open-box.readthedocs.io/en/latest/) | \n  [\u4e2d\u6587\u6587\u6863](https://open-box.readthedocs.io/zh_CN/latest/)\n+ [Examples](https://github.com/PKU-DAIR/open-box/tree/master/examples)\n+ [Pypi package](https://pypi.org/project/openbox/)\n+ Conda package: [to appear soon]()\n+ Blog post: [to appear soon]()\n\n<!-- start of news (for docs) -->\n\n## News\n+ **OpenBox** based solutions achieved the **First Place** of \n  [ACM CIKM 2021 AnalyticCup](https://www.cikm2021.org/analyticup)\n  (Track - Automated Hyperparameter Optimization of Recommendation System).\n+ **OpenBox** team won the **Top Prize (special prize)** in the open-source innovation competition at \n  [2021 CCF ChinaSoft](http://chinasoft.ccf.org.cn/papers/chinasoft.html) conference.\n+ [**Pasca**](https://github.com/PKU-DAIR/SGL), which adopts Openbox to support neural architecture search \n  functionality, won the **Best Student Paper Award at WWW'22**.\n\n<!-- end of news (for docs) -->\n\n## OpenBox Capabilities in a Glance\n<table>\n  <tbody>\n    <tr align=\"center\" valign=\"bottom\">\n      <td>\n        <b>Build-in Optimization Components</b>\n      </td>\n      <td>\n        <b>Optimization Algorithms</b>\n      </td>\n      <td>\n        <b>Optimization Services</b>\n      </td>\n    </tr>\n    <tr valign=\"top\">\n      <td>\n      <ul><li><b>Surrogate Model</b></li>\n        <ul>\n          <li>Gaussian Process</li>\n          <li>TPE</li>\n          <li>Probabilistic Random Forest</li>\n          <li>LightGBM</li>\n        </ul>\n        </ul>\n      <ul>\n        <li><b>Acquisition Function</b></li>\n          <ul>\n           <li>EI</li>\n           <li>PI</li>\n           <li>UCB</li>\n           <li>MES</li>\n           <li>EHVI</li>\n           <li>TS</li>\n          </ul>\n      </ul>\n        <ul>\n        <li><b>Acquisition Optimizer</b></li>\n        <ul>\n           <li>Random Search</li>\n           <li>Local Search</li>\n           <li>Interleaved RS and LS</li>\n           <li>Differential Evolution</li>\n           <li>L-BFGS-B</li>\n          </ul>\n        </ul>\n      </td>\n      <td align=\"left\" >\n        <ul>\n        <li><b>Bayesian Optimization</b></li>\n        <ul>\n            <li>GP-based BO</li>\n            <li>SMAC</li>\n            <li>TPE</li>\n            <li>LineBO</li>\n            <li>SafeOpt</li>\n            </ul>\n        </ul>\n        <ul>\n        <li><b>Multi-fidelity Optimization</b></li>\n        <ul>\n            <li>Hyperband</li>\n            <li>BOHB</li>\n            <li>MFES-HB</li>\n            </ul>\n        </ul>\n        <ul>\n        <li><b>Evolutionary Algorithms</b></li>\n        <ul>\n            <li>Surrogate-assisted EA</li>\n            <li>Regularized EA</li>\n            <li>Adaptive EA</li>\n            <li>Differential EA</li>\n            <li>NSGA-II</li>\n            </ul>\n        </ul>\n        <ul>\n        <li><b>Others</b></li>\n        <ul>\n            <li>Anneal</li>\n            <li>PSO</li>\n            <li>Random Search</li>\n            </ul>\n        </ul>\n      </td>\n      <td>\n      <ul>\n        <li><a href=\"https://open-box.readthedocs.io/en/latest/advanced_usage/parallel_evaluation.html\">\n          Local Machine</a></li>\n        <li><a href=\"https://open-box.readthedocs.io/en/latest/advanced_usage/parallel_evaluation.html\">\n          Cluster Servers</a></li>\n        <li><a href=\"https://open-box.readthedocs.io/en/latest/advanced_usage/parallel_evaluation.html\">\n          Hybrid mode</a></li>\n        <li><a href=\"https://open-box.readthedocs.io/en/latest/openbox_as_service/openbox_as_service.html\">\n          Software as a Service</a></li>\n      </ul>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n\n## Installation\n\n### System Requirements\n\nInstallation Requirements:\n+ Python >= 3.8 (Python 3.8 is recommended!)\n\nSupported Systems:\n+ Linux (Ubuntu, ...)\n+ macOS\n+ Windows\n\nWe **strongly** suggest you to create a Python environment via \n[Anaconda](https://www.anaconda.com/products/individual#Downloads):\n```bash\nconda create -n openbox python=3.8\nconda activate openbox\n```\n\nThen we recommend you to update your `pip`, `setuptools` and `wheel` as follows:\n```bash\npip install --upgrade pip setuptools wheel\n```\n\n### Installation from PyPI\n\nTo install OpenBox from PyPI:\n\n```bash\npip install openbox\n```\n\nFor advanced features, [install SWIG](https://open-box.readthedocs.io/en/latest/installation/install_swig.html)\nfirst and then run `pip install \"openbox[extra]\"`. \n\n### Manual Installation from Source\n\nTo install the newest OpenBox from the source code, please run the following commands:\n```bash\ngit clone https://github.com/PKU-DAIR/open-box.git && cd open-box\npip install .\n```\n\nAlso, for advanced features, [install SWIG](https://open-box.readthedocs.io/en/latest/installation/install_swig.html)\nfirst and then run `pip install \".[extra]\"`.\n\nFor more details about installation instructions, please refer to the \n[Installation Guide](https://open-box.readthedocs.io/en/latest/installation/installation_guide.html).\n\n## Quick Start\n\nA quick start example is given by:\n\n```python\nimport numpy as np\nfrom openbox import Optimizer, space as sp\n\n# Define Search Space\nspace = sp.Space()\nx1 = sp.Real(\"x1\", -5, 10, default_value=0)\nx2 = sp.Real(\"x2\", 0, 15, default_value=0)\nspace.add_variables([x1, x2])\n\n# Define Objective Function\ndef branin(config):\n    x1, x2 = config['x1'], config['x2']\n    y = (x2-5.1/(4*np.pi**2)*x1**2+5/np.pi*x1-6)**2+10*(1-1/(8*np.pi))*np.cos(x1)+10\n    return {'objectives': [y]}\n\n# Run\nif __name__ == '__main__':\n    opt = Optimizer(branin, space, max_runs=50, task_id='quick_start')\n    history = opt.run()\n    print(history)\n```\n\nThe example with multi-objectives and constraints is as follows:\n\n```python\nimport matplotlib.pyplot as plt\nfrom openbox import Optimizer, space as sp\n\n# Define Search Space\nspace = sp.Space()\nx1 = sp.Real(\"x1\", 0.1, 10.0)\nx2 = sp.Real(\"x2\", 0.0, 5.0)\nspace.add_variables([x1, x2])\n\n# Define Objective Function\ndef CONSTR(config):\n    x1, x2 = config['x1'], config['x2']\n    y1, y2 = x1, (1.0 + x2) / x1\n    c1, c2 = 6.0 - 9.0 * x1 - x2, 1.0 - 9.0 * x1 + x2\n    return dict(objectives=[y1, y2], constraints=[c1, c2])\n\n# Run\nif __name__ == \"__main__\":\n    opt = Optimizer(CONSTR, space, num_objectives=2, num_constraints=2,\n                    max_runs=50, ref_point=[10.0, 10.0], task_id='moc')\n    history = opt.run()\n    history.plot_pareto_front()  # plot for 2 or 3 objectives\n    plt.show()\n```\n\nWe also provide **HTML Visualization**. Enable it by setting additional options\n`visualization`=`basic`/`advanced` and `auto_open_html=True`(optional) in `Optimizer`:\n\n```python\nopt = Optimizer(...,\n    visualization='advanced',  # or 'basic'. For 'advanced', run 'pip install \"openbox[extra]\"' first\n    auto_open_html=True,       # open the visualization page in your browser automatically\n)\nhistory = opt.run()\n```\n\nFor more visualization details, please refer to \n[HTML Visualization](https://open-box.readthedocs.io/en/latest/visualization/visualization.html).\n\n**More Examples**:\n+ [Single-Objective with Constraints](\n  https://github.com/PKU-DAIR/open-box/blob/master/examples/optimize_problem_with_constraint.py)\n+ [Multi-Objective](https://github.com/PKU-DAIR/open-box/blob/master/examples/optimize_multi_objective.py)\n+ [Multi-Objective with Constraints](\n  https://github.com/PKU-DAIR/open-box/blob/master/examples/optimize_multi_objective_with_constraint.py)\n+ [Ask-and-tell Interface](https://github.com/PKU-DAIR/open-box/blob/master/examples/ask_and_tell_interface.py)\n+ [Parallel Evaluation on Local](\n  https://github.com/PKU-DAIR/open-box/blob/master/examples/evaluate_async_parallel_optimization.py)\n+ [Distributed Evaluation](https://github.com/PKU-DAIR/open-box/blob/master/examples/distributed_optimization.py)\n+ [Tuning LightGBM](https://github.com/PKU-DAIR/open-box/blob/master/examples/tuning_lightgbm.py)\n+ [Tuning XGBoost](https://github.com/PKU-DAIR/open-box/blob/master/examples/tuning_xgboost.py)\n\n## **Enterprise Users**\n<img src=\"docs/imgs/logo_tencent.png\" width=\"35%\" class=\"align-left\" alt=\"Tencent Logo\">\n\n* [Tencent Inc.](https://www.tencent.com/en-us/)\n\n<img src=\"docs/imgs/logo_alibaba.png\" width=\"35%\" class=\"align-left\" alt=\"Alibaba Logo\">\n\n* [Alibaba Group](https://www.alibabagroup.com/en-US/)\n\n<img src=\"docs/imgs/logo_kuaishou.png\" width=\"35%\" class=\"align-left\" alt=\"Kuaishou Logo\">\n\n* [Kuaishou Technology](https://www.kuaishou.com/en)\n\n\n## **Contributing**\nOpenBox has a frequent release cycle. Please let us know if you encounter a bug by \n[filling an issue](https://github.com/PKU-DAIR/open-box/issues/new/choose).\n\nWe appreciate all contributions. If you are planning to contribute any bug-fixes, \nplease create a [pull request](https://github.com/PKU-DAIR/open-box/pulls).\n\nIf you plan to contribute new features, new modules, etc. please first open an issue or reuse an existing issue, \nand discuss the feature with us.\n\nTo learn more about making a contribution to OpenBox, please refer to our \n[How-to contribution page](https://github.com/PKU-DAIR/open-box/blob/master/CONTRIBUTING.md). \n\nWe appreciate all contributions and thank all the contributors!\n\n\n## **Feedback**\n* [Fill an issue](https://github.com/PKU-DAIR/open-box/issues) on GitHub\n* Email us via [*Yang Li*](https://thomas-young-2013.github.io/), \n  *shenyu@pku.edu.cn* or *jianghuaijun@pku.edu.cn*\n* [Q&A] Join the QQ group: 227229622\n\n<!-- start of related projects and publications (for docs) -->\n\n## **Related Projects**\n\nTargeting at openness and advancing AutoML ecosystems, we had also released few other open-source projects.\n\n* [MindWare](https://github.com/PKU-DAIR/mindware): an open source system that provides end-to-end ML model training \n  and inference capabilities.\n* [SGL](https://github.com/PKU-DAIR/SGL): a scalable graph learning toolkit for extremely large graph datasets.\n* [HyperTune](https://github.com/PKU-DAIR/HyperTune): a large-scale multi-fidelity hyper-parameter tuning system.\n\n## **Related Publications**\n\n**OpenBox: A Python Toolkit for Generalized Black-box Optimization.**\n\nHuaijun Jiang, Yu Shen, Yang Li, Wentao Zhang, Ce Zhang, Bin Cui.\nhttps://arxiv.org/abs/2304.13339\n\n**OpenBox: A Generalized Black-box Optimization Service.**\n\nYang Li, Yu Shen, Wentao Zhang, Yuanwei Chen, Huaijun Jiang, Mingchao Liu, Jiawei Jiang, Jinyang Gao, Wentao Wu,\nZhi Yang, Ce Zhang, Bin Cui; KDD 2021, CCF-A.\nhttps://arxiv.org/abs/2106.00421\n\n**MFES-HB: Efficient Hyperband with Multi-Fidelity Quality Measurements.**\n\nYang Li, Yu Shen, Jiawei Jiang, Jinyang Gao, Ce Zhang, Bin Cui; AAAI 2021, CCF-A.\nhttps://arxiv.org/abs/2012.03011\n\n**Transfer Learning based Search Space Design for Hyperparameter Tuning.**\n\nYang Li, Yu Shen, Huaijun Jiang, Tianyi Bai, Wentao Zhang, Ce Zhang, Bin Cui; KDD 2022, CCF-A.\nhttps://arxiv.org/abs/2206.02511\n\n**TransBO: Hyperparameter Optimization via Two-Phase Transfer Learning.**\n\nYang Li, Yu Shen, Huaijun Jiang, Wentao Zhang, Zhi Yang, Ce Zhang, Bin Cui; KDD 2022, CCF-A.\nhttps://arxiv.org/abs/2206.02663\n\n**PaSca: a Graph Neural Architecture Search System under the Scalable Paradigm.**\n\nWentao Zhang, Yu Shen, Zheyu Lin, Yang Li, Xiaosen Li, Wen Ouyang, Yangyu Tao, Zhi Yang, and Bin Cui; \nWWW 2022, CCF-A, \ud83c\udfc6 Best Student Paper Award.\nhttps://arxiv.org/abs/2203.00638\n\n**Hyper-Tune: Towards Efficient Hyper-parameter Tuning at Scale.**\n\nYang Li, Yu Shen, Huaijun Jiang, Wentao Zhang, Jixiang Li, Ji Liu, Ce Zhang, Bin Cui; VLDB 2022, CCF-A.\nhttps://arxiv.org/abs/2201.06834\n\n<!-- end of related projects and publications (for docs) -->\n\n## **License**\n\nThe entire codebase is under [MIT license](LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 DAIR Lab @ Peking University  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  The OpenBox license applies to all parts of OpenBox that are not externally maintained codes.  The externally maintained codes used by OpenBox are parts of:  - base surrogates, located at openbox/surrogate/base/, - acquisition functions, located at openbox/acquisition_function/acquisition.py, - acquisition optimizers, located at openbox/acq_optimizer/, are licensed as follows: ''' SMAC License ============ ============  BSD 3-Clause License  Copyright (c) 2016-2018, Ml4AAD Group (http://www.ml4aad.org/) All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  License of other files ====================== ======================  RoBO ====  Gaussian process files are built on code from RoBO and/or are copied from RoBO: https://github.com/automl/RoBO  smac/epm/gaussian_process.py smac/epm/gaussian_process_mcmc.py smac/epm/gp_base_prior.py smac/epm/gp_default_priors.py  License:  Copyright (c) 2015, automl All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of RoBO nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' ",
    "summary": "Efficient and generalized blackbox optimization (BBO) system",
    "version": "0.8.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/PKU-DAIR/open-box/issues",
        "Documentation": "https://open-box.readthedocs.io/",
        "GitHub": "https://github.com/PKU-DAIR/open-box",
        "PyPI": "https://pypi.org/project/openbox/"
    },
    "split_keywords": [
        "blackbox optimization",
        " bayesian optimization",
        " hyperparameter optimization",
        " automated machine learning",
        " multi-objective optimization",
        " constrained optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e52b1b6bf0a7e8982675ddff58703410e215990bea64cf913c3ee05a439800c",
                "md5": "0c0067d1fb6a1c662861998cc1ee8b78",
                "sha256": "b64a2c7c81f2a6cede98ebe77f5790dc0d17f2bed7752d1543f1d94ae47f85be"
            },
            "downloads": -1,
            "filename": "openbox-0.8.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c0067d1fb6a1c662861998cc1ee8b78",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 1966708,
            "upload_time": "2024-04-27T10:43:33",
            "upload_time_iso_8601": "2024-04-27T10:43:33.061160Z",
            "url": "https://files.pythonhosted.org/packages/0e/52/b1b6bf0a7e8982675ddff58703410e215990bea64cf913c3ee05a439800c/openbox-0.8.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cac7b4699abe70e0f129713b4f97d889b52881928de5775802e6b543fe49149f",
                "md5": "7999a78377fd174cc73d04be768dae28",
                "sha256": "2532aba3f2e10c5f67632c9eded929e237ca004fcfdf25ec8b2a252797097579"
            },
            "downloads": -1,
            "filename": "openbox-0.8.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7999a78377fd174cc73d04be768dae28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1873914,
            "upload_time": "2024-04-27T10:43:40",
            "upload_time_iso_8601": "2024-04-27T10:43:40.195077Z",
            "url": "https://files.pythonhosted.org/packages/ca/c7/b4699abe70e0f129713b4f97d889b52881928de5775802e6b543fe49149f/openbox-0.8.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-27 10:43:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PKU-DAIR",
    "github_project": "open-box",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "openbox"
}
        
Elapsed time: 0.26052s