Browse Source

fix issue

pull/2062/head
zhoupzh 3 years ago
parent
commit
b4ce9ceb4e
3 changed files with 101 additions and 48 deletions
  1. +5
    -1
      templates/custom/select_dataset_train.tmpl
  2. +0
    -28
      templates/repo/cloudbrain/benchmark/new.tmpl
  3. +96
    -19
      templates/repo/cloudbrain/benchmark/show.tmpl

+ 5
- 1
templates/custom/select_dataset_train.tmpl View File

@@ -9,6 +9,9 @@
<input type="hidden" name="attachment" :value="dataset_uuid">
<input class="disabled" type="text" :value="dataset_name" required onfocus="this.blur();" style="width: 48.5%;">
<el-button type="text" @click="dialogVisible = true" icon="el-icon-plus" style="color: #0366d6;"> {{if .benchmarkMode}}{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}{{else}}{{.i18n.Tr "dataset.select_dataset"}}{{end}}</el-button>
{{if .benchmarkMode}}
<span class="tooltips" style="display: block;padding-left: 0.5rem;">说明:先使用数据集功能上传模型,然后从数据集列表选模型。</span>
{{end}}
<el-dialog
title="{{.i18n.Tr "dataset.select_dataset"}}"
:visible.sync="dialogVisible"
@@ -44,7 +47,7 @@
</div>
</div>
{{if not .benchmarkMode}}
</el-tab-pane>
<el-tab-pane label="{{.i18n.Tr "dataset.owner_dataset"}}" name="second">
<div style="display: flex;align-items: center;justify-content: space-between;padding: 1rem 0;border-bottom:1px solid #F5F5F5" v-for="(dataset,index) in myDataset" :key="index">
@@ -121,6 +124,7 @@
</div>

</el-tab-pane>
{{end}}
</el-tabs>
<div class="center">
<el-pagination


+ 0
- 28
templates/repo/cloudbrain/benchmark/new.tmpl View File

@@ -237,7 +237,6 @@

<script>
let repolink = {{.RepoLink}}
console.log({{$.benchmarkMode}})
let url_href = window.location.pathname.split('create')[0]
$(".ui.button").attr('href',url_href)

@@ -260,17 +259,6 @@
}
}
})
// console.log("==============")
// const params = new URLSearchParams(location.search)
// if(params.get('type')=='model'){
// console.log(2)
// $('.model_form').css('display','block')
// $('.alogrithm_form').css('display','none')
// }else if(params.get('type')=='alogrithm'){
// console.log(1)
// $('.model_form').css('display','none')
// $('.alogrithm_form').css('display','block')
// }
})
function setChildType(){
let type_id = $('#benchmark_types_id').val();
@@ -295,22 +283,6 @@
document.getElementById("benchmark_child_types_id").innerHTML=html;
})
}

// $('.alogrithm_benchmark').on('click',(e)=>{
// $('.alogrithm_benchmark').addClass('active')
// $('.model_benchmark').removeClass('active')
// $('.model_form').css('display','none')
// $('.alogrithm_form').css('display','block')
// })
// $('.model_benchmark').on('click',(e)=>{
// $('.model_benchmark').addClass('active')
// $('.alogrithm_benchmark').removeClass('active')
// $('.model_form').css('display','block')
// $('.alogrithm_form').css('display','none')

// })

document.onreadystatechange = function() {
if (document.readyState === "complete") {
if($('input[name=benchmarkMode]').val()==='alogrithm'){


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

@@ -56,7 +56,7 @@
margin:10px 5px ;
}
.tab_2_content {
min-height: 360px;
min-height: 425px;
margin-left: 10px;
}
.ac-grid {
@@ -250,24 +250,51 @@ td, th {
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}}
{{$.i18n.Tr "repo.modelarts.createtime"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w">
<span style="font-size: 12px;" class="">
{{if not (eq .StartTime 0)}}
{{TimeSinceUnix1 .StartTime}}
{{else}}
{{TimeSinceUnix1 .CreatedUnix}}
{{end}}
{{TimeSinceUnix1 .CreatedUnix}}
</span>
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain.time.starttime"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-startTime">
{{if not (eq .StartTime 0)}}
{{TimeSinceUnix1 .StartTime}}
{{else}}
--
{{end}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain.time.endtime"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-EndTime">
{{if not (eq .EndTime 0)}}
{{TimeSinceUnix1 .EndTime}}
{{else}}
--
{{end}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
@@ -292,16 +319,29 @@ td, th {
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName">
{{.BenchmarkType}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName">
{{$.BenchmarkTypeName}}
{{.BenchmarkTypeName}}
</div>
</td>
</tr>


</tbody>
@@ -319,7 +359,11 @@ td, th {

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{if eq .BenchmarkType "Benchmark"}}
train.py
{{else}}
--
{{end}}
</div>
</td>
</tr>
@@ -330,7 +374,11 @@ td, th {

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{if eq .BenchmarkType "Benchmark"}}
test.py
{{else}}
--
{{end}}
</div>
</td>
</tr>
@@ -342,11 +390,25 @@ td, th {

<td class="ti-text-form-content">
<div class="text-span text-span-w" title="{{.Description}}">
{{if .Description}}
{{.Description}}
{{else}}
--
{{end}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "cloudbrain.gpu_type"}}
</td>
<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{$.resource_type}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.standard"}}
@@ -358,7 +420,17 @@ td, th {
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.model_manager"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-mirror">
{{$.datasetname}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain_creator"}}
@@ -371,16 +443,21 @@ td, th {
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkChildTypeName">
{{$.BenchmarkChildTypeName}}
</div>
</td>
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}
</td>
<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkChildTypeName">
{{if $.BenchmarkChildTypeName}}
{{$.BenchmarkChildTypeName}}
{{else}}
--
{{end}}
</div>
</td>
</tr>
</tbody>
</table>
</div>


Loading…
Cancel
Save