Skip to content

Commit fc010cd

Browse files
committed
[review] fix vaiolation comments
1 parent 9c6efdf commit fc010cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/suggestion/v1beta1/nas/darts/service.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,26 +171,26 @@ def validate_algorithm_settings(algorithm_settings: list[api_pb2.AlgorithmSettin
171171
# Validate weight decay
172172
if s.name in ["w_weight_decay", "alpha_weight_decay"]:
173173
if not float(s.value) >= 0.0:
174-
return False, "{} should be greate or equal than zero".format(s.name)
174+
return False, "{} should be greater than or equal to zero".format(s.name)
175175

176176
# Validate w_momentum and w_grad_clip
177177
if s.name in ["w_momentum", "w_grad_clip"]:
178178
if not float(s.value) >= 0.0:
179-
return False, "{} should be greate or equal than zero".format(s.name)
179+
return False, "{} should be greater than or equal to zero".format(s.name)
180180

181181
if s.name == "batch_size":
182182
if s.value is not "None":
183183
if not int(s.value) >= 1:
184-
return False, "batch_size should be greate or equal than one"
184+
return False, "batch_size should be greater than or equal to one"
185185

186186
if s.name == "num_workers":
187187
if not int(s.value) >= 0:
188-
return False, "num_workers should be greate or equal than zero"
188+
return False, "num_workers should be greater than or equal to zero"
189189

190190
# Validate "init_channels", "print_step", "num_nodes" and "stem_multiplier"
191191
if s.name in ["init_channels", "print_step", "num_nodes", "stem_multiplier"]:
192192
if not int(s.value) >= 1:
193-
return False, "{} should be greate or equal than one".format(s.name)
193+
return False, "{} should be greater than or equal to one".format(s.name)
194194

195195
except Exception as e:
196196
return False, "failed to validate {name}({value}): {exception}".format(name=s.name, value=s.value,

0 commit comments

Comments
 (0)