Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Dec 28, 2024
1 parent 820fe87 commit b1c981e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/benchmarks/nasbench201/_nasbench201.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def search_space(self) -> dict[str, optuna.distributions.BaseDistribution]:

@property
def directions(self) -> list[optuna.study.StudyDirection]:
return [_DIRECTIONS[self._problem.directions[name]] for name in self._problem.metric_names]
return [_DIRECTIONS[self._problem.directions[name]] for name in self.metric_names]

def evaluate(self, params: dict[str, int | float | str]) -> list[float]:
problem_search_space = self._problem.search_space
Expand All @@ -62,7 +62,7 @@ def evaluate(self, params: dict[str, int | float | str]) -> list[float]:
modified_params[param_name] = problem_search_space[param_name][choice_index]

results = self._problem(modified_params)
return [results[name] for name in self._problem.metric_names]
return [results[name] for name in self.metric_names]

def reseed(self, seed: int | None = None) -> None:
self._problem.reseed(seed)
Expand Down

0 comments on commit b1c981e

Please sign in to comment.