Skip to content

Commit 736b58a

Browse files
committed
adapt SearcherConfigs to the new dict design of optimizers
1 parent f23c882 commit 736b58a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neps/optimizers/info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_available_algorithms() -> list[str]:
5656
file_path = os.path.join(folder_path, filename)
5757
with open(file_path) as file:
5858
searcher_config = yaml.safe_load(file)
59-
algorithm = searcher_config["searcher_init"].get("algorithm")
59+
algorithm = searcher_config.get("strategy")
6060
if algorithm:
6161
prev_algorithms.add(algorithm)
6262

@@ -81,7 +81,7 @@ def get_searcher_from_algorithm(algorithm: str) -> list[str]:
8181
file_path = os.path.join(folder_path, filename)
8282
with open(file_path) as file:
8383
searcher_config = yaml.safe_load(file)
84-
if searcher_config["searcher_init"].get("algorithm") == algorithm:
84+
if searcher_config.get("strategy") == algorithm:
8585
searchers.append(os.path.splitext(filename)[0])
8686

8787
return searchers

0 commit comments

Comments
 (0)