From 736b58a4c58c86a91f2e41ddc2d5ac73a25cbe24 Mon Sep 17 00:00:00 2001 From: Daniel <63580393+danrgll@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:09:09 +0200 Subject: [PATCH] adapt SearcherConfigs to the new dict design of optimizers --- neps/optimizers/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neps/optimizers/info.py b/neps/optimizers/info.py index 2ed03f30..7088f341 100644 --- a/neps/optimizers/info.py +++ b/neps/optimizers/info.py @@ -56,7 +56,7 @@ def get_available_algorithms() -> list[str]: file_path = os.path.join(folder_path, filename) with open(file_path) as file: searcher_config = yaml.safe_load(file) - algorithm = searcher_config["searcher_init"].get("algorithm") + algorithm = searcher_config.get("strategy") if algorithm: prev_algorithms.add(algorithm) @@ -81,7 +81,7 @@ def get_searcher_from_algorithm(algorithm: str) -> list[str]: file_path = os.path.join(folder_path, filename) with open(file_path) as file: searcher_config = yaml.safe_load(file) - if searcher_config["searcher_init"].get("algorithm") == algorithm: + if searcher_config.get("strategy") == algorithm: searchers.append(os.path.splitext(filename)[0]) return searchers