diff --git a/README.md b/README.md index 1ed40235a..fdc2bfc1a 100644 --- a/README.md +++ b/README.md @@ -45,25 +45,35 @@ Please see OSS Vizier's [ReadTheDocs documentation](https://oss-vizier.readthedo ## Installation -To install the **core API**, the simplest way is to run: +**Most common:** To tune objectives using our default state-of-the-art JAX-based Bayesian Optimizer, run: ``` -pip install google-vizier +pip install google-vizier[jax] ``` -which will install the necessary dependencies from `requirements.txt`. +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: +For **full installation** to support all algorithms and benchmarks, run: ``` pip install google-vizier[extra] ``` -which will also install the dependencies: +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. Emukit) for algorithms. +* `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. diff --git a/demos/run_vizier_client.py b/demos/run_vizier_client.py index 3391ffd57..a8f8098e8 100644 --- a/demos/run_vizier_client.py +++ b/demos/run_vizier_client.py @@ -128,7 +128,7 @@ def main(argv: Sequence[str]) -> None: if FLAGS.multiobjective: study_config.algorithm = vz.Algorithm.NSGA2 else: - study_config.algorithm = vz.Algorithm.EMUKIT_GP_EI + study_config.algorithm = vz.Algorithm.GAUSSIAN_PROCESS_BANDIT study = clients.Study.from_study_config( study_config, owner='my_name', study_id='cifar10' diff --git a/docs/guides/user/running_vizier.ipynb b/docs/guides/user/running_vizier.ipynb index 3849d5ec8..d723ef250 100644 --- a/docs/guides/user/running_vizier.ipynb +++ b/docs/guides/user/running_vizier.ipynb @@ -42,7 +42,7 @@ }, "outputs": [], "source": [ - "!pip install google-vizier" + "!pip install google-vizier[jax]" ] }, { @@ -107,7 +107,7 @@ "outputs": [], "source": [ "study_config = vz.StudyConfig.from_problem(problem)\n", - "study_config.algorithm = vz.Algorithm.RANDOM_SEARCH" + "study_config.algorithm = vz.Algorithm.GAUSSIAN_PROCESS_BANDIT" ] }, { diff --git a/vizier/__init__.py b/vizier/__init__.py index 46e54bf19..27dbbcb2a 100644 --- a/vizier/__init__.py +++ b/vizier/__init__.py @@ -23,4 +23,4 @@ sys.path.append(PROTO_ROOT) -__version__ = "0.0.20" +__version__ = "0.1.0" diff --git a/vizier/_src/pyvizier/oss/study_config.py b/vizier/_src/pyvizier/oss/study_config.py index 0d9279705..8e706ff78 100644 --- a/vizier/_src/pyvizier/oss/study_config.py +++ b/vizier/_src/pyvizier/oss/study_config.py @@ -52,7 +52,7 @@ class Algorithm(enum.Enum): """Valid Values for StudyConfig.Algorithm.""" - # Let Vizier choose the algorithm. Currently defaults to RANDOM_SEARCH. + # Let Vizier choose algorithm. Currently defaults to GAUSSIAN_PROCESS_BANDIT. ALGORITHM_UNSPECIFIED = 'ALGORITHM_UNSPECIFIED' # Gaussian Process Bandit. GAUSSIAN_PROCESS_BANDIT = 'GAUSSIAN_PROCESS_BANDIT' @@ -133,7 +133,7 @@ class StudyConfig(vz.ProblemStatement): validator=attr.validators.instance_of((Algorithm, str)), converter=lambda x: x.value if isinstance(x, enum.Enum) else x, on_setattr=[attr.setters.convert, attr.setters.validate], - default='RANDOM_SEARCH', + default='ALGORITHM_UNSPECIFIED', kw_only=True) pythia_endpoint: Optional[str] = attr.field( diff --git a/vizier/service/policy_factory.py b/vizier/service/policy_factory.py index 03cbeecee..46029c7d6 100644 --- a/vizier/service/policy_factory.py +++ b/vizier/service/policy_factory.py @@ -49,7 +49,11 @@ def __call__( study_name: str, ) -> pythia.Policy: del study_name - if algorithm in ('DEFAULT', 'ALGORITHM_UNSPECIFIED'): + if algorithm in ( + 'DEFAULT', + 'ALGORITHM_UNSPECIFIED', + 'GAUSSIAN_PROCESS_BANDIT', + ): from vizier._src.algorithms.designers import gp_bandit return dp.DesignerPolicy(policy_supporter, gp_bandit.VizierGPBandit)