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