|
|
@@ -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) |
|
|
|
} |
|
|
|
|
|
|
|