From a1156fc687556f7283a1860c671dc275fb07d479 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Mon, 23 Sep 2024 01:24:52 +0530 Subject: [PATCH] completed param unit test cases Signed-off-by: Shashank Mittal --- .../suggestion/test_hyperopt_service.py | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/test/unit/v1beta1/suggestion/test_hyperopt_service.py b/test/unit/v1beta1/suggestion/test_hyperopt_service.py index e9594f3bec3..5b3f7832a86 100644 --- a/test/unit/v1beta1/suggestion/test_hyperopt_service.py +++ b/test/unit/v1beta1/suggestion/test_hyperopt_service.py @@ -212,37 +212,67 @@ def test_get_suggestion(self): name="param-10", parameter_type=api_pb2.DOUBLE, feasible_space=api_pb2.FeasibleSpace( - max="10", min="5", list=[], step="0.8", distribution=api_pb2.LOG_NORMAL) + max="10", min="5", list=[], distribution=api_pb2.NORMAL) ), api_pb2.ParameterSpec( name="param-11", - parameter_type=api_pb2.INT, + parameter_type=api_pb2.DOUBLE, feasible_space=api_pb2.FeasibleSpace( - max="64", min="32", distribution=api_pb2.LOG_NORMAL) + max="10", min="5", list=[], step="0.8", distribution=api_pb2.LOG_NORMAL) ), api_pb2.ParameterSpec( name="param-12", - parameter_type=api_pb2.INT, + parameter_type=api_pb2.DOUBLE, feasible_space=api_pb2.FeasibleSpace( - max="5", min="1", list=[], distribution=api_pb2.UNIFORM) + max="10", min="5", list=[], distribution=api_pb2.LOG_NORMAL) ), api_pb2.ParameterSpec( name="param-13", parameter_type=api_pb2.INT, feasible_space=api_pb2.FeasibleSpace( - max="10", min="5", list=[], step="0.8", distribution=api_pb2.UNIFORM) + max="5", min="1", list=[], distribution=api_pb2.UNIFORM) ), api_pb2.ParameterSpec( name="param-14", parameter_type=api_pb2.INT, feasible_space=api_pb2.FeasibleSpace( - max="10", min="5", list=[], distribution=api_pb2.LOG_UNIFORM) + max="5", min="1", list=[], step="0.8", distribution=api_pb2.UNIFORM) ), api_pb2.ParameterSpec( name="param-15", parameter_type=api_pb2.INT, feasible_space=api_pb2.FeasibleSpace( - max="100", min="5", list=[], step="0.8", distribution=api_pb2.NORMAL) + max="10", min="5", list=[], distribution=api_pb2.LOG_UNIFORM) + ), + api_pb2.ParameterSpec( + name="param-16", + parameter_type=api_pb2.INT, + feasible_space=api_pb2.FeasibleSpace( + max="10", min="5", list=[], step="0.01", distribution=api_pb2.LOG_UNIFORM) + ), + api_pb2.ParameterSpec( + name="param-17", + parameter_type=api_pb2.INT, + feasible_space=api_pb2.FeasibleSpace( + max="100", min="5", list=[], distribution=api_pb2.NORMAL) + ), + api_pb2.ParameterSpec( + name="param-18", + parameter_type=api_pb2.INT, + feasible_space=api_pb2.FeasibleSpace( + max="100", min="5", list=[], step="0.01", distribution=api_pb2.NORMAL) + ), + api_pb2.ParameterSpec( + name="param-19", + parameter_type=api_pb2.INT, + feasible_space=api_pb2.FeasibleSpace( + max="64", min="32", distribution=api_pb2.LOG_NORMAL) + ), + api_pb2.ParameterSpec( + name="param-20", + parameter_type=api_pb2.INT, + feasible_space=api_pb2.FeasibleSpace( + max="64", min="32", step="0.01", distribution=api_pb2.LOG_NORMAL) ) ] )