Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.1.3
zouap 3 years ago
parent
commit
739cd1289b
3 changed files with 11 additions and 9 deletions
  1. +7
    -7
      routers/repo/cloudbrain.go
  2. +2
    -0
      routers/repo/modelarts.go
  3. +2
    -2
      templates/repo/cloudbrain/benchmark/index.tmpl

+ 7
- 7
routers/repo/cloudbrain.go View File

@@ -32,12 +32,12 @@ const (
tplCloudBrainShow base.TplName = "repo/cloudbrain/show"
tplCloudBrainShowModels base.TplName = "repo/cloudbrain/models/index"

tplCloudBrainBenchmarkNew base.TplName = "repo/cloudbrain/benchmark/new"
tplCloudBrainBenchmarkNew base.TplName = "repo/cloudbrain/benchmark/new"
)

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

@@ -945,9 +945,9 @@ func CloudBrainBenchmarkIndex(ctx *context.Context) {
Page: page,
PageSize: setting.UI.IssuePagingNum,
},
RepoID: repo.ID,
Type: models.TypeCloudBrainOne,
JobType: string(models.JobTypeBenchmark),
RepoID: repo.ID,
Type: models.TypeCloudBrainOne,
JobType: string(models.JobTypeBenchmark),
})
if err != nil {
ctx.ServerError("Get debugjob faild:", err)
@@ -966,7 +966,7 @@ func CloudBrainBenchmarkIndex(ctx *context.Context) {
ctx.Data["Tasks"] = ciTasks
ctx.Data["CanCreate"] = cloudbrain.CanCreateOrDebugJob(ctx)
ctx.Data["RepoIsEmpty"] = repo.IsEmpty
ctx.HTML(200, tplDebugJobIndex)
ctx.HTML(200, tplBenchMarkIndex)
}

func CloudBrainBenchmarkNew(ctx *context.Context) {


+ 2
- 0
routers/repo/modelarts.go View File

@@ -37,6 +37,8 @@ const (
tplModelArtsTrainJobNew base.TplName = "repo/modelarts/trainjob/new"
tplModelArtsTrainJobShow base.TplName = "repo/modelarts/trainjob/show"
tplModelArtsTrainJobVersionNew base.TplName = "repo/modelarts/trainjob/version_new"

tplBenchMarkIndex base.TplName = "repo/cloudbrain/benchmark/index"
)

func DebugJobIndex(ctx *context.Context) {


+ 2
- 2
templates/repo/cloudbrain/benchmark/index.tmpl View File

@@ -34,12 +34,12 @@
<div class="ui blue small menu compact selectcloudbrain">
<a class="item" href="{{.RepoLink}}/debugjob?debugListType=all">{{$.i18n.Tr "repo.modelarts.notebook"}}</a>
<a class="item" href="{{.RepoLink}}/modelarts/train-job">{{$.i18n.Tr "repo.modelarts.train_job"}}</a>
<a class="active item" href="{{.RepoLink}}/modelarts/evaluate-job">{{$.i18n.Tr "repo.modelarts.evaluate_job"}}</a>
<a class="active item" href="{{.RepoLink}}/cloudbrain/benchmark">{{$.i18n.Tr "repo.modelarts.evaluate_job"}}</a>
</div>
</div>
<div class="column right aligned">
{{if .Permission.CanWrite $.UnitTypeCloudBrain}}
<a class="ui green button" href="{{.RepoLink}}/modelarts/evaluate-job/create">{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a>
<a class="ui green button" href="{{.RepoLink}}/cloudbrain/benchmark/create">{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a>
{{else}}
<a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a>
{{end}}


Loading…
Cancel
Save