From f067782abb33f415975995b93eb513da8935e437 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 30 May 2022 15:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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++