From f615e3fb6bca2c42b8c2b1318d4cdffb544a1c94 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Thu, 22 Aug 2024 03:29:59 +0530 Subject: [PATCH 01/11] hyperopt suggestion logic update Signed-off-by: Shashank Mittal --- .../v1beta1/hyperopt/base_service.py | 38 +++++++++++++++---- pkg/suggestion/v1beta1/internal/constant.py | 5 +++ .../v1beta1/internal/search_space.py | 26 ++++++++----- 3 files changed, 52 insertions(+), 17 deletions(-) diff --git a/pkg/suggestion/v1beta1/hyperopt/base_service.py b/pkg/suggestion/v1beta1/hyperopt/base_service.py index 894a98637bf..e5d1f20ba5a 100644 --- a/pkg/suggestion/v1beta1/hyperopt/base_service.py +++ b/pkg/suggestion/v1beta1/hyperopt/base_service.py @@ -22,6 +22,10 @@ from pkg.suggestion.v1beta1.internal.constant import DOUBLE from pkg.suggestion.v1beta1.internal.constant import INTEGER from pkg.suggestion.v1beta1.internal.constant import MAX_GOAL +from pkg.suggestion.v1beta1.internal.constant import UNIFORM +from pkg.suggestion.v1beta1.internal.constant import LOG_UNIFORM +from pkg.suggestion.v1beta1.internal.constant import NORMAL +from pkg.suggestion.v1beta1.internal.constant import LOG_NORMAL from pkg.suggestion.v1beta1.internal.trial import Assignment logger = logging.getLogger(__name__) @@ -61,16 +65,36 @@ def create_hyperopt_domain(self): hyperopt_search_space = {} for param in self.search_space.params: if param.type == INTEGER: - hyperopt_search_space[param.name] = hyperopt.hp.quniform( - param.name, - float(param.min), - float(param.max), - float(param.step)) - elif param.type == DOUBLE: - hyperopt_search_space[param.name] = hyperopt.hp.uniform( + hyperopt_search_space[param.name] = hyperopt.hp.uniformint( param.name, float(param.min), float(param.max)) + hyperopt.hp.uniform + elif param.type == DOUBLE: + if param.distribution == UNIFORM: + if param.step: + hyperopt_search_space[param.name] = hyperopt.hp.quniform( + param.name, + float(param.min), + float(param.max), + float(param.step)) + else: + hyperopt_search_space[param.name] = hyperopt.hp.uniform( + param.name, + float(param.min), + float(param.max)) + elif param.distribution == LOG_UNIFORM: + if param.step: + hyperopt_search_space[param.name] = hyperopt.hp.qloguniform( + param.name, + float(param.min), + float(param.max), + float(param.step)) + else: + hyperopt_search_space[param.name] = hyperopt.hp.loguniform( + param.name, + float(param.min), + float(param.max)) elif param.type == CATEGORICAL or param.type == DISCRETE: hyperopt_search_space[param.name] = hyperopt.hp.choice( param.name, param.list) diff --git a/pkg/suggestion/v1beta1/internal/constant.py b/pkg/suggestion/v1beta1/internal/constant.py index 98ee752d392..906a6ab4757 100644 --- a/pkg/suggestion/v1beta1/internal/constant.py +++ b/pkg/suggestion/v1beta1/internal/constant.py @@ -19,3 +19,8 @@ DOUBLE = "DOUBLE" CATEGORICAL = "CATEGORICAL" DISCRETE = "DISCRETE" + +UNIFORM = "UNIFORM" +LOG_UNIFORM = "LOG_UNIFORM" +NORMAL = "NORMAL" +LOG_NORMAL = "LOG_NORMAL" diff --git a/pkg/suggestion/v1beta1/internal/search_space.py b/pkg/suggestion/v1beta1/internal/search_space.py index d50955810e5..349a0cb190e 100644 --- a/pkg/suggestion/v1beta1/internal/search_space.py +++ b/pkg/suggestion/v1beta1/internal/search_space.py @@ -78,9 +78,9 @@ def convert_parameter(p): step = 1 if p.feasible_space.step is not None and p.feasible_space.step != "": step = p.feasible_space.step - return HyperParameter.int(p.name, p.feasible_space.min, p.feasible_space.max, step) + return HyperParameter.int(p.name, p.feasible_space.min, p.feasible_space.max, step, p.feasible_space.distribution) elif p.parameter_type == api.DOUBLE: - return HyperParameter.double(p.name, p.feasible_space.min, p.feasible_space.max, p.feasible_space.step) + return HyperParameter.double(p.name, p.feasible_space.min, p.feasible_space.max, p.feasible_space.step, p.feasible_space.distribution) elif p.parameter_type == api.CATEGORICAL: return HyperParameter.categorical(p.name, p.feasible_space.list) elif p.parameter_type == api.DISCRETE: @@ -91,29 +91,35 @@ def convert_parameter(p): class HyperParameter(object): - def __init__(self, name, type_, min_, max_, list_, step): + def __init__(self, name, type_, min_, max_, list_, step, distribution=None): self.name = name self.type = type_ self.min = min_ self.max = max_ self.list = list_ self.step = step + self.distribution = distribution def __str__(self): - if self.type == constant.INTEGER or self.type == constant.DOUBLE: - return "HyperParameter(name: {}, type: {}, min: {}, max: {}, step: {})".format( - self.name, self.type, self.min, self.max, self.step) + if self.type in [constant.INTEGER, constant.DOUBLE]: + return "HyperParameter(name: {}, type: {}, min: {}, max: {}, step: {}, distribution: {})".format( + self.name, self.type, self.min, self.max, self.step, self.distribution + ) else: return "HyperParameter(name: {}, type: {}, list: {})".format( self.name, self.type, ", ".join(self.list)) @staticmethod - def int(name, min_, max_, step): - return HyperParameter(name, constant.INTEGER, min_, max_, [], step) + def int(name, min_, max_, step, distribution=None): + return HyperParameter( + name, constant.INTEGER, min_, max_, [], step, distribution + ) @staticmethod - def double(name, min_, max_, step): - return HyperParameter(name, constant.DOUBLE, min_, max_, [], step) + def double(name, min_, max_, step, distribution=None): + return HyperParameter( + name, constant.DOUBLE, min_, max_, [], step, distribution + ) @staticmethod def categorical(name, lst): From a67f373710b68462a95c5cd56e3d7c52916c6a1a Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Sun, 25 Aug 2024 19:36:32 +0530 Subject: [PATCH 02/11] fix Signed-off-by: Shashank Mittal --- pkg/suggestion/v1beta1/hyperopt/base_service.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/suggestion/v1beta1/hyperopt/base_service.py b/pkg/suggestion/v1beta1/hyperopt/base_service.py index 4fc2ee4ccf7..6ad5bef5371 100644 --- a/pkg/suggestion/v1beta1/hyperopt/base_service.py +++ b/pkg/suggestion/v1beta1/hyperopt/base_service.py @@ -69,7 +69,6 @@ def create_hyperopt_domain(self): param.name, float(param.min), float(param.max)) - hyperopt.hp.uniform elif param.type == DOUBLE: if param.distribution == UNIFORM: if param.step: From 365c2f513f7f596832b0fe205d44cbb1f382261c Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Mon, 26 Aug 2024 13:38:14 +0530 Subject: [PATCH 03/11] DISTRIBUTION_UNKNOWN enum set to 0 in gRPC api Signed-off-by: Shashank Mittal --- pkg/apis/manager/v1beta1/api.pb.go | 44 ++++++++++----------- pkg/apis/manager/v1beta1/api.proto | 10 ++--- pkg/apis/manager/v1beta1/python/api_pb2.py | 2 +- pkg/apis/manager/v1beta1/python/api_pb2.pyi | 4 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pkg/apis/manager/v1beta1/api.pb.go b/pkg/apis/manager/v1beta1/api.pb.go index 862db115141..f59a70aa9fa 100644 --- a/pkg/apis/manager/v1beta1/api.pb.go +++ b/pkg/apis/manager/v1beta1/api.pb.go @@ -85,28 +85,28 @@ func (ParameterType) EnumDescriptor() ([]byte, []int) { type Distribution int32 const ( - Distribution_UNIFORM Distribution = 0 - Distribution_LOG_UNIFORM Distribution = 1 - Distribution_NORMAL Distribution = 2 - Distribution_LOG_NORMAL Distribution = 3 - Distribution_DISTRIBUTION_UNKNOWN Distribution = 4 + Distribution_DISTRIBUTION_UNKNOWN Distribution = 0 + Distribution_UNIFORM Distribution = 1 + Distribution_LOG_UNIFORM Distribution = 2 + Distribution_NORMAL Distribution = 3 + Distribution_LOG_NORMAL Distribution = 4 ) // Enum value maps for Distribution. var ( Distribution_name = map[int32]string{ - 0: "UNIFORM", - 1: "LOG_UNIFORM", - 2: "NORMAL", - 3: "LOG_NORMAL", - 4: "DISTRIBUTION_UNKNOWN", + 0: "DISTRIBUTION_UNKNOWN", + 1: "UNIFORM", + 2: "LOG_UNIFORM", + 3: "NORMAL", + 4: "LOG_NORMAL", } Distribution_value = map[string]int32{ - "UNIFORM": 0, - "LOG_UNIFORM": 1, - "NORMAL": 2, - "LOG_NORMAL": 3, - "DISTRIBUTION_UNKNOWN": 4, + "DISTRIBUTION_UNKNOWN": 0, + "UNIFORM": 1, + "LOG_UNIFORM": 2, + "NORMAL": 3, + "LOG_NORMAL": 4, } ) @@ -608,7 +608,7 @@ func (x *FeasibleSpace) GetDistribution() Distribution { if x != nil { return x.Distribution } - return Distribution_UNIFORM + return Distribution_DISTRIBUTION_UNKNOWN } // * @@ -3038,12 +3038,12 @@ var file_api_proto_rawDesc = []byte{ 0x0a, 0x03, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x43, 0x52, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x04, 0x2a, 0x62, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, - 0x4d, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x47, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, - 0x52, 0x4d, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x02, - 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x47, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x03, - 0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x04, 0x2a, 0x38, 0x0a, 0x0d, 0x4f, 0x62, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, + 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x01, 0x12, 0x0f, 0x0a, + 0x0b, 0x4c, 0x4f, 0x47, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, + 0x47, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x04, 0x2a, 0x38, 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x49, 0x4e, 0x49, 0x4d, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, 0x58, 0x49, 0x4d, 0x49, diff --git a/pkg/apis/manager/v1beta1/api.proto b/pkg/apis/manager/v1beta1/api.proto index f3fabf977dc..3cd290e1254 100644 --- a/pkg/apis/manager/v1beta1/api.proto +++ b/pkg/apis/manager/v1beta1/api.proto @@ -101,11 +101,11 @@ enum ParameterType { * Distribution types for HyperParameter. */ enum Distribution { - UNIFORM = 0; - LOG_UNIFORM = 1; - NORMAL = 2; - LOG_NORMAL = 3; - DISTRIBUTION_UNKNOWN = 4; + DISTRIBUTION_UNKNOWN = 0; + UNIFORM = 1; + LOG_UNIFORM = 2; + NORMAL = 3; + LOG_NORMAL = 4; } /** diff --git a/pkg/apis/manager/v1beta1/python/api_pb2.py b/pkg/apis/manager/v1beta1/python/api_pb2.py index 3a95a64b82b..0677ff705fe 100644 --- a/pkg/apis/manager/v1beta1/python/api_pb2.py +++ b/pkg/apis/manager/v1beta1/python/api_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tapi.proto\x12\x0c\x61pi.v1.beta1\"R\n\nExperiment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x04spec\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ExperimentSpecR\x04spec\"\x85\x04\n\x0e\x45xperimentSpec\x12T\n\x0fparameter_specs\x18\x01 \x01(\x0b\x32+.api.v1.beta1.ExperimentSpec.ParameterSpecsR\x0eparameterSpecs\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x39\n\talgorithm\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12\x46\n\x0e\x65\x61rly_stopping\x18\x04 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\x12\x30\n\x14parallel_trial_count\x18\x05 \x01(\x05R\x12parallelTrialCount\x12&\n\x0fmax_trial_count\x18\x06 \x01(\x05R\rmaxTrialCount\x12\x36\n\nnas_config\x18\x07 \x01(\x0b\x32\x17.api.v1.beta1.NasConfigR\tnasConfig\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"\xab\x01\n\rParameterSpec\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x42\n\x0eparameter_type\x18\x02 \x01(\x0e\x32\x1b.api.v1.beta1.ParameterTypeR\rparameterType\x12\x42\n\x0e\x66\x65\x61sible_space\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.FeasibleSpaceR\rfeasibleSpace\"\x9b\x01\n\rFeasibleSpace\x12\x10\n\x03max\x18\x01 \x01(\tR\x03max\x12\x10\n\x03min\x18\x02 \x01(\tR\x03min\x12\x12\n\x04list\x18\x03 \x03(\tR\x04list\x12\x12\n\x04step\x18\x04 \x01(\tR\x04step\x12>\n\x0c\x64istribution\x18\x05 \x01(\x0e\x32\x1a.api.v1.beta1.DistributionR\x0c\x64istribution\"\xc0\x01\n\rObjectiveSpec\x12/\n\x04type\x18\x01 \x01(\x0e\x32\x1b.api.v1.beta1.ObjectiveTypeR\x04type\x12\x12\n\x04goal\x18\x02 \x01(\x01R\x04goal\x12\x32\n\x15objective_metric_name\x18\x03 \x01(\tR\x13objectiveMetricName\x12\x36\n\x17\x61\x64\x64itional_metric_names\x18\x04 \x03(\tR\x15\x61\x64\x64itionalMetricNames\"\x85\x01\n\rAlgorithmSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12M\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\x1e.api.v1.beta1.AlgorithmSettingR\x11\x61lgorithmSettings\"<\n\x10\x41lgorithmSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x8d\x01\n\x11\x45\x61rlyStoppingSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12Q\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\".api.v1.beta1.EarlyStoppingSettingR\x11\x61lgorithmSettings\"@\n\x14\x45\x61rlyStoppingSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xd2\x01\n\tNasConfig\x12<\n\x0cgraph_config\x18\x01 \x01(\x0b\x32\x19.api.v1.beta1.GraphConfigR\x0bgraphConfig\x12\x42\n\noperations\x18\x02 \x01(\x0b\x32\".api.v1.beta1.NasConfig.OperationsR\noperations\x1a\x43\n\nOperations\x12\x35\n\toperation\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.OperationR\toperation\"p\n\x0bGraphConfig\x12\x1d\n\nnum_layers\x18\x01 \x01(\x05R\tnumLayers\x12\x1f\n\x0binput_sizes\x18\x02 \x03(\x05R\ninputSizes\x12!\n\x0coutput_sizes\x18\x03 \x03(\x05R\x0boutputSizes\"\xd2\x01\n\tOperation\x12%\n\x0eoperation_type\x18\x01 \x01(\tR\roperationType\x12O\n\x0fparameter_specs\x18\x02 \x01(\x0b\x32&.api.v1.beta1.Operation.ParameterSpecsR\x0eparameterSpecs\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"{\n\x05Trial\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12+\n\x04spec\x18\x02 \x01(\x0b\x32\x17.api.v1.beta1.TrialSpecR\x04spec\x12\x31\n\x06status\x18\x03 \x01(\x0b\x32\x19.api.v1.beta1.TrialStatusR\x06status\"\xfe\x02\n\tTrialSpec\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x61\n\x15parameter_assignments\x18\x03 \x01(\x0b\x32,.api.v1.beta1.TrialSpec.ParameterAssignmentsR\x14parameterAssignments\x12;\n\x06labels\x18\x04 \x03(\x0b\x32#.api.v1.beta1.TrialSpec.LabelsEntryR\x06labels\x1a[\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"?\n\x13ParameterAssignment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xed\x02\n\x0bTrialStatus\x12\x1d\n\nstart_time\x18\x01 \x01(\tR\tstartTime\x12\'\n\x0f\x63ompletion_time\x18\x02 \x01(\tR\x0e\x63ompletionTime\x12J\n\tcondition\x18\x03 \x01(\x0e\x32,.api.v1.beta1.TrialStatus.TrialConditionTypeR\tcondition\x12;\n\x0bobservation\x18\x04 \x01(\x0b\x32\x19.api.v1.beta1.ObservationR\x0bobservation\"\x8c\x01\n\x12TrialConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06KILLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x16\n\x12METRICSUNAVAILABLE\x10\x05\x12\x10\n\x0c\x45\x41RLYSTOPPED\x10\x06\x12\x0b\n\x07UNKNOWN\x10\x07\"=\n\x0bObservation\x12.\n\x07metrics\x18\x01 \x03(\x0b\x32\x14.api.v1.beta1.MetricR\x07metrics\"2\n\x06Metric\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x83\x01\n\x1bReportObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x45\n\x0fobservation_log\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"\x1b\n\x19ReportObservationLogReply\"J\n\x0eObservationLog\x12\x38\n\x0bmetric_logs\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.MetricLogR\nmetricLogs\"X\n\tMetricLog\x12\x1d\n\ntime_stamp\x18\x01 \x01(\tR\ttimeStamp\x12,\n\x06metric\x18\x02 \x01(\x0b\x32\x14.api.v1.beta1.MetricR\x06metric\"\x94\x01\n\x18GetObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x1f\n\x0bmetric_name\x18\x02 \x01(\tR\nmetricName\x12\x1d\n\nstart_time\x18\x03 \x01(\tR\tstartTime\x12\x19\n\x08\x65nd_time\x18\x04 \x01(\tR\x07\x65ndTime\"_\n\x16GetObservationLogReply\x12\x45\n\x0fobservation_log\x18\x01 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"<\n\x1b\x44\x65leteObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x1b\n\x19\x44\x65leteObservationLogReply\"\xe6\x01\n\x15GetSuggestionsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12\x34\n\x16\x63urrent_request_number\x18\x04 \x01(\x05R\x14\x63urrentRequestNumber\x12\x30\n\x14total_request_number\x18\x05 \x01(\x05R\x12totalRequestNumber\"\xa4\x04\n\x13GetSuggestionsReply\x12k\n\x15parameter_assignments\x18\x01 \x03(\x0b\x32\x36.api.v1.beta1.GetSuggestionsReply.ParameterAssignmentsR\x14parameterAssignments\x12\x39\n\talgorithm\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x03 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\x1a\x91\x02\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x12\x1d\n\ntrial_name\x18\x02 \x01(\tR\ttrialName\x12Z\n\x06labels\x18\x03 \x03(\x0b\x32\x42.api.v1.beta1.GetSuggestionsReply.ParameterAssignments.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\\\n ValidateAlgorithmSettingsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\" \n\x1eValidateAlgorithmSettingsReply\"\xb3\x01\n\x1cGetEarlyStoppingRulesRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12,\n\x12\x64\x62_manager_address\x18\x03 \x01(\tR\x10\x64\x62ManagerAddress\"o\n\x1aGetEarlyStoppingRulesReply\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x01 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\"\x9a\x01\n\x11\x45\x61rlyStoppingRule\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\x12<\n\ncomparison\x18\x03 \x01(\x0e\x32\x1c.api.v1.beta1.ComparisonTypeR\ncomparison\x12\x1d\n\nstart_step\x18\x04 \x01(\x05R\tstartStep\"n\n$ValidateEarlyStoppingSettingsRequest\x12\x46\n\x0e\x65\x61rly_stopping\x18\x01 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\"$\n\"ValidateEarlyStoppingSettingsReply\"6\n\x15SetTrialStatusRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x15\n\x13SetTrialStatusReply*U\n\rParameterType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x44OUBLE\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0c\n\x08\x44ISCRETE\x10\x03\x12\x0f\n\x0b\x43\x41TEGORICAL\x10\x04*b\n\x0c\x44istribution\x12\x0b\n\x07UNIFORM\x10\x00\x12\x0f\n\x0bLOG_UNIFORM\x10\x01\x12\n\n\x06NORMAL\x10\x02\x12\x0e\n\nLOG_NORMAL\x10\x03\x12\x18\n\x14\x44ISTRIBUTION_UNKNOWN\x10\x04*8\n\rObjectiveType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08MINIMIZE\x10\x01\x12\x0c\n\x08MAXIMIZE\x10\x02*J\n\x0e\x43omparisonType\x12\x16\n\x12UNKNOWN_COMPARISON\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\x08\n\x04LESS\x10\x02\x12\x0b\n\x07GREATER\x10\x03\x32\xc6\x02\n\tDBManager\x12j\n\x14ReportObservationLog\x12).api.v1.beta1.ReportObservationLogRequest\x1a\'.api.v1.beta1.ReportObservationLogReply\x12\x61\n\x11GetObservationLog\x12&.api.v1.beta1.GetObservationLogRequest\x1a$.api.v1.beta1.GetObservationLogReply\x12j\n\x14\x44\x65leteObservationLog\x12).api.v1.beta1.DeleteObservationLogRequest\x1a\'.api.v1.beta1.DeleteObservationLogReply2\xe1\x01\n\nSuggestion\x12X\n\x0eGetSuggestions\x12#.api.v1.beta1.GetSuggestionsRequest\x1a!.api.v1.beta1.GetSuggestionsReply\x12y\n\x19ValidateAlgorithmSettings\x12..api.v1.beta1.ValidateAlgorithmSettingsRequest\x1a,.api.v1.beta1.ValidateAlgorithmSettingsReply2\xe0\x02\n\rEarlyStopping\x12m\n\x15GetEarlyStoppingRules\x12*.api.v1.beta1.GetEarlyStoppingRulesRequest\x1a(.api.v1.beta1.GetEarlyStoppingRulesReply\x12X\n\x0eSetTrialStatus\x12#.api.v1.beta1.SetTrialStatusRequest\x1a!.api.v1.beta1.SetTrialStatusReply\x12\x85\x01\n\x1dValidateEarlyStoppingSettings\x12\x32.api.v1.beta1.ValidateEarlyStoppingSettingsRequest\x1a\x30.api.v1.beta1.ValidateEarlyStoppingSettingsReplyBAZ?github.com/kubeflow/katib/pkg/apis/manager/v1beta1;api_v1_beta1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tapi.proto\x12\x0c\x61pi.v1.beta1\"R\n\nExperiment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x04spec\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ExperimentSpecR\x04spec\"\x85\x04\n\x0e\x45xperimentSpec\x12T\n\x0fparameter_specs\x18\x01 \x01(\x0b\x32+.api.v1.beta1.ExperimentSpec.ParameterSpecsR\x0eparameterSpecs\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x39\n\talgorithm\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12\x46\n\x0e\x65\x61rly_stopping\x18\x04 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\x12\x30\n\x14parallel_trial_count\x18\x05 \x01(\x05R\x12parallelTrialCount\x12&\n\x0fmax_trial_count\x18\x06 \x01(\x05R\rmaxTrialCount\x12\x36\n\nnas_config\x18\x07 \x01(\x0b\x32\x17.api.v1.beta1.NasConfigR\tnasConfig\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"\xab\x01\n\rParameterSpec\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x42\n\x0eparameter_type\x18\x02 \x01(\x0e\x32\x1b.api.v1.beta1.ParameterTypeR\rparameterType\x12\x42\n\x0e\x66\x65\x61sible_space\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.FeasibleSpaceR\rfeasibleSpace\"\x9b\x01\n\rFeasibleSpace\x12\x10\n\x03max\x18\x01 \x01(\tR\x03max\x12\x10\n\x03min\x18\x02 \x01(\tR\x03min\x12\x12\n\x04list\x18\x03 \x03(\tR\x04list\x12\x12\n\x04step\x18\x04 \x01(\tR\x04step\x12>\n\x0c\x64istribution\x18\x05 \x01(\x0e\x32\x1a.api.v1.beta1.DistributionR\x0c\x64istribution\"\xc0\x01\n\rObjectiveSpec\x12/\n\x04type\x18\x01 \x01(\x0e\x32\x1b.api.v1.beta1.ObjectiveTypeR\x04type\x12\x12\n\x04goal\x18\x02 \x01(\x01R\x04goal\x12\x32\n\x15objective_metric_name\x18\x03 \x01(\tR\x13objectiveMetricName\x12\x36\n\x17\x61\x64\x64itional_metric_names\x18\x04 \x03(\tR\x15\x61\x64\x64itionalMetricNames\"\x85\x01\n\rAlgorithmSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12M\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\x1e.api.v1.beta1.AlgorithmSettingR\x11\x61lgorithmSettings\"<\n\x10\x41lgorithmSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x8d\x01\n\x11\x45\x61rlyStoppingSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12Q\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\".api.v1.beta1.EarlyStoppingSettingR\x11\x61lgorithmSettings\"@\n\x14\x45\x61rlyStoppingSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xd2\x01\n\tNasConfig\x12<\n\x0cgraph_config\x18\x01 \x01(\x0b\x32\x19.api.v1.beta1.GraphConfigR\x0bgraphConfig\x12\x42\n\noperations\x18\x02 \x01(\x0b\x32\".api.v1.beta1.NasConfig.OperationsR\noperations\x1a\x43\n\nOperations\x12\x35\n\toperation\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.OperationR\toperation\"p\n\x0bGraphConfig\x12\x1d\n\nnum_layers\x18\x01 \x01(\x05R\tnumLayers\x12\x1f\n\x0binput_sizes\x18\x02 \x03(\x05R\ninputSizes\x12!\n\x0coutput_sizes\x18\x03 \x03(\x05R\x0boutputSizes\"\xd2\x01\n\tOperation\x12%\n\x0eoperation_type\x18\x01 \x01(\tR\roperationType\x12O\n\x0fparameter_specs\x18\x02 \x01(\x0b\x32&.api.v1.beta1.Operation.ParameterSpecsR\x0eparameterSpecs\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"{\n\x05Trial\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12+\n\x04spec\x18\x02 \x01(\x0b\x32\x17.api.v1.beta1.TrialSpecR\x04spec\x12\x31\n\x06status\x18\x03 \x01(\x0b\x32\x19.api.v1.beta1.TrialStatusR\x06status\"\xfe\x02\n\tTrialSpec\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x61\n\x15parameter_assignments\x18\x03 \x01(\x0b\x32,.api.v1.beta1.TrialSpec.ParameterAssignmentsR\x14parameterAssignments\x12;\n\x06labels\x18\x04 \x03(\x0b\x32#.api.v1.beta1.TrialSpec.LabelsEntryR\x06labels\x1a[\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"?\n\x13ParameterAssignment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xed\x02\n\x0bTrialStatus\x12\x1d\n\nstart_time\x18\x01 \x01(\tR\tstartTime\x12\'\n\x0f\x63ompletion_time\x18\x02 \x01(\tR\x0e\x63ompletionTime\x12J\n\tcondition\x18\x03 \x01(\x0e\x32,.api.v1.beta1.TrialStatus.TrialConditionTypeR\tcondition\x12;\n\x0bobservation\x18\x04 \x01(\x0b\x32\x19.api.v1.beta1.ObservationR\x0bobservation\"\x8c\x01\n\x12TrialConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06KILLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x16\n\x12METRICSUNAVAILABLE\x10\x05\x12\x10\n\x0c\x45\x41RLYSTOPPED\x10\x06\x12\x0b\n\x07UNKNOWN\x10\x07\"=\n\x0bObservation\x12.\n\x07metrics\x18\x01 \x03(\x0b\x32\x14.api.v1.beta1.MetricR\x07metrics\"2\n\x06Metric\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x83\x01\n\x1bReportObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x45\n\x0fobservation_log\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"\x1b\n\x19ReportObservationLogReply\"J\n\x0eObservationLog\x12\x38\n\x0bmetric_logs\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.MetricLogR\nmetricLogs\"X\n\tMetricLog\x12\x1d\n\ntime_stamp\x18\x01 \x01(\tR\ttimeStamp\x12,\n\x06metric\x18\x02 \x01(\x0b\x32\x14.api.v1.beta1.MetricR\x06metric\"\x94\x01\n\x18GetObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x1f\n\x0bmetric_name\x18\x02 \x01(\tR\nmetricName\x12\x1d\n\nstart_time\x18\x03 \x01(\tR\tstartTime\x12\x19\n\x08\x65nd_time\x18\x04 \x01(\tR\x07\x65ndTime\"_\n\x16GetObservationLogReply\x12\x45\n\x0fobservation_log\x18\x01 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"<\n\x1b\x44\x65leteObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x1b\n\x19\x44\x65leteObservationLogReply\"\xe6\x01\n\x15GetSuggestionsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12\x34\n\x16\x63urrent_request_number\x18\x04 \x01(\x05R\x14\x63urrentRequestNumber\x12\x30\n\x14total_request_number\x18\x05 \x01(\x05R\x12totalRequestNumber\"\xa4\x04\n\x13GetSuggestionsReply\x12k\n\x15parameter_assignments\x18\x01 \x03(\x0b\x32\x36.api.v1.beta1.GetSuggestionsReply.ParameterAssignmentsR\x14parameterAssignments\x12\x39\n\talgorithm\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x03 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\x1a\x91\x02\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x12\x1d\n\ntrial_name\x18\x02 \x01(\tR\ttrialName\x12Z\n\x06labels\x18\x03 \x03(\x0b\x32\x42.api.v1.beta1.GetSuggestionsReply.ParameterAssignments.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\\\n ValidateAlgorithmSettingsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\" \n\x1eValidateAlgorithmSettingsReply\"\xb3\x01\n\x1cGetEarlyStoppingRulesRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12,\n\x12\x64\x62_manager_address\x18\x03 \x01(\tR\x10\x64\x62ManagerAddress\"o\n\x1aGetEarlyStoppingRulesReply\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x01 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\"\x9a\x01\n\x11\x45\x61rlyStoppingRule\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\x12<\n\ncomparison\x18\x03 \x01(\x0e\x32\x1c.api.v1.beta1.ComparisonTypeR\ncomparison\x12\x1d\n\nstart_step\x18\x04 \x01(\x05R\tstartStep\"n\n$ValidateEarlyStoppingSettingsRequest\x12\x46\n\x0e\x65\x61rly_stopping\x18\x01 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\"$\n\"ValidateEarlyStoppingSettingsReply\"6\n\x15SetTrialStatusRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x15\n\x13SetTrialStatusReply*U\n\rParameterType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x44OUBLE\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0c\n\x08\x44ISCRETE\x10\x03\x12\x0f\n\x0b\x43\x41TEGORICAL\x10\x04*b\n\x0c\x44istribution\x12\x18\n\x14\x44ISTRIBUTION_UNKNOWN\x10\x00\x12\x0b\n\x07UNIFORM\x10\x01\x12\x0f\n\x0bLOG_UNIFORM\x10\x02\x12\n\n\x06NORMAL\x10\x03\x12\x0e\n\nLOG_NORMAL\x10\x04*8\n\rObjectiveType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08MINIMIZE\x10\x01\x12\x0c\n\x08MAXIMIZE\x10\x02*J\n\x0e\x43omparisonType\x12\x16\n\x12UNKNOWN_COMPARISON\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\x08\n\x04LESS\x10\x02\x12\x0b\n\x07GREATER\x10\x03\x32\xc6\x02\n\tDBManager\x12j\n\x14ReportObservationLog\x12).api.v1.beta1.ReportObservationLogRequest\x1a\'.api.v1.beta1.ReportObservationLogReply\x12\x61\n\x11GetObservationLog\x12&.api.v1.beta1.GetObservationLogRequest\x1a$.api.v1.beta1.GetObservationLogReply\x12j\n\x14\x44\x65leteObservationLog\x12).api.v1.beta1.DeleteObservationLogRequest\x1a\'.api.v1.beta1.DeleteObservationLogReply2\xe1\x01\n\nSuggestion\x12X\n\x0eGetSuggestions\x12#.api.v1.beta1.GetSuggestionsRequest\x1a!.api.v1.beta1.GetSuggestionsReply\x12y\n\x19ValidateAlgorithmSettings\x12..api.v1.beta1.ValidateAlgorithmSettingsRequest\x1a,.api.v1.beta1.ValidateAlgorithmSettingsReply2\xe0\x02\n\rEarlyStopping\x12m\n\x15GetEarlyStoppingRules\x12*.api.v1.beta1.GetEarlyStoppingRulesRequest\x1a(.api.v1.beta1.GetEarlyStoppingRulesReply\x12X\n\x0eSetTrialStatus\x12#.api.v1.beta1.SetTrialStatusRequest\x1a!.api.v1.beta1.SetTrialStatusReply\x12\x85\x01\n\x1dValidateEarlyStoppingSettings\x12\x32.api.v1.beta1.ValidateEarlyStoppingSettingsRequest\x1a\x30.api.v1.beta1.ValidateEarlyStoppingSettingsReplyBAZ?github.com/kubeflow/katib/pkg/apis/manager/v1beta1;api_v1_beta1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) diff --git a/pkg/apis/manager/v1beta1/python/api_pb2.pyi b/pkg/apis/manager/v1beta1/python/api_pb2.pyi index 21cbb161d77..721aa6d3fd3 100644 --- a/pkg/apis/manager/v1beta1/python/api_pb2.pyi +++ b/pkg/apis/manager/v1beta1/python/api_pb2.pyi @@ -16,11 +16,11 @@ class ParameterType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): class Distribution(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () + DISTRIBUTION_UNKNOWN: _ClassVar[Distribution] UNIFORM: _ClassVar[Distribution] LOG_UNIFORM: _ClassVar[Distribution] NORMAL: _ClassVar[Distribution] LOG_NORMAL: _ClassVar[Distribution] - DISTRIBUTION_UNKNOWN: _ClassVar[Distribution] class ObjectiveType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () @@ -39,11 +39,11 @@ DOUBLE: ParameterType INT: ParameterType DISCRETE: ParameterType CATEGORICAL: ParameterType +DISTRIBUTION_UNKNOWN: Distribution UNIFORM: Distribution LOG_UNIFORM: Distribution NORMAL: Distribution LOG_NORMAL: Distribution -DISTRIBUTION_UNKNOWN: Distribution UNKNOWN: ObjectiveType MINIMIZE: ObjectiveType MAXIMIZE: ObjectiveType From caa2422d08e65e8f20f2a0d8d80562245e2ef0a1 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Mon, 26 Aug 2024 20:00:59 +0530 Subject: [PATCH 04/11] convert parameter method fix Signed-off-by: Shashank Mittal validation fix add e2e tests for hyperopt added e2e test to workflow --- .github/workflows/e2e-test-pytorch-mnist.yaml | 3 +- .../hp-tuning/hyperopt-distribution.yaml | 60 +++++++++++++++++++ .../suggestionclient/suggestionclient.go | 8 --- .../v1beta1/hyperopt/base_service.py | 55 +++++++++-------- .../v1beta1/internal/search_space.py | 37 ++++++++---- .../suggestion/test_hyperopt_service.py | 7 +++ 6 files changed, 125 insertions(+), 45 deletions(-) create mode 100644 examples/v1beta1/hp-tuning/hyperopt-distribution.yaml diff --git a/.github/workflows/e2e-test-pytorch-mnist.yaml b/.github/workflows/e2e-test-pytorch-mnist.yaml index dd715975166..3a5ff7e1bc0 100644 --- a/.github/workflows/e2e-test-pytorch-mnist.yaml +++ b/.github/workflows/e2e-test-pytorch-mnist.yaml @@ -41,5 +41,6 @@ jobs: - "long-running-resume,from-volume-resume,median-stop" # others - "grid,bayesian-optimization,tpe,multivariate-tpe,cma-es,hyperband" + - "hyperopt-distribution" - "file-metrics-collector,pytorchjob-mnist" - - "median-stop-with-json-format,file-metrics-collector-with-json-format" + - "median-stop-with-json-format,file-metrics-collector-with-json-format" \ No newline at end of file diff --git a/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml b/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml new file mode 100644 index 00000000000..ea326124c27 --- /dev/null +++ b/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: kubeflow.org/v1beta1 +kind: Experiment +metadata: + namespace: kubeflow + name: hyperopt-distribution +spec: + objective: + type: minimize + goal: 0.001 + objectiveMetricName: loss + algorithm: + algorithmName: random + parallelTrialCount: 3 + maxTrialCount: 12 + maxFailedTrialCount: 3 + parameters: + - name: lr + parameterType: double + feasibleSpace: + min: "0.01" + max: "0.05" + step: "0.01" + distribution: "uniform" + - name: momentum + parameterType: double + feasibleSpace: + min: "0.5" + max: "0.9" + distribution: "logUniform" + trialTemplate: + primaryContainerName: training-container + trialParameters: + - name: learningRate + description: Learning rate for the training model + reference: lr + - name: momentum + description: Momentum for the training model + reference: momentum + trialSpec: + apiVersion: batch/v1 + kind: Job + spec: + template: + spec: + containers: + - name: training-container + image: docker.io/kubeflowkatib/pytorch-mnist-cpu:latest + command: + - "python3" + - "/opt/pytorch-mnist/mnist.py" + - "--epochs=1" + - "--batch-size=16" + - "--lr=${trialParameters.learningRate}" + - "--momentum=${trialParameters.momentum}" + resources: + limits: + memory: "1Gi" + cpu: "0.5" + restartPolicy: Never diff --git a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go index b77949ac9e5..e18baac6502 100644 --- a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go +++ b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go @@ -533,14 +533,6 @@ func convertParameterType(typ experimentsv1beta1.ParameterType) suggestionapi.Pa func convertFeasibleSpace(fs experimentsv1beta1.FeasibleSpace) *suggestionapi.FeasibleSpace { distribution := convertDistribution(fs.Distribution) - if distribution == suggestionapi.Distribution_DISTRIBUTION_UNKNOWN { - return &suggestionapi.FeasibleSpace{ - Max: fs.Max, - Min: fs.Min, - List: fs.List, - Step: fs.Step, - } - } return &suggestionapi.FeasibleSpace{ Max: fs.Max, diff --git a/pkg/suggestion/v1beta1/hyperopt/base_service.py b/pkg/suggestion/v1beta1/hyperopt/base_service.py index 6ad5bef5371..d38ad00d5e6 100644 --- a/pkg/suggestion/v1beta1/hyperopt/base_service.py +++ b/pkg/suggestion/v1beta1/hyperopt/base_service.py @@ -17,15 +17,15 @@ import hyperopt import numpy as np -from pkg.suggestion.v1beta1.internal.constant import CATEGORICAL -from pkg.suggestion.v1beta1.internal.constant import DISCRETE -from pkg.suggestion.v1beta1.internal.constant import DOUBLE -from pkg.suggestion.v1beta1.internal.constant import INTEGER -from pkg.suggestion.v1beta1.internal.constant import MAX_GOAL -from pkg.suggestion.v1beta1.internal.constant import UNIFORM -from pkg.suggestion.v1beta1.internal.constant import LOG_UNIFORM -from pkg.suggestion.v1beta1.internal.constant import NORMAL -from pkg.suggestion.v1beta1.internal.constant import LOG_NORMAL +from pkg.suggestion.v1beta1.internal.constant import ( + CATEGORICAL, + DISCRETE, + DOUBLE, + INTEGER, + LOG_UNIFORM, + MAX_GOAL, + UNIFORM, +) from pkg.suggestion.v1beta1.internal.trial import Assignment logger = logging.getLogger(__name__) @@ -66,34 +66,37 @@ def create_hyperopt_domain(self): for param in self.search_space.params: if param.type == INTEGER: hyperopt_search_space[param.name] = hyperopt.hp.uniformint( - param.name, - float(param.min), - float(param.max)) + param.name, float(param.min), float(param.max) + ) elif param.type == DOUBLE: if param.distribution == UNIFORM: if param.step: hyperopt_search_space[param.name] = hyperopt.hp.quniform( - param.name, - float(param.min), - float(param.max), - float(param.step)) + param.name, + float(param.min), + float(param.max), + float(param.step), + ) else: hyperopt_search_space[param.name] = hyperopt.hp.uniform( - param.name, - float(param.min), - float(param.max)) + param.name, float(param.min), float(param.max) + ) elif param.distribution == LOG_UNIFORM: if param.step: hyperopt_search_space[param.name] = hyperopt.hp.qloguniform( - param.name, - float(param.min), - float(param.max), - float(param.step)) + param.name, + float(param.min), + float(param.max), + float(param.step), + ) else: hyperopt_search_space[param.name] = hyperopt.hp.loguniform( - param.name, - float(param.min), - float(param.max)) + param.name, float(param.min), float(param.max) + ) + else: + hyperopt_search_space[param.name] = hyperopt.hp.uniform( + param.name, float(param.min), float(param.max) + ) elif param.type == CATEGORICAL or param.type == DISCRETE: hyperopt_search_space[param.name] = hyperopt.hp.choice( param.name, param.list diff --git a/pkg/suggestion/v1beta1/internal/search_space.py b/pkg/suggestion/v1beta1/internal/search_space.py index f8d14c537f8..4ce82e6b72d 100644 --- a/pkg/suggestion/v1beta1/internal/search_space.py +++ b/pkg/suggestion/v1beta1/internal/search_space.py @@ -82,18 +82,36 @@ def __str__(self): @staticmethod def convert_parameter(p): + distribution = ( + p.feasible_space.distribution + if p.feasible_space.distribution != "" + and p.feasible_space.distribution is not None + and p.feasible_space.distribution != api.DISTRIBUTION_UNKNOWN + else None + ) + if p.parameter_type == api.INT: # Default value for INT parameter step is 1 - step = 1 - if p.feasible_space.step is not None and p.feasible_space.step != "": - step = p.feasible_space.step - return HyperParameter.int(p.name, p.feasible_space.min, p.feasible_space.max, step, p.feasible_space.distribution) + step = p.feasible_space.step if p.feasible_space.step else 1 + return HyperParameter.int( + p.name, p.feasible_space.min, p.feasible_space.max, step, distribution + ) + elif p.parameter_type == api.DOUBLE: - return HyperParameter.double(p.name, p.feasible_space.min, p.feasible_space.max, p.feasible_space.step, p.feasible_space.distribution) + return HyperParameter.double( + p.name, + p.feasible_space.min, + p.feasible_space.max, + p.feasible_space.step, + distribution, + ) + elif p.parameter_type == api.CATEGORICAL: return HyperParameter.categorical(p.name, p.feasible_space.list) + elif p.parameter_type == api.DISCRETE: return HyperParameter.discrete(p.name, p.feasible_space.list) + else: logger.error( "Cannot get the type for the parameter: %s (%s)", @@ -114,8 +132,9 @@ def __init__(self, name, type_, min_, max_, list_, step, distribution=None): def __str__(self): if self.type in [constant.INTEGER, constant.DOUBLE]: - return "HyperParameter(name: {}, type: {}, min: {}, max: {}, step: {}, distribution: {})".format( - self.name, self.type, self.min, self.max, self.step, self.distribution + return ( + f"HyperParameter(name: {self.name}, type: {self.type}, min: {self.min}, " + f"max: {self.max}, step: {self.step}, distribution: {self.distribution})" ) else: return "HyperParameter(name: {}, type: {}, list: {})".format( @@ -130,9 +149,7 @@ def int(name, min_, max_, step, distribution=None): @staticmethod def double(name, min_, max_, step, distribution=None): - return HyperParameter( - name, constant.DOUBLE, min_, max_, [], step, distribution - ) + return HyperParameter(name, constant.DOUBLE, min_, max_, [], step, distribution) @staticmethod def categorical(name, lst): diff --git a/test/unit/v1beta1/suggestion/test_hyperopt_service.py b/test/unit/v1beta1/suggestion/test_hyperopt_service.py index 30486efa5d4..c726115d9f4 100644 --- a/test/unit/v1beta1/suggestion/test_hyperopt_service.py +++ b/test/unit/v1beta1/suggestion/test_hyperopt_service.py @@ -20,6 +20,7 @@ from pkg.apis.manager.v1beta1.python import api_pb2 from pkg.suggestion.v1beta1.hyperopt.service import HyperoptService +from pkg.suggestion.v1beta1.internal.constant import LOG_UNIFORM class TestHyperopt(unittest.TestCase): @@ -176,6 +177,12 @@ def test_get_suggestion(self): parameter_type=api_pb2.DOUBLE, feasible_space=api_pb2.FeasibleSpace( max="5", min="1", list=[]) + ), + api_pb2.ParameterSpec( + name="param-5", + parameter_type=api_pb2.DOUBLE, + feasible_space=api_pb2.FeasibleSpace( + max="5", min="1", list=[], step="0.5", distribution=api_pb2.LOG_UNIFORM) ) ] ) From 0f38a5106f06558356f04b06d18cc6a2caa0279e Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Tue, 3 Sep 2024 13:56:43 +0530 Subject: [PATCH 05/11] convert feasibleSpace func updated Signed-off-by: Shashank Mittal --- .../suggestion/suggestionclient/suggestionclient.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go index e18baac6502..aade50b24ef 100644 --- a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go +++ b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go @@ -532,14 +532,12 @@ func convertParameterType(typ experimentsv1beta1.ParameterType) suggestionapi.Pa } func convertFeasibleSpace(fs experimentsv1beta1.FeasibleSpace) *suggestionapi.FeasibleSpace { - distribution := convertDistribution(fs.Distribution) - return &suggestionapi.FeasibleSpace{ Max: fs.Max, Min: fs.Min, List: fs.List, Step: fs.Step, - Distribution: distribution, + Distribution: convertDistribution(fs.Distribution), } } From ae9fa344a78b645f1ae4b81b0b8fddb7f25ba1c0 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Wed, 4 Sep 2024 01:42:56 +0530 Subject: [PATCH 06/11] renamed DISTRIBUTION_UNKNOWN to DISTRIBUTION_UNSPECIFIED Signed-off-by: Shashank Mittal --- pkg/apis/manager/v1beta1/api.pb.go | 172 +++++++++--------- pkg/apis/manager/v1beta1/api.proto | 2 +- pkg/apis/manager/v1beta1/python/api_pb2.py | 24 +-- pkg/apis/manager/v1beta1/python/api_pb2.pyi | 4 +- .../suggestionclient/suggestionclient.go | 2 +- .../suggestionclient/suggestionclient_test.go | 2 +- 6 files changed, 103 insertions(+), 103 deletions(-) diff --git a/pkg/apis/manager/v1beta1/api.pb.go b/pkg/apis/manager/v1beta1/api.pb.go index f59a70aa9fa..65d45b25e7f 100644 --- a/pkg/apis/manager/v1beta1/api.pb.go +++ b/pkg/apis/manager/v1beta1/api.pb.go @@ -85,28 +85,28 @@ func (ParameterType) EnumDescriptor() ([]byte, []int) { type Distribution int32 const ( - Distribution_DISTRIBUTION_UNKNOWN Distribution = 0 - Distribution_UNIFORM Distribution = 1 - Distribution_LOG_UNIFORM Distribution = 2 - Distribution_NORMAL Distribution = 3 - Distribution_LOG_NORMAL Distribution = 4 + Distribution_DISTRIBUTION_UNSPECIFIED Distribution = 0 + Distribution_UNIFORM Distribution = 1 + Distribution_LOG_UNIFORM Distribution = 2 + Distribution_NORMAL Distribution = 3 + Distribution_LOG_NORMAL Distribution = 4 ) // Enum value maps for Distribution. var ( Distribution_name = map[int32]string{ - 0: "DISTRIBUTION_UNKNOWN", + 0: "DISTRIBUTION_UNSPECIFIED", 1: "UNIFORM", 2: "LOG_UNIFORM", 3: "NORMAL", 4: "LOG_NORMAL", } Distribution_value = map[string]int32{ - "DISTRIBUTION_UNKNOWN": 0, - "UNIFORM": 1, - "LOG_UNIFORM": 2, - "NORMAL": 3, - "LOG_NORMAL": 4, + "DISTRIBUTION_UNSPECIFIED": 0, + "UNIFORM": 1, + "LOG_UNIFORM": 2, + "NORMAL": 3, + "LOG_NORMAL": 4, } ) @@ -608,7 +608,7 @@ func (x *FeasibleSpace) GetDistribution() Distribution { if x != nil { return x.Distribution } - return Distribution_DISTRIBUTION_UNKNOWN + return Distribution_DISTRIBUTION_UNSPECIFIED } // * @@ -3037,83 +3037,83 @@ var file_api_proto_rawDesc = []byte{ 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x43, 0x52, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, - 0x49, 0x43, 0x41, 0x4c, 0x10, 0x04, 0x2a, 0x62, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x01, 0x12, 0x0f, 0x0a, - 0x0b, 0x4c, 0x4f, 0x47, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, - 0x47, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x04, 0x2a, 0x38, 0x0a, 0x0d, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x49, 0x4e, 0x49, - 0x4d, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, 0x58, 0x49, 0x4d, 0x49, - 0x5a, 0x45, 0x10, 0x02, 0x2a, 0x4a, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x53, - 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x10, 0x03, - 0x32, 0xc6, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x6a, - 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x61, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x12, - 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x6a, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xe1, 0x01, 0x0a, 0x0a, 0x53, 0x75, - 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x67, - 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x79, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xe0, 0x02, - 0x0a, 0x0d, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, - 0x6d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x49, 0x43, 0x41, 0x4c, 0x10, 0x04, 0x2a, 0x66, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, + 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x10, + 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x47, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0e, + 0x0a, 0x0a, 0x4c, 0x4f, 0x47, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x04, 0x2a, 0x38, + 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x4d, 0x49, 0x4e, 0x49, 0x4d, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, + 0x58, 0x49, 0x4d, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x2a, 0x4a, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, + 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, 0x4e, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, + 0x04, 0x4c, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x52, 0x10, 0x03, 0x32, 0xc6, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x61, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x6f, 0x67, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x6a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xe1, 0x01, + 0x0a, 0x0a, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x79, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x32, 0xe0, 0x02, 0x0a, 0x0d, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x12, 0x6d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, + 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x61, 0x72, 0x6c, 0x79, - 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x58, - 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x65, 0x74, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x58, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x72, 0x69, 0x61, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x85, 0x01, 0x0a, + 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, + 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x6f, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x6b, 0x61, 0x74, 0x69, 0x62, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x31, 0x5f, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x53, + 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x6b, 0x61, 0x74, 0x69, + 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x76, + 0x31, 0x5f, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/apis/manager/v1beta1/api.proto b/pkg/apis/manager/v1beta1/api.proto index 3cd290e1254..b4e14e87314 100644 --- a/pkg/apis/manager/v1beta1/api.proto +++ b/pkg/apis/manager/v1beta1/api.proto @@ -101,7 +101,7 @@ enum ParameterType { * Distribution types for HyperParameter. */ enum Distribution { - DISTRIBUTION_UNKNOWN = 0; + DISTRIBUTION_UNSPECIFIED = 0; UNIFORM = 1; LOG_UNIFORM = 2; NORMAL = 3; diff --git a/pkg/apis/manager/v1beta1/python/api_pb2.py b/pkg/apis/manager/v1beta1/python/api_pb2.py index 0677ff705fe..18a5d4e0807 100644 --- a/pkg/apis/manager/v1beta1/python/api_pb2.py +++ b/pkg/apis/manager/v1beta1/python/api_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tapi.proto\x12\x0c\x61pi.v1.beta1\"R\n\nExperiment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x04spec\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ExperimentSpecR\x04spec\"\x85\x04\n\x0e\x45xperimentSpec\x12T\n\x0fparameter_specs\x18\x01 \x01(\x0b\x32+.api.v1.beta1.ExperimentSpec.ParameterSpecsR\x0eparameterSpecs\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x39\n\talgorithm\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12\x46\n\x0e\x65\x61rly_stopping\x18\x04 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\x12\x30\n\x14parallel_trial_count\x18\x05 \x01(\x05R\x12parallelTrialCount\x12&\n\x0fmax_trial_count\x18\x06 \x01(\x05R\rmaxTrialCount\x12\x36\n\nnas_config\x18\x07 \x01(\x0b\x32\x17.api.v1.beta1.NasConfigR\tnasConfig\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"\xab\x01\n\rParameterSpec\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x42\n\x0eparameter_type\x18\x02 \x01(\x0e\x32\x1b.api.v1.beta1.ParameterTypeR\rparameterType\x12\x42\n\x0e\x66\x65\x61sible_space\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.FeasibleSpaceR\rfeasibleSpace\"\x9b\x01\n\rFeasibleSpace\x12\x10\n\x03max\x18\x01 \x01(\tR\x03max\x12\x10\n\x03min\x18\x02 \x01(\tR\x03min\x12\x12\n\x04list\x18\x03 \x03(\tR\x04list\x12\x12\n\x04step\x18\x04 \x01(\tR\x04step\x12>\n\x0c\x64istribution\x18\x05 \x01(\x0e\x32\x1a.api.v1.beta1.DistributionR\x0c\x64istribution\"\xc0\x01\n\rObjectiveSpec\x12/\n\x04type\x18\x01 \x01(\x0e\x32\x1b.api.v1.beta1.ObjectiveTypeR\x04type\x12\x12\n\x04goal\x18\x02 \x01(\x01R\x04goal\x12\x32\n\x15objective_metric_name\x18\x03 \x01(\tR\x13objectiveMetricName\x12\x36\n\x17\x61\x64\x64itional_metric_names\x18\x04 \x03(\tR\x15\x61\x64\x64itionalMetricNames\"\x85\x01\n\rAlgorithmSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12M\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\x1e.api.v1.beta1.AlgorithmSettingR\x11\x61lgorithmSettings\"<\n\x10\x41lgorithmSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x8d\x01\n\x11\x45\x61rlyStoppingSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12Q\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\".api.v1.beta1.EarlyStoppingSettingR\x11\x61lgorithmSettings\"@\n\x14\x45\x61rlyStoppingSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xd2\x01\n\tNasConfig\x12<\n\x0cgraph_config\x18\x01 \x01(\x0b\x32\x19.api.v1.beta1.GraphConfigR\x0bgraphConfig\x12\x42\n\noperations\x18\x02 \x01(\x0b\x32\".api.v1.beta1.NasConfig.OperationsR\noperations\x1a\x43\n\nOperations\x12\x35\n\toperation\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.OperationR\toperation\"p\n\x0bGraphConfig\x12\x1d\n\nnum_layers\x18\x01 \x01(\x05R\tnumLayers\x12\x1f\n\x0binput_sizes\x18\x02 \x03(\x05R\ninputSizes\x12!\n\x0coutput_sizes\x18\x03 \x03(\x05R\x0boutputSizes\"\xd2\x01\n\tOperation\x12%\n\x0eoperation_type\x18\x01 \x01(\tR\roperationType\x12O\n\x0fparameter_specs\x18\x02 \x01(\x0b\x32&.api.v1.beta1.Operation.ParameterSpecsR\x0eparameterSpecs\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"{\n\x05Trial\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12+\n\x04spec\x18\x02 \x01(\x0b\x32\x17.api.v1.beta1.TrialSpecR\x04spec\x12\x31\n\x06status\x18\x03 \x01(\x0b\x32\x19.api.v1.beta1.TrialStatusR\x06status\"\xfe\x02\n\tTrialSpec\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x61\n\x15parameter_assignments\x18\x03 \x01(\x0b\x32,.api.v1.beta1.TrialSpec.ParameterAssignmentsR\x14parameterAssignments\x12;\n\x06labels\x18\x04 \x03(\x0b\x32#.api.v1.beta1.TrialSpec.LabelsEntryR\x06labels\x1a[\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"?\n\x13ParameterAssignment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xed\x02\n\x0bTrialStatus\x12\x1d\n\nstart_time\x18\x01 \x01(\tR\tstartTime\x12\'\n\x0f\x63ompletion_time\x18\x02 \x01(\tR\x0e\x63ompletionTime\x12J\n\tcondition\x18\x03 \x01(\x0e\x32,.api.v1.beta1.TrialStatus.TrialConditionTypeR\tcondition\x12;\n\x0bobservation\x18\x04 \x01(\x0b\x32\x19.api.v1.beta1.ObservationR\x0bobservation\"\x8c\x01\n\x12TrialConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06KILLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x16\n\x12METRICSUNAVAILABLE\x10\x05\x12\x10\n\x0c\x45\x41RLYSTOPPED\x10\x06\x12\x0b\n\x07UNKNOWN\x10\x07\"=\n\x0bObservation\x12.\n\x07metrics\x18\x01 \x03(\x0b\x32\x14.api.v1.beta1.MetricR\x07metrics\"2\n\x06Metric\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x83\x01\n\x1bReportObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x45\n\x0fobservation_log\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"\x1b\n\x19ReportObservationLogReply\"J\n\x0eObservationLog\x12\x38\n\x0bmetric_logs\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.MetricLogR\nmetricLogs\"X\n\tMetricLog\x12\x1d\n\ntime_stamp\x18\x01 \x01(\tR\ttimeStamp\x12,\n\x06metric\x18\x02 \x01(\x0b\x32\x14.api.v1.beta1.MetricR\x06metric\"\x94\x01\n\x18GetObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x1f\n\x0bmetric_name\x18\x02 \x01(\tR\nmetricName\x12\x1d\n\nstart_time\x18\x03 \x01(\tR\tstartTime\x12\x19\n\x08\x65nd_time\x18\x04 \x01(\tR\x07\x65ndTime\"_\n\x16GetObservationLogReply\x12\x45\n\x0fobservation_log\x18\x01 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"<\n\x1b\x44\x65leteObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x1b\n\x19\x44\x65leteObservationLogReply\"\xe6\x01\n\x15GetSuggestionsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12\x34\n\x16\x63urrent_request_number\x18\x04 \x01(\x05R\x14\x63urrentRequestNumber\x12\x30\n\x14total_request_number\x18\x05 \x01(\x05R\x12totalRequestNumber\"\xa4\x04\n\x13GetSuggestionsReply\x12k\n\x15parameter_assignments\x18\x01 \x03(\x0b\x32\x36.api.v1.beta1.GetSuggestionsReply.ParameterAssignmentsR\x14parameterAssignments\x12\x39\n\talgorithm\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x03 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\x1a\x91\x02\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x12\x1d\n\ntrial_name\x18\x02 \x01(\tR\ttrialName\x12Z\n\x06labels\x18\x03 \x03(\x0b\x32\x42.api.v1.beta1.GetSuggestionsReply.ParameterAssignments.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\\\n ValidateAlgorithmSettingsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\" \n\x1eValidateAlgorithmSettingsReply\"\xb3\x01\n\x1cGetEarlyStoppingRulesRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12,\n\x12\x64\x62_manager_address\x18\x03 \x01(\tR\x10\x64\x62ManagerAddress\"o\n\x1aGetEarlyStoppingRulesReply\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x01 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\"\x9a\x01\n\x11\x45\x61rlyStoppingRule\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\x12<\n\ncomparison\x18\x03 \x01(\x0e\x32\x1c.api.v1.beta1.ComparisonTypeR\ncomparison\x12\x1d\n\nstart_step\x18\x04 \x01(\x05R\tstartStep\"n\n$ValidateEarlyStoppingSettingsRequest\x12\x46\n\x0e\x65\x61rly_stopping\x18\x01 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\"$\n\"ValidateEarlyStoppingSettingsReply\"6\n\x15SetTrialStatusRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x15\n\x13SetTrialStatusReply*U\n\rParameterType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x44OUBLE\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0c\n\x08\x44ISCRETE\x10\x03\x12\x0f\n\x0b\x43\x41TEGORICAL\x10\x04*b\n\x0c\x44istribution\x12\x18\n\x14\x44ISTRIBUTION_UNKNOWN\x10\x00\x12\x0b\n\x07UNIFORM\x10\x01\x12\x0f\n\x0bLOG_UNIFORM\x10\x02\x12\n\n\x06NORMAL\x10\x03\x12\x0e\n\nLOG_NORMAL\x10\x04*8\n\rObjectiveType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08MINIMIZE\x10\x01\x12\x0c\n\x08MAXIMIZE\x10\x02*J\n\x0e\x43omparisonType\x12\x16\n\x12UNKNOWN_COMPARISON\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\x08\n\x04LESS\x10\x02\x12\x0b\n\x07GREATER\x10\x03\x32\xc6\x02\n\tDBManager\x12j\n\x14ReportObservationLog\x12).api.v1.beta1.ReportObservationLogRequest\x1a\'.api.v1.beta1.ReportObservationLogReply\x12\x61\n\x11GetObservationLog\x12&.api.v1.beta1.GetObservationLogRequest\x1a$.api.v1.beta1.GetObservationLogReply\x12j\n\x14\x44\x65leteObservationLog\x12).api.v1.beta1.DeleteObservationLogRequest\x1a\'.api.v1.beta1.DeleteObservationLogReply2\xe1\x01\n\nSuggestion\x12X\n\x0eGetSuggestions\x12#.api.v1.beta1.GetSuggestionsRequest\x1a!.api.v1.beta1.GetSuggestionsReply\x12y\n\x19ValidateAlgorithmSettings\x12..api.v1.beta1.ValidateAlgorithmSettingsRequest\x1a,.api.v1.beta1.ValidateAlgorithmSettingsReply2\xe0\x02\n\rEarlyStopping\x12m\n\x15GetEarlyStoppingRules\x12*.api.v1.beta1.GetEarlyStoppingRulesRequest\x1a(.api.v1.beta1.GetEarlyStoppingRulesReply\x12X\n\x0eSetTrialStatus\x12#.api.v1.beta1.SetTrialStatusRequest\x1a!.api.v1.beta1.SetTrialStatusReply\x12\x85\x01\n\x1dValidateEarlyStoppingSettings\x12\x32.api.v1.beta1.ValidateEarlyStoppingSettingsRequest\x1a\x30.api.v1.beta1.ValidateEarlyStoppingSettingsReplyBAZ?github.com/kubeflow/katib/pkg/apis/manager/v1beta1;api_v1_beta1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tapi.proto\x12\x0c\x61pi.v1.beta1\"R\n\nExperiment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x04spec\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ExperimentSpecR\x04spec\"\x85\x04\n\x0e\x45xperimentSpec\x12T\n\x0fparameter_specs\x18\x01 \x01(\x0b\x32+.api.v1.beta1.ExperimentSpec.ParameterSpecsR\x0eparameterSpecs\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x39\n\talgorithm\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12\x46\n\x0e\x65\x61rly_stopping\x18\x04 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\x12\x30\n\x14parallel_trial_count\x18\x05 \x01(\x05R\x12parallelTrialCount\x12&\n\x0fmax_trial_count\x18\x06 \x01(\x05R\rmaxTrialCount\x12\x36\n\nnas_config\x18\x07 \x01(\x0b\x32\x17.api.v1.beta1.NasConfigR\tnasConfig\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"\xab\x01\n\rParameterSpec\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x42\n\x0eparameter_type\x18\x02 \x01(\x0e\x32\x1b.api.v1.beta1.ParameterTypeR\rparameterType\x12\x42\n\x0e\x66\x65\x61sible_space\x18\x03 \x01(\x0b\x32\x1b.api.v1.beta1.FeasibleSpaceR\rfeasibleSpace\"\x9b\x01\n\rFeasibleSpace\x12\x10\n\x03max\x18\x01 \x01(\tR\x03max\x12\x10\n\x03min\x18\x02 \x01(\tR\x03min\x12\x12\n\x04list\x18\x03 \x03(\tR\x04list\x12\x12\n\x04step\x18\x04 \x01(\tR\x04step\x12>\n\x0c\x64istribution\x18\x05 \x01(\x0e\x32\x1a.api.v1.beta1.DistributionR\x0c\x64istribution\"\xc0\x01\n\rObjectiveSpec\x12/\n\x04type\x18\x01 \x01(\x0e\x32\x1b.api.v1.beta1.ObjectiveTypeR\x04type\x12\x12\n\x04goal\x18\x02 \x01(\x01R\x04goal\x12\x32\n\x15objective_metric_name\x18\x03 \x01(\tR\x13objectiveMetricName\x12\x36\n\x17\x61\x64\x64itional_metric_names\x18\x04 \x03(\tR\x15\x61\x64\x64itionalMetricNames\"\x85\x01\n\rAlgorithmSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12M\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\x1e.api.v1.beta1.AlgorithmSettingR\x11\x61lgorithmSettings\"<\n\x10\x41lgorithmSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x8d\x01\n\x11\x45\x61rlyStoppingSpec\x12%\n\x0e\x61lgorithm_name\x18\x01 \x01(\tR\ralgorithmName\x12Q\n\x12\x61lgorithm_settings\x18\x02 \x03(\x0b\x32\".api.v1.beta1.EarlyStoppingSettingR\x11\x61lgorithmSettings\"@\n\x14\x45\x61rlyStoppingSetting\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xd2\x01\n\tNasConfig\x12<\n\x0cgraph_config\x18\x01 \x01(\x0b\x32\x19.api.v1.beta1.GraphConfigR\x0bgraphConfig\x12\x42\n\noperations\x18\x02 \x01(\x0b\x32\".api.v1.beta1.NasConfig.OperationsR\noperations\x1a\x43\n\nOperations\x12\x35\n\toperation\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.OperationR\toperation\"p\n\x0bGraphConfig\x12\x1d\n\nnum_layers\x18\x01 \x01(\x05R\tnumLayers\x12\x1f\n\x0binput_sizes\x18\x02 \x03(\x05R\ninputSizes\x12!\n\x0coutput_sizes\x18\x03 \x03(\x05R\x0boutputSizes\"\xd2\x01\n\tOperation\x12%\n\x0eoperation_type\x18\x01 \x01(\tR\roperationType\x12O\n\x0fparameter_specs\x18\x02 \x01(\x0b\x32&.api.v1.beta1.Operation.ParameterSpecsR\x0eparameterSpecs\x1aM\n\x0eParameterSpecs\x12;\n\nparameters\x18\x01 \x03(\x0b\x32\x1b.api.v1.beta1.ParameterSpecR\nparameters\"{\n\x05Trial\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12+\n\x04spec\x18\x02 \x01(\x0b\x32\x17.api.v1.beta1.TrialSpecR\x04spec\x12\x31\n\x06status\x18\x03 \x01(\x0b\x32\x19.api.v1.beta1.TrialStatusR\x06status\"\xfe\x02\n\tTrialSpec\x12\x39\n\tobjective\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.ObjectiveSpecR\tobjective\x12\x61\n\x15parameter_assignments\x18\x03 \x01(\x0b\x32,.api.v1.beta1.TrialSpec.ParameterAssignmentsR\x14parameterAssignments\x12;\n\x06labels\x18\x04 \x03(\x0b\x32#.api.v1.beta1.TrialSpec.LabelsEntryR\x06labels\x1a[\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"?\n\x13ParameterAssignment\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\xed\x02\n\x0bTrialStatus\x12\x1d\n\nstart_time\x18\x01 \x01(\tR\tstartTime\x12\'\n\x0f\x63ompletion_time\x18\x02 \x01(\tR\x0e\x63ompletionTime\x12J\n\tcondition\x18\x03 \x01(\x0e\x32,.api.v1.beta1.TrialStatus.TrialConditionTypeR\tcondition\x12;\n\x0bobservation\x18\x04 \x01(\x0b\x32\x19.api.v1.beta1.ObservationR\x0bobservation\"\x8c\x01\n\x12TrialConditionType\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06KILLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x16\n\x12METRICSUNAVAILABLE\x10\x05\x12\x10\n\x0c\x45\x41RLYSTOPPED\x10\x06\x12\x0b\n\x07UNKNOWN\x10\x07\"=\n\x0bObservation\x12.\n\x07metrics\x18\x01 \x03(\x0b\x32\x14.api.v1.beta1.MetricR\x07metrics\"2\n\x06Metric\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x83\x01\n\x1bReportObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x45\n\x0fobservation_log\x18\x02 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"\x1b\n\x19ReportObservationLogReply\"J\n\x0eObservationLog\x12\x38\n\x0bmetric_logs\x18\x01 \x03(\x0b\x32\x17.api.v1.beta1.MetricLogR\nmetricLogs\"X\n\tMetricLog\x12\x1d\n\ntime_stamp\x18\x01 \x01(\tR\ttimeStamp\x12,\n\x06metric\x18\x02 \x01(\x0b\x32\x14.api.v1.beta1.MetricR\x06metric\"\x94\x01\n\x18GetObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\x12\x1f\n\x0bmetric_name\x18\x02 \x01(\tR\nmetricName\x12\x1d\n\nstart_time\x18\x03 \x01(\tR\tstartTime\x12\x19\n\x08\x65nd_time\x18\x04 \x01(\tR\x07\x65ndTime\"_\n\x16GetObservationLogReply\x12\x45\n\x0fobservation_log\x18\x01 \x01(\x0b\x32\x1c.api.v1.beta1.ObservationLogR\x0eobservationLog\"<\n\x1b\x44\x65leteObservationLogRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x1b\n\x19\x44\x65leteObservationLogReply\"\xe6\x01\n\x15GetSuggestionsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12\x34\n\x16\x63urrent_request_number\x18\x04 \x01(\x05R\x14\x63urrentRequestNumber\x12\x30\n\x14total_request_number\x18\x05 \x01(\x05R\x12totalRequestNumber\"\xa4\x04\n\x13GetSuggestionsReply\x12k\n\x15parameter_assignments\x18\x01 \x03(\x0b\x32\x36.api.v1.beta1.GetSuggestionsReply.ParameterAssignmentsR\x14parameterAssignments\x12\x39\n\talgorithm\x18\x02 \x01(\x0b\x32\x1b.api.v1.beta1.AlgorithmSpecR\talgorithm\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x03 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\x1a\x91\x02\n\x14ParameterAssignments\x12\x43\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32!.api.v1.beta1.ParameterAssignmentR\x0b\x61ssignments\x12\x1d\n\ntrial_name\x18\x02 \x01(\tR\ttrialName\x12Z\n\x06labels\x18\x03 \x03(\x0b\x32\x42.api.v1.beta1.GetSuggestionsReply.ParameterAssignments.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\\\n ValidateAlgorithmSettingsRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\" \n\x1eValidateAlgorithmSettingsReply\"\xb3\x01\n\x1cGetEarlyStoppingRulesRequest\x12\x38\n\nexperiment\x18\x01 \x01(\x0b\x32\x18.api.v1.beta1.ExperimentR\nexperiment\x12+\n\x06trials\x18\x02 \x03(\x0b\x32\x13.api.v1.beta1.TrialR\x06trials\x12,\n\x12\x64\x62_manager_address\x18\x03 \x01(\tR\x10\x64\x62ManagerAddress\"o\n\x1aGetEarlyStoppingRulesReply\x12Q\n\x14\x65\x61rly_stopping_rules\x18\x01 \x03(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingRuleR\x12\x65\x61rlyStoppingRules\"\x9a\x01\n\x11\x45\x61rlyStoppingRule\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\x12<\n\ncomparison\x18\x03 \x01(\x0e\x32\x1c.api.v1.beta1.ComparisonTypeR\ncomparison\x12\x1d\n\nstart_step\x18\x04 \x01(\x05R\tstartStep\"n\n$ValidateEarlyStoppingSettingsRequest\x12\x46\n\x0e\x65\x61rly_stopping\x18\x01 \x01(\x0b\x32\x1f.api.v1.beta1.EarlyStoppingSpecR\rearlyStopping\"$\n\"ValidateEarlyStoppingSettingsReply\"6\n\x15SetTrialStatusRequest\x12\x1d\n\ntrial_name\x18\x01 \x01(\tR\ttrialName\"\x15\n\x13SetTrialStatusReply*U\n\rParameterType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\n\n\x06\x44OUBLE\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0c\n\x08\x44ISCRETE\x10\x03\x12\x0f\n\x0b\x43\x41TEGORICAL\x10\x04*f\n\x0c\x44istribution\x12\x1c\n\x18\x44ISTRIBUTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNIFORM\x10\x01\x12\x0f\n\x0bLOG_UNIFORM\x10\x02\x12\n\n\x06NORMAL\x10\x03\x12\x0e\n\nLOG_NORMAL\x10\x04*8\n\rObjectiveType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08MINIMIZE\x10\x01\x12\x0c\n\x08MAXIMIZE\x10\x02*J\n\x0e\x43omparisonType\x12\x16\n\x12UNKNOWN_COMPARISON\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\x08\n\x04LESS\x10\x02\x12\x0b\n\x07GREATER\x10\x03\x32\xc6\x02\n\tDBManager\x12j\n\x14ReportObservationLog\x12).api.v1.beta1.ReportObservationLogRequest\x1a\'.api.v1.beta1.ReportObservationLogReply\x12\x61\n\x11GetObservationLog\x12&.api.v1.beta1.GetObservationLogRequest\x1a$.api.v1.beta1.GetObservationLogReply\x12j\n\x14\x44\x65leteObservationLog\x12).api.v1.beta1.DeleteObservationLogRequest\x1a\'.api.v1.beta1.DeleteObservationLogReply2\xe1\x01\n\nSuggestion\x12X\n\x0eGetSuggestions\x12#.api.v1.beta1.GetSuggestionsRequest\x1a!.api.v1.beta1.GetSuggestionsReply\x12y\n\x19ValidateAlgorithmSettings\x12..api.v1.beta1.ValidateAlgorithmSettingsRequest\x1a,.api.v1.beta1.ValidateAlgorithmSettingsReply2\xe0\x02\n\rEarlyStopping\x12m\n\x15GetEarlyStoppingRules\x12*.api.v1.beta1.GetEarlyStoppingRulesRequest\x1a(.api.v1.beta1.GetEarlyStoppingRulesReply\x12X\n\x0eSetTrialStatus\x12#.api.v1.beta1.SetTrialStatusRequest\x1a!.api.v1.beta1.SetTrialStatusReply\x12\x85\x01\n\x1dValidateEarlyStoppingSettings\x12\x32.api.v1.beta1.ValidateEarlyStoppingSettingsRequest\x1a\x30.api.v1.beta1.ValidateEarlyStoppingSettingsReplyBAZ?github.com/kubeflow/katib/pkg/apis/manager/v1beta1;api_v1_beta1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,11 +29,11 @@ _globals['_PARAMETERTYPE']._serialized_start=5425 _globals['_PARAMETERTYPE']._serialized_end=5510 _globals['_DISTRIBUTION']._serialized_start=5512 - _globals['_DISTRIBUTION']._serialized_end=5610 - _globals['_OBJECTIVETYPE']._serialized_start=5612 - _globals['_OBJECTIVETYPE']._serialized_end=5668 - _globals['_COMPARISONTYPE']._serialized_start=5670 - _globals['_COMPARISONTYPE']._serialized_end=5744 + _globals['_DISTRIBUTION']._serialized_end=5614 + _globals['_OBJECTIVETYPE']._serialized_start=5616 + _globals['_OBJECTIVETYPE']._serialized_end=5672 + _globals['_COMPARISONTYPE']._serialized_start=5674 + _globals['_COMPARISONTYPE']._serialized_end=5748 _globals['_EXPERIMENT']._serialized_start=27 _globals['_EXPERIMENT']._serialized_end=109 _globals['_EXPERIMENTSPEC']._serialized_start=112 @@ -124,10 +124,10 @@ _globals['_SETTRIALSTATUSREQUEST']._serialized_end=5400 _globals['_SETTRIALSTATUSREPLY']._serialized_start=5402 _globals['_SETTRIALSTATUSREPLY']._serialized_end=5423 - _globals['_DBMANAGER']._serialized_start=5747 - _globals['_DBMANAGER']._serialized_end=6073 - _globals['_SUGGESTION']._serialized_start=6076 - _globals['_SUGGESTION']._serialized_end=6301 - _globals['_EARLYSTOPPING']._serialized_start=6304 - _globals['_EARLYSTOPPING']._serialized_end=6656 + _globals['_DBMANAGER']._serialized_start=5751 + _globals['_DBMANAGER']._serialized_end=6077 + _globals['_SUGGESTION']._serialized_start=6080 + _globals['_SUGGESTION']._serialized_end=6305 + _globals['_EARLYSTOPPING']._serialized_start=6308 + _globals['_EARLYSTOPPING']._serialized_end=6660 # @@protoc_insertion_point(module_scope) diff --git a/pkg/apis/manager/v1beta1/python/api_pb2.pyi b/pkg/apis/manager/v1beta1/python/api_pb2.pyi index 721aa6d3fd3..d5db79e671f 100644 --- a/pkg/apis/manager/v1beta1/python/api_pb2.pyi +++ b/pkg/apis/manager/v1beta1/python/api_pb2.pyi @@ -16,7 +16,7 @@ class ParameterType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): class Distribution(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () - DISTRIBUTION_UNKNOWN: _ClassVar[Distribution] + DISTRIBUTION_UNSPECIFIED: _ClassVar[Distribution] UNIFORM: _ClassVar[Distribution] LOG_UNIFORM: _ClassVar[Distribution] NORMAL: _ClassVar[Distribution] @@ -39,7 +39,7 @@ DOUBLE: ParameterType INT: ParameterType DISCRETE: ParameterType CATEGORICAL: ParameterType -DISTRIBUTION_UNKNOWN: Distribution +DISTRIBUTION_UNSPECIFIED: Distribution UNIFORM: Distribution LOG_UNIFORM: Distribution NORMAL: Distribution diff --git a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go index aade50b24ef..6ed521a80eb 100644 --- a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go +++ b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient.go @@ -552,7 +552,7 @@ func convertDistribution(typ experimentsv1beta1.Distribution) suggestionapi.Dist case experimentsv1beta1.DistributionLogNormal: return suggestionapi.Distribution_LOG_NORMAL default: - return suggestionapi.Distribution_DISTRIBUTION_UNKNOWN + return suggestionapi.Distribution_DISTRIBUTION_UNSPECIFIED } } diff --git a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient_test.go b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient_test.go index c4df08bbfaa..9dc81700a91 100644 --- a/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient_test.go +++ b/pkg/controller.v1beta1/suggestion/suggestionclient/suggestionclient_test.go @@ -618,7 +618,7 @@ func TestConvertDistribution(t *testing.T) { }, { inDistribution: experimentsv1beta1.DistributionUnknown, - expectedDistribution: suggestionapi.Distribution_DISTRIBUTION_UNKNOWN, + expectedDistribution: suggestionapi.Distribution_DISTRIBUTION_UNSPECIFIED, testDescription: "Convert unknown distribution", }, } From 910a46c12dda133ea95face1fcfbd01061b2923d Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Wed, 4 Sep 2024 03:10:56 +0530 Subject: [PATCH 07/11] fix Signed-off-by: Shashank Mittal --- pkg/suggestion/v1beta1/internal/search_space.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/suggestion/v1beta1/internal/search_space.py b/pkg/suggestion/v1beta1/internal/search_space.py index 4ce82e6b72d..2a11ba2cb22 100644 --- a/pkg/suggestion/v1beta1/internal/search_space.py +++ b/pkg/suggestion/v1beta1/internal/search_space.py @@ -86,7 +86,7 @@ def convert_parameter(p): p.feasible_space.distribution if p.feasible_space.distribution != "" and p.feasible_space.distribution is not None - and p.feasible_space.distribution != api.DISTRIBUTION_UNKNOWN + and p.feasible_space.distribution != api.DISTRIBUTION_UNSPECIFIED else None ) From 08b01ac00907fc367dfa449b95b0b725bf1c7721 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Sat, 7 Sep 2024 00:30:56 +0530 Subject: [PATCH 08/11] added more test cases for hyperopt distributions Signed-off-by: Shashank Mittal --- .github/workflows/e2e-test-pytorch-mnist.yaml | 3 ++- .../v1beta1/hyperopt/base_service.py | 15 +++++++-------- .../v1beta1/internal/search_space.py | 1 + .../suggestion/test_hyperopt_service.py | 18 ++++++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-test-pytorch-mnist.yaml b/.github/workflows/e2e-test-pytorch-mnist.yaml index 3a5ff7e1bc0..75828142337 100644 --- a/.github/workflows/e2e-test-pytorch-mnist.yaml +++ b/.github/workflows/e2e-test-pytorch-mnist.yaml @@ -43,4 +43,5 @@ jobs: - "grid,bayesian-optimization,tpe,multivariate-tpe,cma-es,hyperband" - "hyperopt-distribution" - "file-metrics-collector,pytorchjob-mnist" - - "median-stop-with-json-format,file-metrics-collector-with-json-format" \ No newline at end of file + - "median-stop-with-json-format,file-metrics-collector-with-json-format" + \ No newline at end of file diff --git a/pkg/suggestion/v1beta1/hyperopt/base_service.py b/pkg/suggestion/v1beta1/hyperopt/base_service.py index d38ad00d5e6..53b632d4219 100644 --- a/pkg/suggestion/v1beta1/hyperopt/base_service.py +++ b/pkg/suggestion/v1beta1/hyperopt/base_service.py @@ -17,14 +17,13 @@ import hyperopt import numpy as np +from pkg.apis.manager.v1beta1.python import api_pb2 from pkg.suggestion.v1beta1.internal.constant import ( CATEGORICAL, DISCRETE, DOUBLE, INTEGER, - LOG_UNIFORM, MAX_GOAL, - UNIFORM, ) from pkg.suggestion.v1beta1.internal.trial import Assignment @@ -69,7 +68,7 @@ def create_hyperopt_domain(self): param.name, float(param.min), float(param.max) ) elif param.type == DOUBLE: - if param.distribution == UNIFORM: + if param.distribution == api_pb2.UNIFORM or param.distribution is None: if param.step: hyperopt_search_space[param.name] = hyperopt.hp.quniform( param.name, @@ -81,7 +80,7 @@ def create_hyperopt_domain(self): hyperopt_search_space[param.name] = hyperopt.hp.uniform( param.name, float(param.min), float(param.max) ) - elif param.distribution == LOG_UNIFORM: + elif param.distribution == api_pb2.LOG_UNIFORM: if param.step: hyperopt_search_space[param.name] = hyperopt.hp.qloguniform( param.name, @@ -93,10 +92,10 @@ def create_hyperopt_domain(self): hyperopt_search_space[param.name] = hyperopt.hp.loguniform( param.name, float(param.min), float(param.max) ) - else: - hyperopt_search_space[param.name] = hyperopt.hp.uniform( - param.name, float(param.min), float(param.max) - ) + # else: + # hyperopt_search_space[param.name] = hyperopt.hp.uniform( + # param.name, float(param.min), float(param.max) + # ) elif param.type == CATEGORICAL or param.type == DISCRETE: hyperopt_search_space[param.name] = hyperopt.hp.choice( param.name, param.list diff --git a/pkg/suggestion/v1beta1/internal/search_space.py b/pkg/suggestion/v1beta1/internal/search_space.py index 2a11ba2cb22..13573ed540d 100644 --- a/pkg/suggestion/v1beta1/internal/search_space.py +++ b/pkg/suggestion/v1beta1/internal/search_space.py @@ -43,6 +43,7 @@ def convert(experiment): search_space.goal = constant.MIN_GOAL for p in experiment.spec.parameter_specs.parameters: search_space.params.append(HyperParameterSearchSpace.convert_parameter(p)) + print(search_space) return search_space @staticmethod diff --git a/test/unit/v1beta1/suggestion/test_hyperopt_service.py b/test/unit/v1beta1/suggestion/test_hyperopt_service.py index c726115d9f4..c2d79ca92ac 100644 --- a/test/unit/v1beta1/suggestion/test_hyperopt_service.py +++ b/test/unit/v1beta1/suggestion/test_hyperopt_service.py @@ -183,6 +183,24 @@ def test_get_suggestion(self): parameter_type=api_pb2.DOUBLE, feasible_space=api_pb2.FeasibleSpace( max="5", min="1", list=[], step="0.5", distribution=api_pb2.LOG_UNIFORM) + ), + api_pb2.ParameterSpec( + name="param-6", + parameter_type=api_pb2.DOUBLE, + feasible_space=api_pb2.FeasibleSpace( + max="5", min="1", list=[], distribution=api_pb2.LOG_UNIFORM) + ), + api_pb2.ParameterSpec( + name="param-7", + parameter_type=api_pb2.DOUBLE, + feasible_space=api_pb2.FeasibleSpace( + max="10", min="5", list=[], step="0.8", distribution=api_pb2.UNIFORM) + ), + api_pb2.ParameterSpec( + name="param-8", + parameter_type=api_pb2.DOUBLE, + feasible_space=api_pb2.FeasibleSpace( + max="10", min="5", list=[], distribution=api_pb2.UNIFORM) ) ] ) From 16dc03032fff962fa236dc05827a43f9c6cfe93b Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Sat, 7 Sep 2024 20:07:55 +0530 Subject: [PATCH 09/11] added support for NORMAL and LOG_NORMAL in hyperopt suggestion service Signed-off-by: Shashank Mittal --- .../v1beta1/hyperopt/base_service.py | 34 ++++++++++++++++--- .../v1beta1/internal/search_space.py | 1 - .../suggestion/test_hyperopt_service.py | 12 +++++++ 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/pkg/suggestion/v1beta1/hyperopt/base_service.py b/pkg/suggestion/v1beta1/hyperopt/base_service.py index 53b632d4219..0d65ecd77e0 100644 --- a/pkg/suggestion/v1beta1/hyperopt/base_service.py +++ b/pkg/suggestion/v1beta1/hyperopt/base_service.py @@ -92,10 +92,36 @@ def create_hyperopt_domain(self): hyperopt_search_space[param.name] = hyperopt.hp.loguniform( param.name, float(param.min), float(param.max) ) - # else: - # hyperopt_search_space[param.name] = hyperopt.hp.uniform( - # param.name, float(param.min), float(param.max) - # ) + elif param.distribution == api_pb2.NORMAL: + sigma = 1 + if param.step: + hyperopt_search_space[param.name] = hyperopt.hp.qnormal( + param.name, + float((float(param.min) + float(param.max)) / 2), + float(sigma), + float(param.step), + ) + else: + hyperopt_search_space[param.name] = hyperopt.hp.normal( + param.name, + float((float(param.min) + float(param.max)) / 2), + float(sigma), + ) + elif param.distribution == api_pb2.LOG_NORMAL: + sigma = 1 + if param.step: + hyperopt_search_space[param.name] = hyperopt.hp.qlognormal( + param.name, + float((float(param.min) + float(param.max)) / 2), + float(sigma), + float(param.step), + ) + else: + hyperopt_search_space[param.name] = hyperopt.hp.lognormal( + param.name, + float((float(param.min) + float(param.max)) / 2), + float(sigma), + ) elif param.type == CATEGORICAL or param.type == DISCRETE: hyperopt_search_space[param.name] = hyperopt.hp.choice( param.name, param.list diff --git a/pkg/suggestion/v1beta1/internal/search_space.py b/pkg/suggestion/v1beta1/internal/search_space.py index 13573ed540d..2a11ba2cb22 100644 --- a/pkg/suggestion/v1beta1/internal/search_space.py +++ b/pkg/suggestion/v1beta1/internal/search_space.py @@ -43,7 +43,6 @@ def convert(experiment): search_space.goal = constant.MIN_GOAL for p in experiment.spec.parameter_specs.parameters: search_space.params.append(HyperParameterSearchSpace.convert_parameter(p)) - print(search_space) return search_space @staticmethod diff --git a/test/unit/v1beta1/suggestion/test_hyperopt_service.py b/test/unit/v1beta1/suggestion/test_hyperopt_service.py index c2d79ca92ac..15fb252fdbd 100644 --- a/test/unit/v1beta1/suggestion/test_hyperopt_service.py +++ b/test/unit/v1beta1/suggestion/test_hyperopt_service.py @@ -201,6 +201,18 @@ def test_get_suggestion(self): parameter_type=api_pb2.DOUBLE, feasible_space=api_pb2.FeasibleSpace( max="10", min="5", list=[], distribution=api_pb2.UNIFORM) + ), + api_pb2.ParameterSpec( + name="param-9", + parameter_type=api_pb2.DOUBLE, + feasible_space=api_pb2.FeasibleSpace( + max="10", min="5", list=[], step="0.8", distribution=api_pb2.NORMAL) + ), + api_pb2.ParameterSpec( + 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) ) ] ) From 282f81df38ca448eeae1695075d781d3b59e8c10 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Sat, 7 Sep 2024 20:17:29 +0530 Subject: [PATCH 10/11] added e2e tests for NORMAL and LOG_NORMAL Signed-off-by: Shashank Mittal sigma calculation fixed fix parse new arguments to mnist.py --- .../hp-tuning/hyperopt-distribution.yaml | 21 ++++++++++++++++++ .../trial-images/pytorch-mnist/mnist.py | 14 ++++++++++++ .../v1beta1/hyperopt/base_service.py | 22 ++++++++++--------- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml b/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml index ea326124c27..cde00798adc 100644 --- a/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml +++ b/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml @@ -28,6 +28,19 @@ spec: min: "0.5" max: "0.9" distribution: "logUniform" + - name: weight_decay + parameterType: double + feasibleSpace: + min: "0.01" + max: "0.05" + distribution: "normal" + - name: dropout_rate + parameterType: double + feasibleSpace: + min: "0.1" + max: "0.5" + step: "0.001" + distribution: "logNormal" trialTemplate: primaryContainerName: training-container trialParameters: @@ -37,6 +50,12 @@ spec: - name: momentum description: Momentum for the training model reference: momentum + - name: weightDecay + description: Weight decay for the training model + reference: weight_decay + - name: dropoutRate + description: Dropout rate for the training model + reference: dropout_rate trialSpec: apiVersion: batch/v1 kind: Job @@ -53,6 +72,8 @@ spec: - "--batch-size=16" - "--lr=${trialParameters.learningRate}" - "--momentum=${trialParameters.momentum}" + - "--weight-decay=${trialParameters.weightDecay}" + - "--dropout-rate=${trialParameters.dropoutRate}" resources: limits: memory: "1Gi" diff --git a/examples/v1beta1/trial-images/pytorch-mnist/mnist.py b/examples/v1beta1/trial-images/pytorch-mnist/mnist.py index 7ecc911cbb4..91b46e31449 100644 --- a/examples/v1beta1/trial-images/pytorch-mnist/mnist.py +++ b/examples/v1beta1/trial-images/pytorch-mnist/mnist.py @@ -150,6 +150,20 @@ def main(): metavar="M", help="SGD momentum (default: 0.5)", ) + parser.add_argument( + "--weight-decay", + type=float, + default=0.01, + metavar="WD", + help="Weight decay for regularization (default: 0.01)", + ) + parser.add_argument( + "--dropout-rate", + type=float, + default=0.5, + metavar="DR", + help="Dropout rate for the model (default: 0.5)", + ) parser.add_argument( "--no-cuda", action="store_true", default=False, help="disables CUDA training" ) diff --git a/pkg/suggestion/v1beta1/hyperopt/base_service.py b/pkg/suggestion/v1beta1/hyperopt/base_service.py index 0d65ecd77e0..283942e8c3b 100644 --- a/pkg/suggestion/v1beta1/hyperopt/base_service.py +++ b/pkg/suggestion/v1beta1/hyperopt/base_service.py @@ -93,34 +93,36 @@ def create_hyperopt_domain(self): param.name, float(param.min), float(param.max) ) elif param.distribution == api_pb2.NORMAL: - sigma = 1 + mu = (float(param.min) + float(param.max)) / 2 + sigma = (float(param.max) - float(param.min)) / 6 if param.step: hyperopt_search_space[param.name] = hyperopt.hp.qnormal( param.name, - float((float(param.min) + float(param.max)) / 2), - float(sigma), + mu, + sigma, float(param.step), ) else: hyperopt_search_space[param.name] = hyperopt.hp.normal( param.name, - float((float(param.min) + float(param.max)) / 2), - float(sigma), + mu, + sigma, ) elif param.distribution == api_pb2.LOG_NORMAL: - sigma = 1 + mu = (float(param.min) + float(param.max)) / 2 + sigma = (float(param.max) - float(param.min)) / 6 if param.step: hyperopt_search_space[param.name] = hyperopt.hp.qlognormal( param.name, - float((float(param.min) + float(param.max)) / 2), - float(sigma), + mu, + sigma, float(param.step), ) else: hyperopt_search_space[param.name] = hyperopt.hp.lognormal( param.name, - float((float(param.min) + float(param.max)) / 2), - float(sigma), + mu, + sigma, ) elif param.type == CATEGORICAL or param.type == DISCRETE: hyperopt_search_space[param.name] = hyperopt.hp.choice( From b7d09a611809be1ae2413b77122f4cdf28bec528 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Thu, 19 Sep 2024 13:52:16 +0530 Subject: [PATCH 11/11] hyperopt-suggestion example update Signed-off-by: Shashank Mittal --- examples/v1beta1/hp-tuning/hyperopt-distribution.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml b/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml index cde00798adc..77e69a98d2b 100644 --- a/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml +++ b/examples/v1beta1/hp-tuning/hyperopt-distribution.yaml @@ -7,7 +7,7 @@ metadata: spec: objective: type: minimize - goal: 0.001 + goal: 0.2 objectiveMetricName: loss algorithm: algorithmName: random @@ -39,7 +39,7 @@ spec: feasibleSpace: min: "0.1" max: "0.5" - step: "0.001" + step: "0.01" distribution: "logNormal" trialTemplate: primaryContainerName: training-container