Skip to content

Commit 80a5b62

Browse files
committed
Set default arguments if not provided
1 parent 7f3a4a3 commit 80a5b62

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kernel_tuner/hyper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ def tune_hyper_params(target_strategy: str, hyper_params: dict, restrictions: li
6868
def put_if_not_present(target_dict, key, value):
6969
target_dict[key] = value if key not in target_dict else target_dict[key]
7070

71+
# set default arguments if not provided
7172
put_if_not_present(kwargs, "verbose", True)
7273
put_if_not_present(kwargs, "quiet", False)
73-
kwargs['simulation_mode'] = False
74-
kwargs['strategy'] = 'brute_force'
75-
kwargs['verify'] = None
74+
put_if_not_present(kwargs, "simulation_mode", False)
75+
put_if_not_present(kwargs, "strategy", brute_force)
76+
put_if_not_present(kwargs, 'verify', None)
7677
arguments = [target_strategy]
7778

7879
# IMPORTANT when running this script in parallel, always make sure the below name is unique among your runs!

0 commit comments

Comments
 (0)