Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1417 Reviewed-by: ychao_1983 <ychao_1983@sina.com>tags/v1.22.1.3
| @@ -1249,9 +1249,9 @@ func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainF | |||||
| if _, err := os.Stat(codePath + "/train.py"); err != nil { | if _, err := os.Stat(codePath + "/train.py"); err != nil { | ||||
| if os.IsNotExist(err) { | if os.IsNotExist(err) { | ||||
| // file does not exist | // 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) | cloudBrainNewDataPrepare(ctx) | ||||
| ctx.RenderWithErr("train.py is not exist", tplCloudBrainBenchmarkNew, &form) | |||||
| ctx.RenderWithErr("train.py does not exist", tplCloudBrainBenchmarkNew, &form) | |||||
| } else { | } else { | ||||
| log.Error("Stat failed, %v", err, ctx.Data["MsgID"]) | log.Error("Stat failed, %v", err, ctx.Data["MsgID"]) | ||||
| cloudBrainNewDataPrepare(ctx) | cloudBrainNewDataPrepare(ctx) | ||||
| @@ -1261,9 +1261,9 @@ func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainF | |||||
| } else if _, err := os.Stat(codePath + "/test.py"); err != nil { | } else if _, err := os.Stat(codePath + "/test.py"); err != nil { | ||||
| if os.IsNotExist(err) { | if os.IsNotExist(err) { | ||||
| // file does not exist | // 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) | cloudBrainNewDataPrepare(ctx) | ||||
| ctx.RenderWithErr("test.py is not exist", tplCloudBrainBenchmarkNew, &form) | |||||
| ctx.RenderWithErr("test.py does not exist", tplCloudBrainBenchmarkNew, &form) | |||||
| } else { | } else { | ||||
| log.Error("Stat failed, %v", err, ctx.Data["MsgID"]) | log.Error("Stat failed, %v", err, ctx.Data["MsgID"]) | ||||
| cloudBrainNewDataPrepare(ctx) | cloudBrainNewDataPrepare(ctx) | ||||
| @@ -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 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> | ||||
| <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</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> | </div> | ||||
| </span> | </span> | ||||
| @@ -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,'')"> | <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> | ||||
| <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> | <label>任务类型</label> | ||||
| <select id="cloudbrain_job_type" class="ui search dropdown" placeholder="选择任务类型" style='width:385px' name="job_type"> | <select id="cloudbrain_job_type" class="ui search dropdown" placeholder="选择任务类型" style='width:385px' name="job_type"> | ||||
| <option name="job_type" value="DEBUG">DEBUG</option> | <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}} | {{if .is_snn4imagenet_enabled}} | ||||
| <option name="job_type" value="SNN4IMAGENET">SNN4IMAGENET</option> | <option name="job_type" value="SNN4IMAGENET">SNN4IMAGENET</option> | ||||
| {{end}} | {{end}} | ||||