Browse Source

Merge branch 'fix-1985' of https://git.openi.org.cn/OpenI/aiforge into fix-1985

pull/2062/head
zhoupzh 3 years ago
parent
commit
1cfd9738cc
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      routers/repo/cloudbrain.go

+ 10
- 0
routers/repo/cloudbrain.go View File

@@ -188,6 +188,8 @@ func cloudBrainNewDataPrepare(ctx *context.Context) error {

ctx.Data["cloudbraintype"] = models.TypeCloudBrainOne

ctx.Data["benchmarkType"] = ctx.Query("benchmarkType")

return nil
}

@@ -1683,6 +1685,13 @@ func CloudBrainBenchmarkIndex(ctx *context.Context) {
} else if ciTasks[i].JobType == string(models.JobTypeSnn4imagenet) || ciTasks[i].JobType == string(models.JobTypeBrainScore) {
ciTasks[i].BenchmarkType = ctx.Tr("cloudbrain.benchmark.model")
ciTasks[i].BenchmarkTypeName = ciTasks[i].JobType

if ciTasks[i].JobType == string(models.JobTypeSnn4imagenet) {
ciTasks[i].BenchmarkTypeRankLink = setting.Snn4imagenetServerHost
} else {
ciTasks[i].BenchmarkTypeRankLink = setting.BrainScoreServerHost
}

}
ciTasks[i].BenchmarkTypeName = ""
if task.BenchmarkTypeID > 0 {
@@ -1734,6 +1743,7 @@ func CloudBrainBenchmarkNew(ctx *context.Context) {
ctx.Data["description"] = ""
ctx.Data["benchmarkTypeID"] = -1
ctx.Data["benchmark_child_types_id_hidden"] = -1
ctx.Data["type"] = ctx.Query("type")
err := cloudBrainNewDataPrepare(ctx)
if err != nil {
ctx.ServerError("get new cloudbrain info failed", err)


Loading…
Cancel
Save