mirror of
https://gitee.com/openeuler/A-Tune.git
synced 2025-12-06 16:09:25 +08:00
add new parameter History_path for transfer-learning-based bo tuning
This commit is contained in:
@@ -36,6 +36,7 @@ const (
|
||||
TuningMessage_Threshold TuningMessageStatus = 8
|
||||
TuningMessage_JobCreate TuningMessageStatus = 9
|
||||
TuningMessage_GetInitialConfig TuningMessageStatus = 10
|
||||
TuningMessage_GetHistoryPath TuningMessageStatus = 11
|
||||
)
|
||||
|
||||
var TuningMessageStatus_name = map[int32]string{
|
||||
@@ -50,6 +51,7 @@ var TuningMessageStatus_name = map[int32]string{
|
||||
8: "Threshold",
|
||||
9: "JobCreate",
|
||||
10: "GetInitialConfig",
|
||||
11: "GetHistoryPath",
|
||||
}
|
||||
|
||||
var TuningMessageStatus_value = map[string]int32{
|
||||
@@ -64,6 +66,7 @@ var TuningMessageStatus_value = map[string]int32{
|
||||
"Threshold": 8,
|
||||
"JobCreate": 9,
|
||||
"GetInitialConfig": 10,
|
||||
"GetHistoryPath": 11,
|
||||
}
|
||||
|
||||
func (x TuningMessageStatus) String() string {
|
||||
@@ -673,6 +676,7 @@ type TuningMessage struct {
|
||||
EvalFluctuation float64 `protobuf:"fixed64,14,opt,name=EvalFluctuation,proto3" json:"EvalFluctuation,omitempty"`
|
||||
FeatureSelector string `protobuf:"bytes,15,opt,name=FeatureSelector,proto3" json:"FeatureSelector,omitempty"`
|
||||
InitialConfig string `protobuf:"bytes,16,opt,name=InitialConfig,proto3" json:"InitialConfig,omitempty"`
|
||||
HistoryPath []string `protobuf:"bytes,17,opt,name=HistoryPath,proto3" json:"HistoryPath,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -738,6 +742,13 @@ func (m *TuningMessage) GetRandomStarts() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TuningMessage) GetHistoryPath() []string {
|
||||
if m != nil {
|
||||
return m.HistoryPath
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TuningMessage) GetFeatureFilterEngine() string {
|
||||
if m != nil {
|
||||
return m.FeatureFilterEngine
|
||||
|
||||
@@ -121,6 +121,7 @@ message TuningMessage {
|
||||
Threshold = 8;
|
||||
JobCreate = 9;
|
||||
GetInitialConfig = 10;
|
||||
GetHistoryPath = 11;
|
||||
}
|
||||
status state = 4;
|
||||
int32 RandomStarts = 5;
|
||||
@@ -135,6 +136,7 @@ message TuningMessage {
|
||||
double EvalFluctuation = 14;
|
||||
string FeatureSelector = 15;
|
||||
string InitialConfig = 16;
|
||||
[]string HistoryPath = 17;
|
||||
}
|
||||
|
||||
message TuningHistory {
|
||||
|
||||
@@ -28,6 +28,7 @@ type OptimizerPostBody struct {
|
||||
Knobs []Knob `json:"knobs"`
|
||||
Engine string `json:"engine"`
|
||||
RandomStarts int32 `json:"random_starts"`
|
||||
HistoryPath []string `json:"history_path"`
|
||||
Xref [][]string `json:"x_ref,omitempty"`
|
||||
Yref []string `json:"y_ref,omitempty"`
|
||||
FeatureFilter bool `json:"feature_filter"`
|
||||
|
||||
@@ -58,6 +58,7 @@ type YamlPrjCli struct {
|
||||
RandomStarts int32 `yaml:"random_starts"`
|
||||
Benchmark string `yaml:"benchmark"`
|
||||
Engine string `yaml:"engine"`
|
||||
HistoryPath []string `yaml:"history_path"`
|
||||
FeatureFilterEngine string `yaml:"feature_filter_engine"`
|
||||
FeatureFilterCycle int32 `yaml:"feature_filter_cycle"`
|
||||
FeatureFilterIters int32 `yaml:"feature_filter_iters"`
|
||||
|
||||
@@ -51,6 +51,7 @@ type Optimizer struct {
|
||||
SplitCount int32
|
||||
EvalFluctuation float64
|
||||
RandomStarts int32
|
||||
HistoryPath []string
|
||||
OptimizerPutURL string
|
||||
FinalEval string
|
||||
Engine string
|
||||
|
||||
@@ -128,6 +128,7 @@ func profileTunning(ctx *cli.Context) error {
|
||||
Name: ctx.String("project"),
|
||||
Restart: ctx.Bool("restart"),
|
||||
RandomStarts: prj.RandomStarts,
|
||||
HistoryPath: prj.HistoryPath,
|
||||
Engine: prj.Engine,
|
||||
State: state,
|
||||
Content: []byte(strconv.Itoa(int(prj.Iterations))),
|
||||
|
||||
@@ -758,6 +758,7 @@ func (s *ProfileServer) Tuning(stream PB.ProfileMgr_TuningServer) error {
|
||||
optimizer.Content = reply.GetContent()
|
||||
optimizer.Restart = reply.GetRestart()
|
||||
optimizer.RandomStarts = reply.GetRandomStarts()
|
||||
optimizer.HistoryPath=reply.GetHistoryPath()
|
||||
optimizer.FeatureFilterEngine = reply.GetFeatureFilterEngine()
|
||||
optimizer.FeatureFilterIters = reply.GetFeatureFilterIters()
|
||||
optimizer.SplitCount = reply.GetSplitCount()
|
||||
|
||||
Reference in New Issue
Block a user