Skip to content

Commit 6e94e01

Browse files
committed
When an invalid strategy name is given, the valid strategy names are listed in the error
1 parent 08fb58e commit 6e94e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel_tuner/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ def tune_kernel(
621621
if strategy in strategy_map:
622622
strategy = strategy_map[strategy]
623623
else:
624-
raise ValueError("Strategy %s not recognized" % strategy)
624+
raise ValueError(f"Unkown strategy {strategy}, must be one of: {', '.join(list(strategy_map.keys()))}")
625625

626626
# make strategy_options into an Options object
627627
if tuning_options.strategy_options:

0 commit comments

Comments
 (0)