diff --git a/analysis/optimizer/optimizer.py b/analysis/optimizer/optimizer.py index b0af6c73c66d723a3a20be5ed5adee08b5eaea88..4abc2c70c0db5f8d267d8ed7ae4cd571abb593c6 100644 --- a/analysis/optimizer/optimizer.py +++ b/analysis/optimizer/optimizer.py @@ -282,7 +282,6 @@ class Optimizer(multiprocessing.Process): if ref_x and ref_y is None: ref_y = list(map(objective, ref_x)) LOGGER.info("ref_y is: %s", ref_y) - n_calls -= len(ref_y) # Pass user suggested initialisation points to the optimizer if ref_x: @@ -294,6 +293,7 @@ class Optimizer(multiprocessing.Process): "have the same length") LOGGER.info("ref_x: %s", ref_x) LOGGER.info("ref_y: %s", ref_y) + n_calls -= len(ref_y) ret = optimizer.tell(ref_x, ref_y) for i in range(n_calls): diff --git a/api/profile/profile.pb.go b/api/profile/profile.pb.go index b9aa6141bfb1ffb2e4e937beacbc2ce62d13eb47..25a4dc624d18a2893565e8f346a1a47a40aafe7e 100644 --- a/api/profile/profile.pb.go +++ b/api/profile/profile.pb.go @@ -34,6 +34,7 @@ const ( TuningMessage_SyncConfig TuningMessageStatus = 6 TuningMessage_Detail TuningMessageStatus = 7 TuningMessage_Threshold TuningMessageStatus = 8 + TuningMessage_JobCreate TuningMessageStatus = 9 ) var TuningMessageStatus_name = map[int32]string{ @@ -46,6 +47,7 @@ var TuningMessageStatus_name = map[int32]string{ 6: "SyncConfig", 7: "Detail", 8: "Threshold", + 9: "JobCreate", } var TuningMessageStatus_value = map[string]int32{ @@ -58,6 +60,7 @@ var TuningMessageStatus_value = map[string]int32{ "SyncConfig": 6, "Detail": 7, "Threshold": 8, + "JobCreate": 9, } func (x TuningMessageStatus) String() string { @@ -843,74 +846,74 @@ func init() { func init() { proto.RegisterFile("profile.proto", fileDescriptor_744bf7a47b381504) } var fileDescriptor_744bf7a47b381504 = []byte{ - // 1061 bytes of a gzipped FileDescriptorProto + // 1070 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 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, - 0x5b, 0x65, 0x34, 0xcb, 0xeb, 0xad, 0x4b, 0xf0, 0x02, 0xda, 0xb7, 0x22, 0x26, 0xcc, 0x15, 0x66, - 0x01, 0xfa, 0x02, 0xbc, 0xf1, 0x0c, 0x4b, 0x1c, 0x29, 0x22, 0xe9, 0x2f, 0x58, 0x51, 0xc1, 0x4d, - 0x6d, 0xbd, 0xf0, 0x23, 0x3e, 0x78, 0x09, 0xad, 0x51, 0x34, 0xd7, 0x9b, 0x98, 0x2a, 0xac, 0x96, - 0x99, 0x4b, 0xef, 0x50, 0xf0, 0x01, 0x7a, 0xa3, 0x68, 0x3e, 0x9e, 0x91, 0x68, 0x5e, 0x5b, 0x40, - 0x19, 0xd7, 0xac, 0xc6, 0xa1, 0x43, 0x18, 0x5c, 0x90, 0x2c, 0x92, 0x34, 0x2d, 0x56, 0xef, 0x87, - 0x55, 0x2a, 0xf8, 0x00, 0xe0, 0xe4, 0xb9, 0x11, 0x09, 0xda, 0x85, 0xe6, 0x24, 0x36, 0x99, 0x5b, - 0x61, 0x73, 0x12, 0xa3, 0x4f, 0xa1, 0x9f, 0x8b, 0x17, 0xbb, 0xd4, 0x25, 0xa1, 0xad, 0x77, 0x74, - 0x41, 0x32, 0x85, 0x17, 0xa9, 0xcb, 0x5d, 0x12, 0xc1, 0x9f, 0x0d, 0x18, 0x8c, 0x05, 0x63, 0x24, - 0x52, 0x57, 0x0c, 0x27, 0xe8, 0x00, 0x7a, 0x13, 0xae, 0x88, 0x7c, 0xc4, 0xcc, 0xad, 0x50, 0x60, - 0x6d, 0xbb, 0x58, 0x4a, 0x2b, 0x51, 0xd3, 0xda, 0x72, 0xac, 0x6d, 0x79, 0x33, 0xb8, 0x45, 0x0a, - 0x8c, 0x3e, 0x03, 0xf8, 0x71, 0xa9, 0xd2, 0xa5, 0x7a, 0x87, 0xd5, 0xcc, 0xdf, 0x36, 0xd6, 0x0a, - 0xa3, 0x0f, 0xe6, 0x9c, 0x89, 0x68, 0xee, 0xb7, 0xed, 0xc1, 0x18, 0xa0, 0xcf, 0xfb, 0x2d, 0x51, - 0x3f, 0x0b, 0x39, 0xf7, 0x3b, 0x86, 0xcf, 0xa1, 0xd6, 0xd6, 0x34, 0x61, 0xd7, 0x6a, 0xab, 0xbf, - 0x83, 0x6b, 0x18, 0xde, 0x49, 0x4c, 0x79, 0xde, 0x00, 0xba, 0x56, 0xac, 0xb0, 0x59, 0xd1, 0x9e, - 0x41, 0x81, 0x9f, 0xd4, 0xd3, 0x7c, 0x5a, 0x4f, 0xf0, 0x7b, 0x03, 0x76, 0x2e, 0xc8, 0x03, 0xe5, - 0x24, 0xcf, 0x76, 0x08, 0x83, 0x29, 0x91, 0x8f, 0x34, 0x22, 0x95, 0xee, 0xaf, 0x52, 0xe8, 0x08, - 0xf6, 0x46, 0x69, 0xca, 0x68, 0x64, 0xe4, 0x30, 0x47, 0x6f, 0x13, 0x3f, 0xa5, 0xf5, 0x35, 0x99, - 0x46, 0x84, 0x63, 0x49, 0x85, 0x71, 0xb3, 0x6a, 0xad, 0x71, 0xd5, 0x5e, 0xdf, 0x5e, 0xef, 0xf5, - 0x29, 0xec, 0x4d, 0xa3, 0x19, 0x89, 0x97, 0xac, 0x28, 0xce, 0x83, 0xd6, 0x28, 0x4d, 0x5d, 0x51, - 0xfa, 0xb3, 0x10, 0xa8, 0x59, 0x0a, 0xa4, 0x05, 0x99, 0x2a, 0x89, 0x15, 0x49, 0x56, 0xf9, 0x01, - 0xe5, 0x38, 0xf8, 0x6b, 0x1b, 0x76, 0xee, 0x96, 0x9c, 0xf2, 0xa4, 0x72, 0x7f, 0x78, 0xa5, 0x7d, - 0xb9, 0x6b, 0x5f, 0xc2, 0x13, 0xca, 0xf3, 0xbc, 0x0e, 0xe9, 0x62, 0x23, 0x57, 0x6c, 0xcb, 0x16, - 0xeb, 0x20, 0x7a, 0x05, 0xed, 0x4c, 0x61, 0x45, 0xcc, 0x26, 0x76, 0x4f, 0x5f, 0x1e, 0xe7, 0x8f, - 0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x91, 0x55, 0x39, 0xf5, 0xb5, 0x19, 0x76, 0x30, + 0xac, 0x06, 0x06, 0x5b, 0xe8, 0x58, 0x47, 0x30, 0xa2, 0x36, 0x75, 0xa7, 0xc6, 0xff, 0x7d, 0x1a, + 0xe3, 0x7f, 0xed, 0x7f, 0x06, 0xbd, 0x7c, 0x52, 0x55, 0x44, 0xfc, 0x64, 0x78, 0x6d, 0xda, 0xce, + 0xd7, 0xd0, 0xfb, 0x9e, 0x70, 0x22, 0x37, 0x2f, 0x57, 0x1f, 0x78, 0xdf, 0x31, 0xff, 0xb1, 0xaf, + 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xa9, 0x73, 0x55, 0xd8, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/api/profile/profile.proto b/api/profile/profile.proto index 92e9d966efb248b6d08f6eb8f4cc794c452f1748..89a8afb8094e9c887b51fc7ef2a8a54eeef1dd31 100755 --- a/api/profile/profile.proto +++ b/api/profile/profile.proto @@ -110,6 +110,7 @@ message TuningMessage { SyncConfig = 6; Detail = 7; Threshold = 8; + JobCreate = 9; } status state = 4; int32 RandomStarts = 5; diff --git a/common/project/projet.go b/common/project/projet.go index 7731ce688c27b3c4a0b1115fc8f432b8a7a48f6b..3636cd37f84914feeb6b848a715bdaf1e2c78367 100644 --- a/common/project/projet.go +++ b/common/project/projet.go @@ -41,10 +41,10 @@ type Evaluate struct { // EvalInfo :store the evaluation object type EvalInfo struct { - Get string `yaml:"get"` - Type string `yaml:"type"` - Weight int64 `yaml:"weight"` - Threshold int64 `yaml:"threshold"` + Get string `yaml:"get"` + Type string `yaml:"type"` + Weight int64 `yaml:"weight"` + Threshold float64 `yaml:"threshold"` } // YamlPrjCli :store the client yaml project @@ -168,25 +168,25 @@ func (y *YamlPrjCli) BenchMark() (string, string, error) { func (y *YamlPrjCli) BestPerformance() string { bestPerformance := make([]string, 0) for index, evaluation := range y.Evaluations { - bestPerformance = append(bestPerformance, fmt.Sprintf("%s:%.2f", evaluation.Name, math.Abs(y.EvalMinArray[index]))) + bestPerformance = append(bestPerformance, fmt.Sprintf("%s=%.2f", evaluation.Name, math.Abs(y.EvalMinArray[index]))) } - return fmt.Sprintf("(%s)", strings.Join(bestPerformance, ",")) + return fmt.Sprintf("%s", strings.Join(bestPerformance, ",")) } func (y *YamlPrjCli) CurrPerformance() string { currPerformance := make([]string, 0) for index, evaluation := range y.Evaluations { - currPerformance = append(currPerformance, fmt.Sprintf("%s:%.2f", evaluation.Name, math.Abs(y.EvalCurrentArray[index]))) + currPerformance = append(currPerformance, fmt.Sprintf("%s=%.2f", evaluation.Name, math.Abs(y.EvalCurrentArray[index]))) } - return fmt.Sprintf("(%s)", strings.Join(currPerformance, ",")) + return fmt.Sprintf("%s", strings.Join(currPerformance, ",")) } func (y *YamlPrjCli) BasePerformance() string { basePerformance := make([]string, 0) for index, evaluation := range y.Evaluations { - basePerformance = append(basePerformance, fmt.Sprintf("%s:%.2f", evaluation.Name, math.Abs(y.EvalBaseArray[index]))) + basePerformance = append(basePerformance, fmt.Sprintf("%s=%.2f", evaluation.Name, math.Abs(y.EvalBaseArray[index]))) } - return fmt.Sprintf("(%s)", strings.Join(basePerformance, ",")) + return fmt.Sprintf("%s", strings.Join(basePerformance, ",")) } func (y *YamlPrjCli) calculateBenchMark() float64 { @@ -217,16 +217,18 @@ func (y *YamlPrjCli) improveRate(index int) float64 { // Threshold return the threshold, which replace with the benchmark result. // it is used when the parameters is not match with the relations -func (y *YamlPrjCli) Threshold() (string, error) { +func (y *YamlPrjCli) Threshold() (string, string, error) { benchStr := make([]string, 0) - for _, evaluation := range y.Evaluations { - out := strconv.FormatFloat(float64(evaluation.Info.Threshold)*float64(evaluation.Info.Weight)/100, 'f', -1, 64) + for index, evaluation := range y.Evaluations { + floatOut := evaluation.Info.Threshold if evaluation.Info.Type == "negative" { - out = "-" + out + floatOut = -floatOut } - benchStr = append(benchStr, evaluation.Name+"="+out) + y.EvalCurrentArray[index] = floatOut + benchStr = append(benchStr, fmt.Sprintf("%s=%.2f", evaluation.Name, floatOut)) } - return strings.Join(benchStr, ","), nil + sum := y.calculateBenchMark() + return fmt.Sprintf("evaluations=%.2f", sum), strings.Join(benchStr, ","), nil } // SetHistoryEvalBase method call the set the current EvalBase to history baseline diff --git a/common/tuning/optimizer.go b/common/tuning/optimizer.go index 782d52bfaa1a4efd0459232121c57bb24492d6ed..ed19c10f34fa8585dfbb3133f2a935127c026db6 100644 --- a/common/tuning/optimizer.go +++ b/common/tuning/optimizer.go @@ -56,6 +56,7 @@ type Optimizer struct { EvalBase string RespPutIns *models.RespPutBody StartIterTime string + InitConfig string TotalTime float64 Percentage float64 BackupFlag bool @@ -124,9 +125,6 @@ func (o *Optimizer) createOptimizerTask(ch chan *PB.TuningMessage, iters int32, if o.Restart && iters <= int32(len(optimizerBody.Xref)) { return fmt.Errorf("create task failed for client ask iters less than tuning history") } - if o.Restart { - iters = iters - int32(len(optimizerBody.Xref)) - } optimizerBody.MaxEval = iters optimizerBody.Engine = engine optimizerBody.RandomStarts = o.RandomStarts @@ -167,6 +165,13 @@ func (o *Optimizer) createOptimizerTask(ch chan *PB.TuningMessage, iters int32, State: PB.TuningMessage_JobInit, FeatureFilter: o.FeatureFilter, Content: []byte(strconv.Itoa(respPostIns.Iters)), + TuningLog: &PB.TuningHistory{ + BaseEval: o.EvalBase, + MinEval: o.EvalMinArray, + SumEval: fmt.Sprintf("%.2f", o.MinEvalSum), + TotalTime: int64(o.TotalTime), + Starts: int32(o.Iter) + 1, + }, } url := config.GetURL(config.OptimizerURI) o.OptimizerPutURL = fmt.Sprintf("%s/%s", url, respPostIns.TaskID) @@ -202,9 +207,11 @@ func (o *Optimizer) readTuningLog(body *models.OptimizerPostBody) error { return err } - if o.Iter == 1 { + if o.Iter == 0 { o.EvalBase = items[4] o.MinEvalSum = yFloat + o.EvalMinArray = items[4] + continue } if startTime, err = time.Parse(config.DefaultTimeFormat, items[1]); err != nil { @@ -258,11 +265,9 @@ func (o *Optimizer) DynamicTuned(ch chan *PB.TuningMessage, stopCh chan int) err var evalValue string var err error var message string - if o.Content != nil { - evalValue, err = o.evalParsing(ch) - if err != nil { - return err - } + evalValue, err = o.evalParsing(ch) + if err != nil { + return err } err = os.Setenv("ITERATION", strconv.Itoa(o.Iter)) @@ -346,13 +351,6 @@ func (o *Optimizer) DynamicTuned(ch chan *PB.TuningMessage, stopCh chan int) err ch <- &PB.TuningMessage{State: PB.TuningMessage_BenchMark, Content: []byte(o.RespPutIns.Param), FeatureFilter: o.FeatureFilter, - TuningLog: &PB.TuningHistory{ - BaseEval: o.EvalBase, - MinEval: o.EvalMinArray, - SumEval: fmt.Sprintf("%.2f", o.MinEvalSum), - TotalTime: int64(o.TotalTime), - Starts: int32(o.Iter), - }, } return nil } @@ -450,12 +448,23 @@ func (o *Optimizer) RestoreConfigTuned(ch chan *PB.TuningMessage) error { } func (o *Optimizer) evalParsing(ch chan *PB.TuningMessage) (string, error) { - eval := string(o.Content) + if o.Restart && o.Content == nil { + return "", nil + } + + eval := o.EvalBase + if o.Content != nil { + eval = string(o.Content) + } + configs := o.InitConfig + if o.RespPutIns != nil { + configs = o.RespPutIns.Param + } endIterTime := time.Now().Format(config.DefaultTimeFormat) iterInfo := make([]string, 0) iterInfo = append(iterInfo, strconv.Itoa(o.Iter), o.StartIterTime, endIterTime, - o.Evaluations, eval, o.RespPutIns.Param) + o.Evaluations, eval, configs) output := strings.Join(iterInfo, "|") err := utils.WriteFile(o.TuningFile, output+"\n", utils.FilePerm, os.O_APPEND|os.O_WRONLY) @@ -673,6 +682,7 @@ func (o *Optimizer) Backup(ch chan *PB.TuningMessage) error { log.Error(err) return err } + o.InitConfig = strings.Join(initConfigure, ",") return nil } diff --git a/modules/client/profile/profile_tuning.go b/modules/client/profile/profile_tuning.go index b0b604625fd95f741bc722e1a75f471e765cb47e..1054cedfd99f41e0a838f52a6c6464d33b2725f5 100644 --- a/modules/client/profile/profile_tuning.go +++ b/modules/client/profile/profile_tuning.go @@ -148,6 +148,26 @@ func profileTunning(ctx *cli.Context) error { } state := reply.GetState() switch state { + case PB.TuningMessage_JobCreate: + if !init { + select { + case err := <-errors: + return err + case <-finished: + break + } + init = true + } + content := &PB.TuningMessage{ + State: PB.TuningMessage_JobCreate, + TuningLog: &PB.TuningHistory{ + BaseEval: prj.BasePerformance(), + SumEval: fmt.Sprintf("evaluations=%.2f", prj.EvalCurrent), + }, + } + if err := stream.Send(content); err != nil { + return fmt.Errorf("client sends failure, error: %v", err) + } case PB.TuningMessage_JobInit: prj.FeatureFilter = reply.GetFeatureFilter() iterations, err := strconv.Atoi(string(reply.GetContent())) @@ -155,24 +175,15 @@ func profileTunning(ctx *cli.Context) error { return err } prj.TotalIters = int32(iterations) + if ctx.Bool("restart") { + prj.SetHistoryEvalBase(reply.GetTuningLog()) + } case PB.TuningMessage_JobRestart: prj.StartIters = 1 if err := stream.Send(&PB.TuningMessage{State: PB.TuningMessage_JobRestart, Content: []byte(strconv.Itoa(int(prj.Iterations)))}); err != nil { return fmt.Errorf("client sends failure, error: %v", err) } case PB.TuningMessage_BenchMark: - if !init { - select { - case err := <-errors: - return err - case <-finished: - break - } - init = true - } - if ctx.Bool("restart") { - prj.SetHistoryEvalBase(reply.GetTuningLog()) - } prj.Params = string(reply.GetContent()) evaluationSum, evaluationDetail, err := prj.BenchMark() if err != nil { @@ -187,14 +198,14 @@ func profileTunning(ctx *cli.Context) error { prj.StartIters, prj.TotalIters) } else { fmt.Printf(" Current Tuning Progress......(%d/%d)\n", prj.StartIters, prj.TotalIters) - fmt.Printf(" Used time: %s, Total Time: %s, Best Performance: %s, Performance Improvement Rate: %s%%\n", + fmt.Printf(" Used time: %s, Total Time: %s, Best Performance: (%s), Performance Improvement Rate: %s%%\n", currentTime.Sub(prj.StartsTime).Round(time.Second).String(), time.Duration(int64(currentTime.Sub(prj.StartsTime).Round(time.Second).Seconds())+prj.TotalTime)*time.Second, prj.BestPerformance(), prj.ImproveRateString(prj.EvalMin)) } if ctx.Bool("detail") && !prj.FeatureFilter { fmt.Printf(" The %dth recommand parameters is: %s\n"+ - " The %dth evaluation value: %s(%s%%)\n", prj.StartIters, prj.Params, prj.StartIters, prj.CurrPerformance(), prj.ImproveRateString(prj.EvalCurrent)) + " The %dth evaluation value: (%s)(%s%%)\n", prj.StartIters, prj.Params, prj.StartIters, prj.CurrPerformance(), prj.ImproveRateString(prj.EvalCurrent)) } prj.StartIters++ err = stream.Send(&PB.TuningMessage{ @@ -206,12 +217,18 @@ func profileTunning(ctx *cli.Context) error { return fmt.Errorf("client sends failure, error: %v", err) } case PB.TuningMessage_Threshold: - benchmarkByte, err := prj.Threshold() + evaluationSum, evaluationDetail, err := prj.Threshold() if err != nil { - fmt.Println("benchmark result:", benchmarkByte) + fmt.Println("get threshold failed") return err } - if err := stream.Send(&PB.TuningMessage{State: PB.TuningMessage_BenchMark, Content: []byte(benchmarkByte)}); err != nil { + prj.StartIters++ + err = stream.Send(&PB.TuningMessage{ + State: PB.TuningMessage_BenchMark, + Content: []byte(evaluationDetail), + TuningLog: &PB.TuningHistory{SumEval: evaluationSum}, + }) + if err != nil { return fmt.Errorf("client sends failure, error: %v", err) } case PB.TuningMessage_Display: @@ -221,7 +238,7 @@ func profileTunning(ctx *cli.Context) error { fmt.Printf(" %s\n", string(reply.GetContent())) } case PB.TuningMessage_Ending: - fmt.Printf(" Baseline Performance is: %s\n", prj.BasePerformance()) + fmt.Printf(" Baseline Performance is: (%s)\n", prj.BasePerformance()) fmt.Printf(" %s\n", string(reply.GetContent())) fmt.Printf(" Tuning Finished\n") goto End @@ -329,6 +346,7 @@ func checkTuningPrjYaml(prj project.YamlPrjCli) error { return fmt.Errorf("error: split_count must be > 0 "+ "in project %s", prj.Project) } + return nil } diff --git a/modules/server/profile/profile.go b/modules/server/profile/profile.go index 8ede80f323b5814614a39b02081a04b46b8124a9..b7e26d649f93a0ab7c48e692c9ed52e2141f7aee 100644 --- a/modules/server/profile/profile.go +++ b/modules/server/profile/profile.go @@ -620,7 +620,10 @@ func (s *ProfileServer) Tuning(stream PB.ProfileMgr_TuningServer) error { optimizer.FeatureFilterIters = reply.GetFeatureFilterIters() optimizer.SplitCount = reply.GetSplitCount() cycles = reply.GetFeatureFilterCycle() - + ch <- &PB.TuningMessage{State: PB.TuningMessage_JobCreate} + case PB.TuningMessage_JobCreate: + optimizer.EvalBase = reply.GetTuningLog().GetBaseEval() + optimizer.Evaluations = reply.GetTuningLog().GetSumEval() if cycles == 0 { if optimizer.Restart { message = fmt.Sprintf("%d.Continue to tuning the system......", step)