Browse Source

提交代码

tags/v1.22.5.1^2
ychao_1983 3 years ago
parent
commit
4bf082db2a
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      routers/repo/cloudbrain.go

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

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


Loading…
Cancel
Save