From 4bf082db2a3a248090b3e1ef5e1ecf6ce1007ba9 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 9 May 2022 17:23:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/cloudbrain.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 98f702476..fdea6d2ad 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -526,6 +526,7 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo for _, benchmarkType := range GetBenchmarkTypes(ctx).BenchmarkType { if task.BenchmarkTypeID == benchmarkType.Id { ctx.Data["BenchmarkTypeName"] = benchmarkType.First + task.BenchmarkTypeName = benchmarkType.First for _, benchmarkChildType := range benchmarkType.Second { if task.BenchmarkChildTypeID == benchmarkChildType.Id { ctx.Data["BenchmarkChildTypeName"] = benchmarkChildType.Value @@ -536,6 +537,16 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo } } } + + if task.JobType == string(models.JobTypeBenchmark) { + task.BenchmarkType = ctx.Tr("repo.cloudbrain.benchmark.algorithm") + } else if task.JobType == string(models.JobTypeSnn4imagenet) || task.JobType == string(models.JobTypeBrainScore) { + task.BenchmarkType = ctx.Tr("repo.cloudbrain.benchmark.model") + task.BenchmarkTypeName = task.JobType + ctx.Data["BenchmarkTypeName"] = task.JobType + + } + if task.TrainJobDuration == "" { if task.Duration == 0 { var duration int64