google-vizier-dev


Namegoogle-vizier-dev JSON
Version 0.1.16.dev20240426195015 PyPI version JSON
download
home_pagehttps://github.com/google/vizier
SummaryOpen Source Vizier: Distributed service framework for blackbox optimization and research.
upload_time2024-04-26 19:50:22
maintainerNone
docs_urlNone
authorVizier Team
requires_python>=3.8
licenseApache License 2.0
keywords ai machine learning hyperparameter blackbox optimization framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <figure>
<img src="docs/assets/vizier_logo2.png" width=20% align="right"/>
</figure>

# Open Source Vizier: Reliable and Flexible Black-Box Optimization.
[![PyPI version](https://badge.fury.io/py/google-vizier.svg)](https://badge.fury.io/py/google-vizier)
![Continuous Integration](https://github.com/google/vizier/workflows/ci/badge.svg)
![Docs](https://github.com/google/vizier/workflows/docs_test/badge.svg)

  [**Google AI Blog**](https://ai.googleblog.com/2023/02/open-source-vizier-towards-reliable-and.html)
| [**Getting Started**](#getting_started)
| [**Documentation**](#documentation)
| [**Installation**](#installation)
| [**Citing and Highlights**](#citing_vizier)

## What is Open Source (OSS) Vizier?
[OSS Vizier](https://arxiv.org/abs/2207.13676) is a Python-based service for black-box optimization and research, based on [Google Vizier](https://dl.acm.org/doi/10.1145/3097983.3098043), one of the first hyperparameter tuning services designed to work at scale.

<figure>
<p align="center" width=65%>
<img src="docs/assets/oss_vizier_service.gif"/>
  <br>
  <em><b>OSS Vizier's distributed client-server system. Animation by Tom Small.</b></em>
</p>
</figure>

## Getting Started <a name="getting_started"></a>
As a basic example for users, below shows how to tune a simple objective using all flat search space types:

```python
from vizier.service import clients
from vizier.service import pyvizier as vz

# Objective function to maximize.
def evaluate(w: float, x: int, y: float, z: str) -> float:
  return w**2 - y**2 + x * ord(z)

# Algorithm, search space, and metrics.
study_config = vz.StudyConfig(algorithm='DEFAULT')
study_config.search_space.root.add_float_param('w', 0.0, 5.0)
study_config.search_space.root.add_int_param('x', -2, 2)
study_config.search_space.root.add_discrete_param('y', [0.3, 7.2])
study_config.search_space.root.add_categorical_param('z', ['a', 'g', 'k'])
study_config.metric_information.append(vz.MetricInformation('metric_name', goal=vz.ObjectiveMetricGoal.MAXIMIZE))

# 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.suggest(count=2)
  for suggestion in suggestions:
    params = suggestion.parameters
    objective = evaluate(params['w'], params['x'], params['y'], params['z'])
    suggestion.complete(vz.Measurement({'metric_name': objective}))
```

## Documentation <a name="documentation"></a>
OSS Vizier's interface consists of [three main APIs](https://oss-vizier.readthedocs.io/en/latest/guides/index.html):

* [**User API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-users) Allows a user to optimize their blackbox objective and optionally setup a server for distributed multi-client settings.
* [**Developer API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-developers) Defines abstractions and utilities for implementing new optimization algorithms for research and to be hosted in the service.
* [**Benchmarking API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-benchmarking) A wide collection of objective functions and methods to benchmark and compare algorithms.

Additionally, it contains [advanced API](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html) for:

* [**Tensorflow Probability:**](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html#tensorflow-probability) For writing Bayesian Optimization algorithms using Tensorflow Probability and Flax.
* [**PyGlove:**](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html#pyglove) For large-scale evolutionary experimentation and program search using OSS Vizier as a distributed backend.

Please see OSS Vizier's [ReadTheDocs documentation](https://oss-vizier.readthedocs.io/) for detailed information.

## Installation <a name="installation"></a>
**Quick start:** For tuning objectives using our state-of-the-art JAX-based Bayesian Optimizer, run:

```bash
pip install google-vizier[jax]
```

### Advanced Installation
**Minimal version:** To install only the core service and client APIs from `requirements.txt`, run:

```bash
pip install google-vizier
```

**Full installation:** To support all algorithms and benchmarks, run:

```bash
pip install google-vizier[all]
```

**Specific installation:** If you only need a specific part "X" of OSS Vizier, run:

```bash
pip install google-vizier[X]
```

which installs add-ons from `requirements-X.txt`. Possible options:

* `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.8+.

## Citing and Highlights <a name="citing_vizier"></a>
<ins>**Citing Vizier:**</ins> If you found this code useful, please consider citing the [OSS Vizier paper](https://arxiv.org/abs/2207.13676) as well as the [Google Vizier paper](https://dl.acm.org/doi/10.1145/3097983.3098043).

<ins>**Highlights:**</ins> We track [notable users](https://oss-vizier.readthedocs.io/en/latest/highlights/applications.html) and [media attention](https://oss-vizier.readthedocs.io/en/latest/highlights/media.html) - let us know if OSS Vizier was helpful for your work.

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},
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/google/vizier",
    "name": "google-vizier-dev",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ai machine learning hyperparameter blackbox optimization framework",
    "author": "Vizier Team",
    "author_email": "oss-vizier-dev@google.com",
    "download_url": "https://files.pythonhosted.org/packages/ff/8b/a1d2083837cff55d335af5384f6c34fb656faf3425643bed1b0a968451db/google-vizier-dev-0.1.16.dev20240426195015.tar.gz",
    "platform": null,
    "description": "<figure>\n<img src=\"docs/assets/vizier_logo2.png\" width=20% align=\"right\"/>\n</figure>\n\n# Open Source Vizier: Reliable and Flexible Black-Box Optimization.\n[![PyPI version](https://badge.fury.io/py/google-vizier.svg)](https://badge.fury.io/py/google-vizier)\n![Continuous Integration](https://github.com/google/vizier/workflows/ci/badge.svg)\n![Docs](https://github.com/google/vizier/workflows/docs_test/badge.svg)\n\n  [**Google AI Blog**](https://ai.googleblog.com/2023/02/open-source-vizier-towards-reliable-and.html)\n| [**Getting Started**](#getting_started)\n| [**Documentation**](#documentation)\n| [**Installation**](#installation)\n| [**Citing and Highlights**](#citing_vizier)\n\n## What is Open Source (OSS) Vizier?\n[OSS Vizier](https://arxiv.org/abs/2207.13676) is a Python-based service for black-box optimization and research, based on [Google Vizier](https://dl.acm.org/doi/10.1145/3097983.3098043), one of the first hyperparameter tuning services designed to work at scale.\n\n<figure>\n<p align=\"center\" width=65%>\n<img src=\"docs/assets/oss_vizier_service.gif\"/>\n  <br>\n  <em><b>OSS Vizier's distributed client-server system. Animation by Tom Small.</b></em>\n</p>\n</figure>\n\n## Getting Started <a name=\"getting_started\"></a>\nAs a basic example for users, below shows how to tune a simple objective using all flat search space types:\n\n```python\nfrom vizier.service import clients\nfrom vizier.service import pyvizier as vz\n\n# Objective function to maximize.\ndef evaluate(w: float, x: int, y: float, z: str) -> float:\n  return w**2 - y**2 + x * ord(z)\n\n# Algorithm, search space, and metrics.\nstudy_config = vz.StudyConfig(algorithm='DEFAULT')\nstudy_config.search_space.root.add_float_param('w', 0.0, 5.0)\nstudy_config.search_space.root.add_int_param('x', -2, 2)\nstudy_config.search_space.root.add_discrete_param('y', [0.3, 7.2])\nstudy_config.search_space.root.add_categorical_param('z', ['a', 'g', 'k'])\nstudy_config.metric_information.append(vz.MetricInformation('metric_name', goal=vz.ObjectiveMetricGoal.MAXIMIZE))\n\n# Setup client and begin optimization. Vizier Service will be implicitly created.\nstudy = clients.Study.from_study_config(study_config, owner='my_name', study_id='example')\nfor i in range(10):\n  suggestions = study.suggest(count=2)\n  for suggestion in suggestions:\n    params = suggestion.parameters\n    objective = evaluate(params['w'], params['x'], params['y'], params['z'])\n    suggestion.complete(vz.Measurement({'metric_name': objective}))\n```\n\n## Documentation <a name=\"documentation\"></a>\nOSS Vizier's interface consists of [three main APIs](https://oss-vizier.readthedocs.io/en/latest/guides/index.html):\n\n* [**User API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-users) Allows a user to optimize their blackbox objective and optionally setup a server for distributed multi-client settings.\n* [**Developer API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-developers) Defines abstractions and utilities for implementing new optimization algorithms for research and to be hosted in the service.\n* [**Benchmarking API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-benchmarking) A wide collection of objective functions and methods to benchmark and compare algorithms.\n\nAdditionally, it contains [advanced API](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html) for:\n\n* [**Tensorflow Probability:**](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html#tensorflow-probability) For writing Bayesian Optimization algorithms using Tensorflow Probability and Flax.\n* [**PyGlove:**](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html#pyglove) For large-scale evolutionary experimentation and program search using OSS Vizier as a distributed backend.\n\nPlease see OSS Vizier's [ReadTheDocs documentation](https://oss-vizier.readthedocs.io/) for detailed information.\n\n## Installation <a name=\"installation\"></a>\n**Quick start:** For tuning objectives using our state-of-the-art JAX-based Bayesian Optimizer, run:\n\n```bash\npip install google-vizier[jax]\n```\n\n### Advanced Installation\n**Minimal version:** To install only the core service and client APIs from `requirements.txt`, run:\n\n```bash\npip install google-vizier\n```\n\n**Full installation:** To support all algorithms and benchmarks, run:\n\n```bash\npip install google-vizier[all]\n```\n\n**Specific installation:** If you only need a specific part \"X\" of OSS Vizier, run:\n\n```bash\npip install google-vizier[X]\n```\n\nwhich installs add-ons from `requirements-X.txt`. Possible options:\n\n* `requirements-jax.txt`: Jax libraries shared by both algorithms and benchmarks.\n* `requirements-tf.txt`: Tensorflow libraries used by benchmarks.\n* `requirements-algorithms.txt`: Additional repositories (e.g. EvoJAX) for algorithms.\n* `requirements-benchmarks.txt`: Additional repositories (e.g. NASBENCH-201) for benchmarks.\n* `requirements-test.txt`: Libraries needed for testing code.\n\nCheck 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.8+.\n\n## Citing and Highlights <a name=\"citing_vizier\"></a>\n<ins>**Citing Vizier:**</ins> If you found this code useful, please consider citing the [OSS Vizier paper](https://arxiv.org/abs/2207.13676) as well as the [Google Vizier paper](https://dl.acm.org/doi/10.1145/3097983.3098043).\n\n<ins>**Highlights:**</ins> We track [notable users](https://oss-vizier.readthedocs.io/en/latest/highlights/applications.html) and [media attention](https://oss-vizier.readthedocs.io/en/latest/highlights/media.html) - let us know if OSS Vizier was helpful for your work.\n\nThanks!\n\n```\n@inproceedings{oss_vizier,\n  author    = {Xingyou Song and\n               Sagi Perel and\n               Chansoo Lee and\n               Greg Kochanski and\n               Daniel Golovin},\n  title     = {Open Source Vizier: Distributed Infrastructure and API for Reliable and Flexible Black-box Optimization},\n  booktitle = {Automated Machine Learning Conference, Systems Track (AutoML-Conf Systems)},\n  year      = {2022},\n}\n@inproceedings{google_vizier,\n  author    = {Daniel Golovin and\n               Benjamin Solnik and\n               Subhodeep Moitra and\n               Greg Kochanski and\n               John Karro and\n               D. Sculley},\n  title     = {Google Vizier: {A} Service for Black-Box Optimization},\n  booktitle = {Proceedings of the 23rd {ACM} {SIGKDD} International Conference on\n               Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13\n               - 17, 2017},\n  pages     = {1487--1495},\n  publisher = {{ACM}},\n  year      = {2017},\n  url       = {https://doi.org/10.1145/3097983.3098043},\n  doi       = {10.1145/3097983.3098043},\n}\n```\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Open Source Vizier: Distributed service framework for blackbox optimization and research.",
    "version": "0.1.16.dev20240426195015",
    "project_urls": {
        "Homepage": "https://github.com/google/vizier"
    },
    "split_keywords": [
        "ai",
        "machine",
        "learning",
        "hyperparameter",
        "blackbox",
        "optimization",
        "framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c44d05edaceda9bb75a2140d2b5162d7e52cc8a9e43aa434eb2c4c9fc13c4d72",
                "md5": "b6a1a9b0532e7ce970cb23fd3a52c2d8",
                "sha256": "74a1f4de3b935093e58973ad682ee94a3aadfdae1109f4c5426bb96ded1bd668"
            },
            "downloads": -1,
            "filename": "google_vizier_dev-0.1.16.dev20240426195015-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b6a1a9b0532e7ce970cb23fd3a52c2d8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 777477,
            "upload_time": "2024-04-26T19:50:20",
            "upload_time_iso_8601": "2024-04-26T19:50:20.018550Z",
            "url": "https://files.pythonhosted.org/packages/c4/4d/05edaceda9bb75a2140d2b5162d7e52cc8a9e43aa434eb2c4c9fc13c4d72/google_vizier_dev-0.1.16.dev20240426195015-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff8ba1d2083837cff55d335af5384f6c34fb656faf3425643bed1b0a968451db",
                "md5": "8567b9212f82f5beda636761d128ef99",
                "sha256": "100d7430c78373faf851421cc81e2fff2c37a5a02ee23d59657a0120a018bfc9"
            },
            "downloads": -1,
            "filename": "google-vizier-dev-0.1.16.dev20240426195015.tar.gz",
            "has_sig": false,
            "md5_digest": "8567b9212f82f5beda636761d128ef99",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 500228,
            "upload_time": "2024-04-26T19:50:22",
            "upload_time_iso_8601": "2024-04-26T19:50:22.178361Z",
            "url": "https://files.pythonhosted.org/packages/ff/8b/a1d2083837cff55d335af5384f6c34fb656faf3425643bed1b0a968451db/google-vizier-dev-0.1.16.dev20240426195015.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 19:50:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "google",
    "github_project": "vizier",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "google-vizier-dev"
}
        
Elapsed time: 0.26358s