Skip to content

Commit

Permalink
Add a validation for an unknwon algorithm name
Browse files Browse the repository at this point in the history
Signed-off-by: tenzen-y <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y committed Dec 17, 2022
1 parent f661f59 commit 5e9536a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/suggestion/v1beta1/optuna/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def validate_algorithm_spec(cls, experiment):
return cls._validate_random_setting(algorithm_settings)
elif algorithm_name == "grid":
return cls._validate_grid_setting(experiment)
else:
return False, "unknown algorithm name {}".format(algorithm_name)

@classmethod
def _validate_tpe_setting(cls, algorithm_spec):
Expand Down

0 comments on commit 5e9536a

Please sign in to comment.