diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index ed882ffd7..78d2e1327 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -61,7 +61,11 @@ func saveModelByParameters(jobId string, versionName string, name string, versio return err } } 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["F1"] = "" @@ -290,7 +294,15 @@ func DownloadMultiModelFile(ctx *context.Context) { } 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) if err == nil { //count++