Browse Source

add type info into task info

pull/95/head
lewis 4 years ago
parent
commit
cd424555f9
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      routers/repo/cloudbrain.go

+ 5
- 3
routers/repo/cloudbrain.go View File

@@ -26,7 +26,8 @@ const (
)

var (
gpuInfos *models.GpuInfos
gpuInfos *models.GpuInfos
categories *models.Categories
)

// MustEnableDataset check if repository enable internal cb
@@ -135,8 +136,9 @@ func CloudBrainNew(ctx *context.Context) {
ctx.Data["benchmark_path"] = cloudbrain.BenchMarkMountPath
ctx.Data["is_benchmark_enabled"] = setting.IsBenchmarkEnabled

var categories *models.Categories
json.Unmarshal([]byte(setting.BenchmarkCategory), &categories)
if categories == nil {
json.Unmarshal([]byte(setting.BenchmarkCategory), &categories)
}
ctx.Data["benchmark_categories"] = categories.Category

if gpuInfos == nil {


Loading…
Cancel
Save