8000 Use batch_size=1 since we're now using VizierGPBandit by copybara-service[bot] · Pull Request #470 · google/vizier · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/run_vizier_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
)
flags.DEFINE_integer(
'suggestion_count',
5,
1,
(
'Number of suggestions to evaluate per iteration. Useful for batched'
' evaluations.'
Expand Down
22 changes: 12 additions & 10 deletions docs/guides/user/running_vizier.ipynb
95EB
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
},
"source": [
"## Obtaining suggestions\n",
"Start requesting suggestions from the server, for evaluating objectives."
"Start requesting suggestions from the server, for evaluating objectives. Suggestions can be made sequentially (`count=1`) or in batches (`count\u003e1`)."
]
},
{
Expand All @@ -192,13 +192,15 @@
},
"outputs": [],
"source": [
"suggestions = study_client.suggest(count=5)\n",
"for suggestion in suggestions:\n",
" x = suggestion.parameters['x']\n",
" y = suggestion.parameters['y']\n",
" print('Suggested Parameters (x,y):', x, y)\n",
" final_measurement = vz.Measurement({'maximize_metric': evaluate(x, y)})\n",
" suggestion.complete(final_measurement)"
"for i in range(10):\n",
" suggestions = study_client.suggest(count=1)\n",
" for suggestion in suggestions:\n",
" x = suggestion.parameters['x']\n",
" y = suggestion.parameters['y']\n",
" objective = evaluate(x, y)\n",
" print(f'Iteration {i}, suggestion ({x},{y}) led to objective value {objective}.')\n",
" final_measurement = vz.Measurement({'maximize_metric': objective})\n",
" suggestion.complete(final_measurement)"
]
},
{
Expand Down Expand Up @@ -255,8 +257,8 @@
"metadata": {
"colab": {
"last_runtime": {
"build_target": "",
"kind": "local"
"build_target": "//ads/thresholds/kumamon/colab:notebook",
"kind": "shared"
},
"name": "Running Vizier.ipynb",
"private_outputs": true,
Expand Down
0