diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index feacb4547..2c24527ce 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -66,6 +66,14 @@ func saveModelByParameters(jobId string, versionName string, name string, versio return err } } else if cloudType == models.TypeCloudBrainOne { + var ResourceSpecs *models.ResourceSpecs + json.Unmarshal([]byte(setting.ResourceSpecs), &ResourceSpecs) + for _, tmp := range ResourceSpecs.ResourceSpec { + if tmp.Id == aiTask.ResourceSpecId { + flaverName := ctx.Tr("cloudbrain.gpu_num") + ": " + fmt.Sprint(tmp.GpuNum) + " " + ctx.Tr("cloudbrain.cpu_num") + ": " + fmt.Sprint(tmp.CpuNum) + " " + ctx.Tr("cloudbrain.memory") + "(MB): " + fmt.Sprint(tmp.MemMiB) + " " + ctx.Tr("cloudbrain.shared_memory") + "(MB): " + fmt.Sprint(tmp.ShareMemMiB) + aiTask.FlavorName = flaverName + } + } modelPath, modelSize, err = downloadModelFromCloudBrainOne(id, aiTask.JobName, "", aiTask.TrainUrl) if err != nil { log.Info("download model from CloudBrainOne faild." + err.Error()) diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl index 0a57a5f44..a11ff59e5 100644 --- a/templates/repo/modelmanage/showinfo.tmpl +++ b/templates/repo/modelmanage/showinfo.tmpl @@ -191,7 +191,6 @@ -