From 1fa127597ac95f2192fceb3c7393bfe98d61e08a Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Fri, 4 Oct 2024 16:40:24 +0000 Subject: [PATCH] docs --- mlos_bench/mlos_bench/tunables/tunable_groups.py | 6 ++++++ 1 file changed, 6 insertions(+) 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