Open Source Vizier: Distributed service framework for blackbox optimization and research.
Project description
Open Source Vizier: Reliable and Flexible Black-Box Optimization.
Getting Started | Documentation | Installation | Citing Vizier
What is Open Source (OSS) Vizier?
OSS Vizier is a Python-based service for black-box optimization and research, based on Google Vizier, one of the first hyperparameter tuning services designed to work at scale.
Getting Started
Basic example for users:
from vizier.service import clients
from vizier.service import pyvizier as vz
# Objective function to maximize.
def evaluate(x: float, y: float) -> float:
return x**2 - y**2
# Search space, metrics, and algorithm.
study_config = vz.StudyConfig()
study_config.search_space.root.add_float_param('x', 0.0, 1.0)
study_config.search_space.root.add_float_param('y', 0.0, 1.0)
study_config.metric_information.append(vz.MetricInformation('metric_name', goal=vz.ObjectiveMetricGoal.MAXIMIZE))
study_config.algorithm = vz.Algorithm.GAUSSIAN_PROCESS_BANDIT
# Setup client and begin optimization. Vizier Service will be implicitly created.
study = clients.Study.from_study_config(study_config, owner='my_name', study_id='example')
for i in range(10):
suggestions = study_client.suggest(count=1)
for suggestion in suggestions:
x = suggestion.parameters['x']
y = suggestion.parameters['y']
objective = evaluate(x, y)
suggestion.complete(vz.Measurement({'metric_name': objective}))
Documentation
OSS Vizier's interface consists of three main APIs:
- User API: Allows a user to setup an OSS Vizier Server, which can host black-box optimization algorithms to serve multiple clients simultaneously in a fault-tolerant manner to tune their objective functions.
- Developer API: Defines abstractions and utilities for implementing new optimization algorithms for research and to be hosted in the service.
- Benchmarking API: A wide collection of objective functions and methods to benchmark and compare algorithms.
Additionally, it contains advanced API for:
- Tensorflow Probability: For writing Bayesian Optimization algorithms using Tensorflow Probability and Flax.
- PyGlove: For large-scale evolutionary experimentation and program search using OSS Vizier as a distributed backend.
Please see OSS Vizier's ReadTheDocs documentation for detailed information.
Installation
Most common: To tune objectives using our default state-of-the-art JAX-based Bayesian Optimizer, run:
pip install google-vizier[jax]
To install a minimal version that consists of only the core service and client API from requirements.txt
, run:
pip install google-vizier
For full installation to support all algorithms and benchmarks, run:
pip install google-vizier[extra]
For specific installations, you can run:
pip install google-vizier[X]
which will install additional packages from requirements-X.txt
, such as:
requirements-jax.txt
: Jax libraries shared by both algorithms and benchmarks.requirements-tf.txt
: Tensorflow libraries used by benchmarks.requirements-algorithms.txt
: Additional repositories (e.g. EvoJAX) for algorithms.requirements-benchmarks.txt
: Additional repositories (e.g. NASBENCH-201) for benchmarks.requirements-test.txt
: Libraries needed for testing code.
Check if all unit tests work by running run_tests.sh
after a full installation. OSS Vizier requires Python 3.10+, while client-only packages require Python 3.7+.
Citing Vizier
If you found this code useful, please consider citing the OSS Vizier paper as well as the Google Vizier paper. Thanks!
@inproceedings{oss_vizier,
author = {Xingyou Song and
Sagi Perel and
Chansoo Lee and
Greg Kochanski and
Daniel Golovin},
title = {Open Source Vizier: Distributed Infrastructure and API for Reliable and Flexible Black-box Optimization},
booktitle = {Automated Machine Learning Conference, Systems Track (AutoML-Conf Systems)},
year = {2022},
}
@inproceedings{google_vizier,
author = {Daniel Golovin and
Benjamin Solnik and
Subhodeep Moitra and
Greg Kochanski and
John Karro and
D. Sculley},
title = {Google Vizier: {A} Service for Black-Box Optimization},
booktitle = {Proceedings of the 23rd {ACM} {SIGKDD} International Conference on
Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13
- 17, 2017},
pages = {1487--1495},
publisher = {{ACM}},
year = {2017},
url = {https://doi.org/10.1145/3097983.3098043},
doi = {10.1145/3097983.3098043},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for google_vizier-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f57a868e1a855b5af4363174e09573785f96138c29f3ec7722aa1c8ef9fcc03 |
|
MD5 | f393dc1739387c841d01f485cd974c14 |
|
BLAKE2b-256 | 3f97a8dd58f3cd7425e8b846e77447686b2ff2a173da6864af9b91820fa7f2b0 |