From f72bdfbaa58646a26b50230b85b27c60f673a10f Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Mon, 20 Jan 2025 16:27:24 -0600 Subject: [PATCH] tweak --- mlos_bench/mlos_bench/tunables/tunable.py | 4 ++-- mlos_bench/mlos_bench/tunables/tunable_groups.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mlos_bench/mlos_bench/tunables/tunable.py b/mlos_bench/mlos_bench/tunables/tunable.py index dc69743a97..743e257c26 100644 --- a/mlos_bench/mlos_bench/tunables/tunable.py +++ b/mlos_bench/mlos_bench/tunables/tunable.py @@ -445,8 +445,8 @@ def is_special(self) -> bool: @property def weights(self) -> list[float] | None: """ - Get the weights of the categories or special values of the Tunable. Return None - if there are none. + Get the weights of the categories or special values of the Tunable. Return + None if there are none. Returns ------- diff --git a/mlos_bench/mlos_bench/tunables/tunable_groups.py b/mlos_bench/mlos_bench/tunables/tunable_groups.py index 09156c965e..002461aee4 100644 --- a/mlos_bench/mlos_bench/tunables/tunable_groups.py +++ b/mlos_bench/mlos_bench/tunables/tunable_groups.py @@ -357,8 +357,8 @@ 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. + 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.