Browse Source

Merge pull request '解决GPU模型时没有显示训练任务的规格问题。' (#2303) from zouap into V20220616

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2303
Reviewed-by: lewis <747342561@qq.com>
tags/v1.22.6.1^2
lewis 3 years ago
parent
commit
8b22b22970
2 changed files with 8 additions and 1 deletions
  1. +8
    -0
      routers/repo/ai_model_manage.go
  2. +0
    -1
      templates/repo/modelmanage/showinfo.tmpl

+ 8
- 0
routers/repo/ai_model_manage.go View File

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


+ 0
- 1
templates/repo/modelmanage/showinfo.tmpl View File

@@ -191,7 +191,6 @@
</div>
</div>
</div>
</div>
</div>


Loading…
Cancel
Save