Skip to content

Commit 0c7bf72

Browse files
authored
Merge branch 'main' into docstr
2 parents 09e75c9 + 62a3170 commit 0c7bf72

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

flaml/automl.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,13 @@ def custom_metric(
15901590
self._n_concurrent_trials = n_concurrent_trials
15911591
self._early_stop = early_stop
15921592
self._use_ray = use_ray or n_concurrent_trials > 1
1593-
self._hpo_method = hpo_method or ("bs" if self._use_ray else "cfo")
1593+
# use the following condition if we have an estimation of average_trial_time and average_trial_overhead
1594+
# self._use_ray = use_ray or n_concurrent_trials > ( average_trail_time + average_trial_overhead) / (average_trial_time)
1595+
self._hpo_method = hpo_method or (
1596+
"bs"
1597+
if n_concurrent_trials > 1 or self._use_ray and len(estimator_list) > 1
1598+
else "cfo"
1599+
)
15941600
if log_file_name:
15951601
with training_log_writer(log_file_name, append_log) as save_helper:
15961602
self._training_log = save_helper

0 commit comments

Comments
 (0)