Skip to content

Commit

Permalink
Accept force_candidate_generation in axolotl main (#2980)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #2980

Reviewed By: Cesar-Cardoso

Differential Revision: D65066157

fbshipit-source-id: 6f0324ae12f73d6eada38ff59b4dea0e54cf7054
  • Loading branch information
Daniel Cohen authored and facebook-github-bot committed Oct 29, 2024
1 parent db2203b commit e965dc2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ax/service/tests/scheduler_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ax/service/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions ax/service/utils/scheduler_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit e965dc2

Please sign in to comment.