Skip to content

Commit b45ded8

Browse files
committed
Fix evaluation count in PyATF search strategies
The search strategies from PyATF are not guaranteed to always give a unique point. It is possible that `get_next_coordinates` actually returns the same configurations multiple times. However, these should not count towards the evaluation limit (`max_feval`). This commit makes it so that only unique configuration evaluations are counted towards the limit.
1 parent f9b223b commit b45ded8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel_tuner/strategies/pyatf_strategies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def tune(searchspace: Searchspace, runner, tuning_options):
8686

8787
try:
8888
# optimization loop (KT-compatible re-implementation of `make_step` from TuningRun)
89-
while eval_count < searchspace.size:
89+
while len(tuning_options.unique_results) < searchspace.size:
9090

9191
# get new coordinates
9292
if not coordinates_or_indices:

0 commit comments

Comments
 (0)