Skip to content

Commit 520468e

Browse files
Balandatfacebook-github-bot
authored andcommitted
Speed up Multi_objective_multi_fidelity_BO.ipynb by in smoke test (#2236)
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
1 parent ed4bc4c commit 520468e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tutorials/Multi_objective_multi_fidelity_BO.ipynb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@
424424
" raw_samples=RAW_SAMPLES, # used for intialization heuristic\n",
425425
" options={\n",
426426
" \"batch_limit\": 5,\n",
427-
" \"maxiter\": 20 if SMOKE_TEST else 200,\n",
427+
" \"maxiter\": 3 if SMOKE_TEST else 200,\n",
428428
" \"nonnegative\": True,\n",
429429
" },\n",
430430
" sequential=True,\n",
@@ -479,7 +479,7 @@
479479
"from torch import Tensor\n",
480480
"\n",
481481
"NUM_INNER_MC_SAMPLES = 2 if SMOKE_TEST else 32\n",
482-
"NUM_PARETO = 3 if SMOKE_TEST else 10\n",
482+
"NUM_PARETO = 1 if SMOKE_TEST else 10\n",
483483
"NUM_FANTASIES = 2 if SMOKE_TEST else 8\n",
484484
"\n",
485485
"\n",
@@ -514,9 +514,12 @@
514514
" bounds=bounds[:, non_fidelity_dims],\n",
515515
" q=NUM_PARETO,\n",
516516
" num_restarts=1,\n",
517-
" raw_samples=1024,\n",
517+
" raw_samples=2 * RAW_SAMPLES,\n",
518518
" return_best_only=True,\n",
519-
" options={\"nonnegative\": True},\n",
519+
" options={\n",
520+
" \"nonnegative\": True,\n",
521+
" \"maxiter\": 3 if SMOKE_TEST else 200,\n",
522+
" },\n",
520523
" )\n",
521524
" return current_value\n",
522525
"\n",
@@ -572,7 +575,10 @@
572575
" q=BATCH_SIZE,\n",
573576
" num_restarts=1,\n",
574577
" raw_samples=RAW_SAMPLES, # used for intialization heuristic\n",
575-
" options={\"batch_limit\": 5},\n",
578+
" options={\n",
579+
" \"batch_limit\": 5,\n",
580+
" \"maxiter\": 3 if SMOKE_TEST else 200,\n",
581+
" },\n",
576582
" )\n",
577583
" # if the AF val is 0, set the fidelity parameter to zero\n",
578584
" if vals.item() == 0.0:\n",

0 commit comments

Comments
 (0)