Skip to content

Commit

Permalink
adapt SearcherConfigs to the new dict design of optimizers
Browse files Browse the repository at this point in the history
  • Loading branch information
danrgll committed Jun 17, 2024
1 parent f23c882 commit 736b58a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neps/optimizers/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 736b58a

Please sign in to comment.