Skip to content

Commit

Permalink
Add GP_UCB_PE and make it the new default.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 601196580
  • Loading branch information
xingyousong authored and copybara-github committed Jan 24, 2024
1 parent ec6874d commit 7c7b02c
Show file tree
Hide file tree
Showing 10 changed files with 851 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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='GAUSSIAN_PROCESS_BANDIT')
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])
Expand All @@ -46,7 +46,7 @@ study_config.metric_information.append(vz.MetricInformation('metric_name', goal=
# 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=1)
suggestions = study.suggest(count=2)
for suggestion in suggestions:
params = suggestion.parameters
objective = evaluate(params['w'], params['x'], params['y'], params['z'])
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/user/running_vizier.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"outputs": [],
"source": [
"study_config = vz.StudyConfig.from_problem(problem)\n",
"study_config.algorithm = 'GAUSSIAN_PROCESS_BANDIT'"
"study_config.algorithm = 'DEFAULT'"
]
},
{
Expand Down
13 changes: 7 additions & 6 deletions docs/guides/user/supported_algorithms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
"## Official\n",
"The following algorithms can be considered \"official\" and production-quality:\n",
"\n",
"1. [**GP-Bandit**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/gp_bandit.py) (`GAUSSIAN_PROCESS_BANDIT`): Flat Search Spaces.\n",
"2. [**Random Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/random.py) (`RANDOM_SEARCH`): Flat Search Spaces.\n",
"3. [**Quasi-Random Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/quasi_random.py) (`QUASI_RANDOM_SEARCH`): Flat Search Spaces.\n",
"4. [**Grid Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/grid.py) (`GRID_SEARCH`): Flat Search Spaces.\n",
"5. [**Shuffled Grid Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/grid.py) (`SHUFFLED_GRID_SEARCH`): Flat Search Spaces.\n",
"6. [**Eagle Strategy**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/eagle_strategy/eagle_strategy.py) (`EAGLE_STRATEGY`): Flat Search Spaces."
"1. [**GP-UCB-PE**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/gp_ucb_pe.py) (`GP_UCB_PE`): Flat Search Spaces.\n",
"2. [**GP-Bandit**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/gp_bandit.py) (`GAUSSIAN_PROCESS_BANDIT`): Flat Search Spaces.\n",
"3. [**Random Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/random.py) (`RANDOM_SEARCH`): Flat Search Spaces.\n",
"4. [**Quasi-Random Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/quasi_random.py) (`QUASI_RANDOM_SEARCH`): Flat Search Spaces.\n",
"5. [**Grid Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/grid.py) (`GRID_SEARCH`): Flat Search Spaces.\n",
"6. [**Shuffled Grid Search**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/grid.py) (`SHUFFLED_GRID_SEARCH`): Flat Search Spaces.\n",
"7. [**Eagle Strategy**](https://github.com/google/vizier/blob/main/vizier/_src/algorithms/designers/eagle_strategy/eagle_strategy.py) (`EAGLE_STRATEGY`): Flat Search Spaces."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion vizier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

sys.path.append(PROTO_ROOT)

__version__ = "0.1.14"
__version__ = "0.1.15"
Loading

0 comments on commit 7c7b02c

Please sign in to comment.