Skip to content

Commit 8ce5847

Browse files
Merge pull request #327 from KernelTuner/fix_issue_326
use searchspace to check config validity in costfunc
2 parents 17f69e7 + 6c837ec commit 8ce5847

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel_tuner/strategies/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def __call__(self, x, check_restrictions=True):
9494

9595
# else check if this is a legal (non-restricted) configuration
9696
if check_restrictions and self.searchspace.restrictions:
97-
params_dict = dict(zip(self.searchspace.tune_params.keys(), params))
98-
legal = util.check_restrictions(self.searchspace.restrictions, params_dict, self.tuning_options.verbose)
97+
legal = self.searchspace.is_param_config_valid(tuple(params))
9998
if not legal:
99+
params_dict = dict(zip(self.searchspace.tune_params.keys(), params))
100100
result = params_dict
101101
result[self.tuning_options.objective] = util.InvalidConfig()
102102

0 commit comments

Comments
 (0)