diff --git a/mlos_bench/mlos_bench/tunables/tunable_groups.py b/mlos_bench/mlos_bench/tunables/tunable_groups.py index 74c3af91b4..452c13d95b 100644 --- a/mlos_bench/mlos_bench/tunables/tunable_groups.py +++ b/mlos_bench/mlos_bench/tunables/tunable_groups.py @@ -346,6 +346,12 @@ def assign(self, param_values: Mapping[str, TunableValue]) -> "TunableGroups": param_values : Mapping[str, TunableValue] Dictionary mapping Tunable parameter names to new values. + As a special behavior when the mapping is empty the method will restore + the default values rather than no-op. + This allows an empty dictionary in json configs to be used to reset the + tunables to defaults without having to copy the original values from the + tunable_params definition. + Returns ------- self : TunableGroups