Offline Contextual Bayesian Optimization
Overview
In Bayesian Optimization (BO), many times there are several systems or "tasks" to simultaneously optimize. This repository contains Multi-task Thompson Sampling (MTS), a BO algorithm we developed to pick both tasks and actions to evaluate. Because some tasks are usually more difficult than others, MTS often significantly outperforms standard BO techniques.
Getting Set Up
The code is compatible with python 2.7. First, clone this repo and run
pip install -r requirements
By default the code leverages the Dragonfly library.
Reproducing Synthetic Experiments
The plots in the paper can be reproduced by running ocbo.py and cts_ocbo.py with the appropriate options file.
cd src
mkdir data
python ocbo.py --options <path_to_option_file>
or if continuous
python cts_ocbo.py --options <path_to_option_file>
After the simulation has finished, the plots can be reproduced by
cd scripts
python discrete_plotter.py --write_dir ../data --run_id <options_name>
or
python cts_plotter.py --write_dir ../data --run_id <options_name>
For discrete experiments, use the flag --risk_neutral 1 to show the risk
neutral performance instead and use --plot_props 1 flag to show the
proportion of resources given to different tasks.
With the exception of the experiment in Section 4, the table below shows the option file the corresponds to a given experiment.
| Experiment | Option File |
|---|---|
| Figure 1(a,b) | set2d.txt |
| Figure 1(c) | rand4d.txt |
| Figure 1(d) | rand6d.txt |
| Figure 1(e)/4(a) | jointbran.txt |
| Figure 1(f)/4(b) | jointh22.txt |
| Figure 1(g)/4(c) | jointh31.txt |
| Figure 1(h)/4(d) | jointh42.txt |
| Figure 5(a) | contbran.txt |
| Figure 5(b) | conth22.txt |
| Figure 5(c) | conth31.txt |
| Figure 5(d) | conth42.txt |
| Figure 5(e) | contbran_sethps.txt |
| Figure 5(f) | conth22_sethps.txt |
| Figure 5(g) | conth31_sethps.txt |
| Figure 5(h) | conth42_sethps.txt |
Citing Work
If you use any code please cite the following:
@inproceedings{char2019offline,
title={Offline contextual bayesian optimization},
author={Char, Ian and Chung, Youngseog and Neiswanger, Willie and Kandasamy, Kirthevasan and Nelson, Andrew Oakleigh and Boyer, Mark and Kolemen, Egemen and Schneider, Jeff},
booktitle={Advances in Neural Information Processing Systems},
pages={4627--4638},
year={2019}
}
Metadata
Release files for OCBO 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| OCBO-0.1.2.tar.gz | 45.2 kB | Without provenance | Details for OCBO-0.1.2.tar.gz |
Release files / OCBO-0.1.2.tar.gz
| Download URL | OCBO-0.1.2.tar.gz |
|---|---|
| Size | 45.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
264c5c361c05a52262149bf6db41ec0370d08c2be97d0bc05e8f39da830dd75c
|
|
BLAKE2b-256 checksum How to use checksums |
928b8a545ef31a77d91afdc4cd872294aacd277c0b26cdfed3acd85ee5403996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for OCBO 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.