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