| @@ -161,6 +161,13 @@ func (m *ModelArtsLink) SubmitTask(ctx context.Context, imageId string, cmd stri | |||||
| inputs := make([]*modelarts.InputTraining, 0) | inputs := make([]*modelarts.InputTraining, 0) | ||||
| outputs := make([]*modelarts.OutputTraining, 0) | outputs := make([]*modelarts.OutputTraining, 0) | ||||
| outputValue := "" | outputValue := "" | ||||
| // add default param, env | |||||
| current_id := strconv.Itoa(int(m.participantId)) | |||||
| current_platform := CURRENT_PLATFORM + COMMA + current_id | |||||
| params = append(params, current_platform) | |||||
| envs = append(envs, current_platform) | |||||
| for _, env := range envs { | for _, env := range envs { | ||||
| // 找到第一个逗号位置 | // 找到第一个逗号位置 | ||||
| idx := strings.Index(env, COMMA) | idx := strings.Index(env, COMMA) | ||||
| @@ -216,6 +216,11 @@ func (o *OpenI) SubmitTask(ctx context.Context, imageId string, cmd string, envs | |||||
| } `json:"parameter"` | } `json:"parameter"` | ||||
| } | } | ||||
| // add default param | |||||
| current_id := strconv.Itoa(int(o.participantId)) | |||||
| current_platform := CURRENT_PLATFORM + COMMA + current_id | |||||
| params = append(params, current_platform) | |||||
| for _, param := range params { | for _, param := range params { | ||||
| s := strings.Split(param, COMMA) | s := strings.Split(param, COMMA) | ||||
| st := struct { | st := struct { | ||||
| @@ -88,6 +88,7 @@ const ( | |||||
| POINT = "point" | POINT = "point" | ||||
| RUNNINGTASK = "RUNNING_TASK" | RUNNINGTASK = "RUNNING_TASK" | ||||
| RUNNING = "RUNNING" | RUNNING = "RUNNING" | ||||
| CURRENT_PLATFORM = "CURRENT_PLATFORM" //default param | |||||
| ) | ) | ||||
| var ( | var ( | ||||