Skip to content

Commit 5e9536a

Browse files
committed
Add a validation for an unknwon algorithm name
Signed-off-by: tenzen-y <[email protected]>
1 parent f661f59 commit 5e9536a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/suggestion/v1beta1/optuna/service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def validate_algorithm_spec(cls, experiment):
126126
return cls._validate_random_setting(algorithm_settings)
127127
elif algorithm_name == "grid":
128128
return cls._validate_grid_setting(experiment)
129+
else:
130+
return False, "unknown algorithm name {}".format(algorithm_name)
129131

130132
@classmethod
131133
def _validate_tpe_setting(cls, algorithm_spec):

0 commit comments

Comments
 (0)