| @@ -61,7 +61,11 @@ func saveModelByParameters(jobId string, versionName string, name string, versio | |||||
| return err | return err | ||||
| } | } | ||||
| } else if cloudType == models.TypeCloudBrainOne { | } else if cloudType == models.TypeCloudBrainOne { | ||||
| modelPath, modelSize, err = downloadModelFromCloudBrainOne(id, aiTask.JobName, "", aiTask.TrainUrl) | |||||
| if err != nil { | |||||
| log.Info("download model from CloudBrainOne faild." + err.Error()) | |||||
| return err | |||||
| } | |||||
| } | } | ||||
| accuracy := make(map[string]string) | accuracy := make(map[string]string) | ||||
| accuracy["F1"] = "" | accuracy["F1"] = "" | ||||
| @@ -290,7 +294,15 @@ func DownloadMultiModelFile(ctx *context.Context) { | |||||
| } | } | ||||
| path := Model_prefix + models.AttachmentRelativePath(id) + "/" | path := Model_prefix + models.AttachmentRelativePath(id) + "/" | ||||
| if task.Type == models.TypeCloudBrainTwo { | |||||
| } else if task.Type == models.TypeCloudBrainOne { | |||||
| } | |||||
| } | |||||
| func downloadFromCloudBrainTwo(path string, task *models.AiModelManage, ctx *context.Context, id string) { | |||||
| allFile, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, path) | allFile, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, path) | ||||
| if err == nil { | if err == nil { | ||||
| //count++ | //count++ | ||||