Skip to content

Commit

Permalink
Add an error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Sep 30, 2024
1 parent 580a7b7 commit 8162409
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package/samplers/user_prior_cmaes/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ def sample_relative(
search_space: dict[str, BaseDistribution],
) -> dict[str, Any]:
if len(search_space) != 0 and set(search_space.keys()) != set(self._param_names):
raise
raise ValueError(
"The keys in search_space and param_names did not match. "
"The most probable reason is duplicated names in param_names."
)
elif len(search_space) != 0:
search_space = {
param_name: search_space[param_name] for param_name in self._param_names
Expand Down

0 comments on commit 8162409

Please sign in to comment.