Browse Source

Merge pull request '调试任务不可选任务类型' (#1417) from benchmark into V20220125

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1417
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
tags/v1.22.1.3
ychao_1983 3 years ago
parent
commit
10db59bbfb
3 changed files with 6 additions and 9 deletions
  1. +4
    -4
      routers/repo/cloudbrain.go
  2. +1
    -1
      templates/repo/cloudbrain/benchmark/show.tmpl
  3. +1
    -4
      templates/repo/cloudbrain/new.tmpl

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

@@ -1249,9 +1249,9 @@ func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainF
if _, err := os.Stat(codePath + "/train.py"); err != nil {
if os.IsNotExist(err) {
// file does not exist
log.Error("train.py is not exist, %v", err, ctx.Data["MsgID"])
log.Error("train.py does not exist, %v", err, ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
ctx.RenderWithErr("train.py is not exist", tplCloudBrainBenchmarkNew, &form)
ctx.RenderWithErr("train.py does not exist", tplCloudBrainBenchmarkNew, &form)
} else {
log.Error("Stat failed, %v", err, ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
@@ -1261,9 +1261,9 @@ func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainF
} else if _, err := os.Stat(codePath + "/test.py"); err != nil {
if os.IsNotExist(err) {
// file does not exist
log.Error("test.py is not exist, %v", err, ctx.Data["MsgID"])
log.Error("test.py does not exist, %v", err, ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
ctx.RenderWithErr("test.py is not exist", tplCloudBrainBenchmarkNew, &form)
ctx.RenderWithErr("test.py does not exist", tplCloudBrainBenchmarkNew, &form)
} else {
log.Error("Stat failed, %v", err, ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)


+ 1
- 1
templates/repo/cloudbrain/benchmark/show.tmpl View File

@@ -201,7 +201,7 @@ td, th {
<span id="{{.VersionName}}-status-span"><i id="icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
</span>
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
<span class="cti-mgRight-sm uc-accordionTitle-black" id="{{.VersionName}}-duration-span">{{.TrainJobDuration}}</span>
<span class="cti-mgRight-sm uc-accordionTitle-black" id="{{.VersionName}}-duration-span">{{$.duration}}</span>
</div>
</span>


+ 1
- 4
templates/repo/cloudbrain/new.tmpl View File

@@ -150,13 +150,10 @@
<input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
</div>

<div class="inline required field" style="{{if ((.is_benchmark_enabled) or (.is_snn4imagenet_enabled) or (.is_brainscore_enabled))}}display:block;{{else}}display:none;{{end}}">
<div class="inline required field">
<label>任务类型</label>
<select id="cloudbrain_job_type" class="ui search dropdown" placeholder="选择任务类型" style='width:385px' name="job_type">
<option name="job_type" value="DEBUG">DEBUG</option>
{{if .is_benchmark_enabled}}
<option name="job_type" value="BENCHMARK">BENCHMARK</option>
{{end}}
{{if .is_snn4imagenet_enabled}}
<option name="job_type" value="SNN4IMAGENET">SNN4IMAGENET</option>
{{end}}


Loading…
Cancel
Save