Skip to content

Commit

Permalink
Speed up Multi_objective_multi_fidelity_BO.ipynb by in smoke test (#2236
Browse files Browse the repository at this point in the history
)

Summary:
Modifies some options to reduce compute and speed up execution in smoke test mode. This cuts the execution time in half on my laptop.

Pull Request resolved: #2236

Reviewed By: SebastianAment

Differential Revision: D54540341

Pulled By: Balandat

fbshipit-source-id: 93b1019f713a76ec4252f0987f0136428bb6cef0
  • Loading branch information
Balandat authored and facebook-github-bot committed Mar 5, 2024
1 parent ed4bc4c commit 520468e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tutorials/Multi_objective_multi_fidelity_BO.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
" raw_samples=RAW_SAMPLES, # used for intialization heuristic\n",
" options={\n",
" \"batch_limit\": 5,\n",
" \"maxiter\": 20 if SMOKE_TEST else 200,\n",
" \"maxiter\": 3 if SMOKE_TEST else 200,\n",
" \"nonnegative\": True,\n",
" },\n",
" sequential=True,\n",
Expand Down Expand Up @@ -479,7 +479,7 @@
"from torch import Tensor\n",
"\n",
"NUM_INNER_MC_SAMPLES = 2 if SMOKE_TEST else 32\n",
"NUM_PARETO = 3 if SMOKE_TEST else 10\n",
"NUM_PARETO = 1 if SMOKE_TEST else 10\n",
"NUM_FANTASIES = 2 if SMOKE_TEST else 8\n",
"\n",
"\n",
Expand Down Expand Up @@ -514,9 +514,12 @@
" bounds=bounds[:, non_fidelity_dims],\n",
" q=NUM_PARETO,\n",
" num_restarts=1,\n",
" raw_samples=1024,\n",
" raw_samples=2 * RAW_SAMPLES,\n",
" return_best_only=True,\n",
" options={\"nonnegative\": True},\n",
" options={\n",
" \"nonnegative\": True,\n",
" \"maxiter\": 3 if SMOKE_TEST else 200,\n",
" },\n",
" )\n",
" return current_value\n",
"\n",
Expand Down Expand Up @@ -572,7 +575,10 @@
" q=BATCH_SIZE,\n",
" num_restarts=1,\n",
" raw_samples=RAW_SAMPLES, # used for intialization heuristic\n",
" options={\"batch_limit\": 5},\n",
" options={\n",
" \"batch_limit\": 5,\n",
" \"maxiter\": 3 if SMOKE_TEST else 200,\n",
" },\n",
" )\n",
" # if the AF val is 0, set the fidelity parameter to zero\n",
" if vals.item() == 0.0:\n",
Expand Down

0 comments on commit 520468e

Please sign in to comment.