File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -224,19 +224,19 @@ def run_wrapper(
224224 RunValue:
225225 Contains information about the status/performance of config
226226 """
227- is_intensified = (run_info .budget != 0 ) # SMAC returns non-zero budget for intensification
227+ # SMAC returns non-zero budget for intensification
228+ # In other words, SMAC returns budget=0 for a simple intensifier (i.e. no intensification)
229+ is_intensified = (run_info .budget != 0 )
228230 default_budget = self ._check_and_get_default_budget ()
229231
230- if self .budget_type is None :
231- if is_intensified :
232- raise ValueError (
233- f'budget must be 0 (no intensification) for budget_type=None, but got { run_info .budget } '
234- )
235- else :
236- if not is_intensified : # SMAC returns budget=0 for a simple intensifier (no intensification)
237- run_info = run_info ._replace (budget = default_budget )
238- elif run_info .budget < 0 :
239- raise ValueError (f'budget must be greater than zero but got { run_info .budget } ' )
232+ if self .budget_type is None and is_intensified :
233+ raise ValueError (f'budget must be 0 (=no intensification) for budget_type=None, but got { run_info .budget } ' )
234+ if self .budget_type is not None and run_info .budget < 0 :
235+ raise ValueError (f'budget must be greater than zero but got { run_info .budget } ' )
236+
237+ if self .budget_type is not None and not is_intensified :
238+ # The budget will be provided in train evaluator when budget_type is None
239+ run_info = run_info ._replace (budget = default_budget )
240240
241241 remaining_time = self .stats .get_remaing_time_budget ()
242242
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ imgaug>=0.4.0
1010ConfigSpace >= 0.4.14 ,< 0.5
1111pynisher >= 0.6.3
1212pyrfr >= 0.7 ,< 0.9
13- smac = =0.14.0
13+ smac > =0.14.0
1414dask
1515distributed >= 2.2.0
1616catboost
You can’t perform that action at this time.
0 commit comments