| @@ -1459,9 +1459,9 @@ func QueryModelTrainJobList(repoId int64) ([]*CloudbrainInfo, int, error) { | |||||
| cond = cond.And( | cond = cond.And( | ||||
| builder.Eq{"job_type": "TRAIN"}, | builder.Eq{"job_type": "TRAIN"}, | ||||
| ) | ) | ||||
| cond = cond.And( | |||||
| builder.In("type", 0, 1), | |||||
| ) | |||||
| // cond = cond.And( | |||||
| // builder.In("type", 0, 1), | |||||
| // ) | |||||
| cloudbrains := make([]*CloudbrainInfo, 0) | cloudbrains := make([]*CloudbrainInfo, 0) | ||||
| if err := sess.Select("job_id,display_job_name").Table(&Cloudbrain{}).Where(cond).OrderBy("created_unix DESC"). | if err := sess.Select("job_id,display_job_name").Table(&Cloudbrain{}).Where(cond).OrderBy("created_unix DESC"). | ||||
| @@ -81,6 +81,16 @@ func saveModelByParameters(jobId string, versionName string, name string, versio | |||||
| log.Info("download model from CloudBrainOne faild." + err.Error()) | log.Info("download model from CloudBrainOne faild." + err.Error()) | ||||
| return err | return err | ||||
| } | } | ||||
| } else if cloudType == models.TypeC2Net { | |||||
| if aiTask.ComputeResource == models.NPUResource { | |||||
| modelPath, modelSize, err = downloadModelFromCloudBrainTwo(id, aiTask.JobName, "", aiTask.TrainUrl, modelSelectedFile) | |||||
| if err != nil { | |||||
| log.Info("download model from CloudBrainTwo faild." + err.Error()) | |||||
| return err | |||||
| } | |||||
| } else if aiTask.ComputeResource == models.GPUResource { | |||||
| } | |||||
| } | } | ||||
| accuracy := make(map[string]string) | accuracy := make(map[string]string) | ||||
| accuracy["F1"] = "" | accuracy["F1"] = "" | ||||
| @@ -440,7 +440,15 @@ | |||||
| if(trainJob ==null || trainJob ==""){ | if(trainJob ==null || trainJob ==""){ | ||||
| console.log("trainJob is null"); | console.log("trainJob is null"); | ||||
| }else{ | }else{ | ||||
| $.get(`${repolink}/modelmanage/query_train_model?jobName=${trainJob.JobName}&type=${trainJob.Type}&VersionName=${trainJob.VersionName}`, (data) => { | |||||
| let type = trainJob.Type; | |||||
| if(type == 3){ | |||||
| if(trainJob.ComputeResource=="NPU"){ | |||||
| type=1; | |||||
| }else{ | |||||
| type=0; | |||||
| } | |||||
| } | |||||
| $.get(`${repolink}/modelmanage/query_train_model?jobName=${trainJob.JobName}&type=${type}&VersionName=${trainJob.VersionName}`, (data) => { | |||||
| const n_length = data.length | const n_length = data.length | ||||
| let file_html='' | let file_html='' | ||||
| let firstFileName ='' | let firstFileName ='' | ||||