|
|
|
@@ -76,24 +76,14 @@ 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) + "," |
|
|
|
if spec.GPUMemGiB > 0 { |
|
|
|
flaverName += ctx.Tr("cloudbrain.gpu_memory") + ": " + fmt.Sprint(spec.GPUMemGiB) + "GB," |
|
|
|
} |
|
|
|
flaverName += ctx.Tr("cloudbrain.memory") + ": " + fmt.Sprint(spec.MemGiB) + "GB" |
|
|
|
aiTask.FlavorName = flaverName |
|
|
|
} |
|
|
|
} else if aiTask.ComputeResource == models.GPUResource { |
|
|
|
cloudType = models.TypeCloudBrainOne |
|
|
|
spec, err := resource.GetCloudbrainSpec(aiTask.ID) |
|
|
|
if err == nil { |
|
|
|
flaverName := "GPU: " + 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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
spec, err := resource.GetCloudbrainSpec(aiTask.ID) |
|
|
|
if err == nil { |
|
|
|
specJson, _ := json.Marshal(spec) |
|
|
|
aiTask.FlavorName = string(specJson) |
|
|
|
} |
|
|
|
accuracy := make(map[string]string) |
|
|
|
accuracy["F1"] = "" |
|
|
|
accuracy["Recall"] = "" |
|
|
|
|