From e965dc24dbfad08eecb295a08041e7c102d95c3c Mon Sep 17 00:00:00 2001 From: Daniel Cohen Date: Mon, 28 Oct 2024 18:40:41 -0700 Subject: [PATCH] Accept force_candidate_generation in axolotl main (#2980) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/2980 Reviewed By: Cesar-Cardoso Differential Revision: D65066157 fbshipit-source-id: 6f0324ae12f73d6eada38ff59b4dea0e54cf7054 --- ax/service/tests/scheduler_test_utils.py | 2 +- ax/service/tests/test_scheduler.py | 2 +- ax/service/utils/scheduler_options.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ax/service/tests/scheduler_test_utils.py b/ax/service/tests/scheduler_test_utils.py index e603d94c500..e6298fc5c0e 100644 --- a/ax/service/tests/scheduler_test_utils.py +++ b/ax/service/tests/scheduler_test_utils.py @@ -321,7 +321,7 @@ class AxSchedulerTestCase(TestCase): "retries=False, wait_for_running_trials=True, fetch_kwargs={}, " "validate_metrics=True, status_quo_weight=0.0, " "enforce_immutable_search_space_and_opt_config=True, " - "mt_experiment_trial_type=None))" + "mt_experiment_trial_type=None, force_candidate_generation=False))" ) def setUp(self) -> None: diff --git a/ax/service/tests/test_scheduler.py b/ax/service/tests/test_scheduler.py index 53b3cecb179..3b471b38ba6 100644 --- a/ax/service/tests/test_scheduler.py +++ b/ax/service/tests/test_scheduler.py @@ -57,7 +57,7 @@ class TestAxSchedulerMultiTypeExperiment(AxSchedulerTestCase): "retries=False, wait_for_running_trials=True, fetch_kwargs={}, " "validate_metrics=True, status_quo_weight=0.0, " "enforce_immutable_search_space_and_opt_config=True, " - "mt_experiment_trial_type='type1'))" + "mt_experiment_trial_type='type1', force_candidate_generation=False))" ) def setUp(self) -> None: diff --git a/ax/service/utils/scheduler_options.py b/ax/service/utils/scheduler_options.py index b2c034bbb03..aca015fa8a3 100644 --- a/ax/service/utils/scheduler_options.py +++ b/ax/service/utils/scheduler_options.py @@ -117,6 +117,10 @@ class SchedulerOptions: is currently required for MultiTypeExperiments. This is ignored for "regular" or single type experiments. If you don't know what a single type experiment is, you don't need this. + force_candidate_generation: Whether to force candidate generation even if the + generation strategy is not ready to generate candidates, meaning one of the + transition criteria with block_gen_if_met is met. + **This is not yet implemented.** """ max_pending_trials: int = 10 @@ -143,3 +147,4 @@ class SchedulerOptions: status_quo_weight: float = 0.0 enforce_immutable_search_space_and_opt_config: bool = True mt_experiment_trial_type: str | None = None + force_candidate_generation: bool = False