Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
f067782abb
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      routers/repo/ai_model_manage.go

+ 13
- 1
routers/repo/ai_model_manage.go View File

@@ -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++


Loading…
Cancel
Save