Browse Source

提交代码,解决评审问题。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.11.2^2
zouap 2 years ago
parent
commit
fad7b83278
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      routers/repo/ai_model_manage.go

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

@@ -76,6 +76,11 @@ func saveModelByParameters(jobId string, versionName string, name string, versio
//download model zip //train type
if aiTask.ComputeResource == models.NPUResource {
cloudType = models.TypeCloudBrainTwo
spec, err := resource.GetCloudbrainSpec(aiTask.ID)
if err == nil {
flaverName := "NPU: " + fmt.Sprint(spec.AccCardsNum) + "*" + spec.AccCardType + ",CPU: " + fmt.Sprint(spec.CpuCores) + "," + ctx.Tr("cloudbrain.memory") + ": " + fmt.Sprint(spec.MemGiB) + "GB," + ctx.Tr("cloudbrain.shared_memory") + ": " + fmt.Sprint(spec.ShareMemGiB) + "GB"
aiTask.FlavorName = flaverName
}
} else if aiTask.ComputeResource == models.GPUResource {
cloudType = models.TypeCloudBrainOne
spec, err := resource.GetCloudbrainSpec(aiTask.ID)
@@ -1247,7 +1252,7 @@ func CreateLocalModelForUpload(ctx *context.Context) {
ctx.Data["uuid"] = ctx.Query("uuid")
ctx.Data["isModelManage"] = true
ctx.Data["ModelManageAccess"] = ctx.Repo.CanWrite(models.UnitTypeModelManage)
ctx.Data["max_model_size"] = setting.MaxModelSize * MODEL_MAX_SIZE
ctx.HTML(200, tplCreateLocalForUploadModelInfo)
}



Loading…
Cancel
Save