|
@@ -1,37 +1,9 @@ |
|
|
{{template "base/head" .}} |
|
|
{{template "base/head" .}} |
|
|
<style> |
|
|
|
|
|
.unite { |
|
|
|
|
|
font-family: SourceHanSansSC-medium !important; |
|
|
|
|
|
color: rgba(16, 16, 16, 100) !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
|
font-size: 16px !important; |
|
|
|
|
|
padding-left: 3rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.min_title{ |
|
|
|
|
|
font-size: 14px !important; |
|
|
|
|
|
margin-bottom: 2rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.width81 { |
|
|
|
|
|
margin-left: 1.5rem; |
|
|
|
|
|
width: 81% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.width48 { |
|
|
|
|
|
width: 48.5% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nowrapx { |
|
|
|
|
|
white-space: nowrap !important; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
|
|
|
{{template "custom/global_mask" .}} |
|
|
{{template "custom/global_mask" .}} |
|
|
<div class="repository"> |
|
|
<div class="repository"> |
|
|
{{template "repo/header" .}} |
|
|
{{template "repo/header" .}} |
|
|
<div class="ui container"> |
|
|
<div class="ui container"> |
|
|
|
|
|
<div class="cloudbrain-type" style="display: none;" data-repo-link="{{.RepoLink}}"></div> |
|
|
{{if eq .NotStopTaskCount 0}} |
|
|
{{if eq .NotStopTaskCount 0}} |
|
|
{{template "base/alert" .}} |
|
|
{{template "base/alert" .}} |
|
|
{{end}} |
|
|
{{end}} |
|
@@ -78,21 +50,12 @@ |
|
|
onkeydown="this.value=this.value.substring(0, 255)" |
|
|
onkeydown="this.value=this.value.substring(0, 255)" |
|
|
onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea> |
|
|
onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!--<div class="required min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.gpu_type"}}</label> |
|
|
|
|
|
<select id="cloudbrain_gpu_type" class="ui search dropdown width48" placeholder="选择GPU类型" |
|
|
|
|
|
name="gpu_type"> |
|
|
|
|
|
{{range .benchmark_gpu_types}} |
|
|
|
|
|
<option value="{{.Queue}}">{{.Value}}</option> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
</select> |
|
|
|
|
|
</div>--> |
|
|
|
|
|
<div class="required unite min_title two inline fields" style="margin-left: 80px;"> |
|
|
|
|
|
|
|
|
<div class="required min_title two inline fields" style="margin-left: 80px;"> |
|
|
<div class="required ten wide field" style="width: 26.5% !important;"> |
|
|
<div class="required ten wide field" style="width: 26.5% !important;"> |
|
|
<label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.task_type"}}</label> |
|
|
<label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.task_type"}}</label> |
|
|
<select id="cloudbrain_job_type" class="ui search dropdown job_type" |
|
|
|
|
|
|
|
|
<select id="cloudbrain_job_type" class="ui search dropdown job_type" |
|
|
placeholder="select {{.i18n.Tr "cloudbrain.task_type"}}" name="job_type"> |
|
|
placeholder="select {{.i18n.Tr "cloudbrain.task_type"}}" name="job_type"> |
|
|
|
|
|
<option value="SNN4ECOSET">SNN4ECOSET</option> |
|
|
<option value="SNN4IMAGENET">SNN4IMAGENET</option> |
|
|
<option value="SNN4IMAGENET">SNN4IMAGENET</option> |
|
|
<option value="BRAINSCORE">BRAINSCORE</option> |
|
|
<option value="BRAINSCORE">BRAINSCORE</option> |
|
|
</select> |
|
|
</select> |
|
@@ -116,22 +79,10 @@ |
|
|
<a id="benchmark_model_example" href="https://openi.pcl.ac.cn/BDIP/snn4imagenet" |
|
|
<a id="benchmark_model_example" href="https://openi.pcl.ac.cn/BDIP/snn4imagenet" |
|
|
target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> |
|
|
target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
{{template "custom/select_model" .}} |
|
|
<div id="images-new-cb"> |
|
|
<div id="images-new-cb"> |
|
|
</div> |
|
|
</div> |
|
|
{{template "custom/select_dataset_train" .}} |
|
|
|
|
|
<!--<div class="required min_title inline field" style="margin-top:2rem;"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
|
|
|
<select id="cloudbrain_resource_spec" class="ui search dropdown" |
|
|
|
|
|
placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' |
|
|
|
|
|
name="resource_spec_id"> |
|
|
|
|
|
{{range .benchmark_resource_specs}} |
|
|
|
|
|
<option name="resource_spec_id" value="{{.Id}}"> |
|
|
|
|
|
{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{.MemMiB}},{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}} |
|
|
|
|
|
</option> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
</select> |
|
|
|
|
|
</div>--> |
|
|
|
|
|
|
|
|
|
|
|
<div class="required min_title inline field" style="margin-top:2rem;"> |
|
|
<div class="required min_title inline field" style="margin-top:2rem;"> |
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
<select id="__specs__" class="ui search dropdown width48" |
|
|
<select id="__specs__" class="ui search dropdown width48" |
|
@@ -156,7 +107,7 @@ |
|
|
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
{{.i18n.Tr "repo.cloudbrain.new"}} |
|
|
{{.i18n.Tr "repo.cloudbrain.new"}} |
|
|
</button> |
|
|
</button> |
|
|
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> |
|
|
|
|
|
|
|
|
<a class="ui button" href="{{.RepoLink}}/cloudbrain/benchmark">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</form> |
|
|
</form> |
|
@@ -199,20 +150,11 @@ |
|
|
onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea> |
|
|
onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!--<div class="required min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.gpu_type"}}</label> |
|
|
|
|
|
<select id="cloudbrain_gpu_type" class="ui search dropdown" placeholder="选择GPU类型" |
|
|
|
|
|
style='width:385px' name="gpu_type"> |
|
|
|
|
|
{{range .benchmark_gpu_types}} |
|
|
|
|
|
<option value="{{.Queue}}">{{.Value}}</option> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
</select> |
|
|
|
|
|
</div>--> |
|
|
|
|
|
<div class="required unite inline min_title fields" style="width: 90%;margin-left: 5.7rem;"> |
|
|
|
|
|
|
|
|
<div class="required inline min_title fields" style="width: 90%;margin-left: 5.7rem;"> |
|
|
<div class="required eight wide field"> |
|
|
<div class="required eight wide field"> |
|
|
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</label> |
|
|
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</label> |
|
|
|
|
|
|
|
|
<select class="ui fluid selection search dropdown" id="benchmark_types_id" |
|
|
|
|
|
|
|
|
<select class="ui fluid selection search dropdown benchmark_types_id" |
|
|
name="benchmark_types_id"> |
|
|
name="benchmark_types_id"> |
|
|
{{range .benchmark_types}} |
|
|
{{range .benchmark_types}} |
|
|
{{if eq .Id $.benchmarkTypeID}} |
|
|
{{if eq .Id $.benchmarkTypeID}} |
|
@@ -226,26 +168,13 @@ |
|
|
<div class="eight wide field" id="engine_name"> |
|
|
<div class="eight wide field" id="engine_name"> |
|
|
<input type="hidden" id="benchmark_child_types_id_hidden" name="benchmark_child_types_id_hidden" value="{{.benchmark_child_types_id_hidden}}"> |
|
|
<input type="hidden" id="benchmark_child_types_id_hidden" name="benchmark_child_types_id_hidden" value="{{.benchmark_child_types_id_hidden}}"> |
|
|
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}</label> |
|
|
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}</label> |
|
|
<select class="ui fluid selection dropdown nowrapx" id="benchmark_child_types_id" style='width: 100%;' name="benchmark_child_types_id"> |
|
|
|
|
|
|
|
|
<select class="ui fluid selection dropdown " id="benchmark_child_types_id" style='width: 100%;' name="benchmark_child_types_id"> |
|
|
</select> |
|
|
</select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div id="images-new-cb"> |
|
|
<div id="images-new-cb"> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!--<div class="required min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
|
|
|
<select id="cloudbrain_resource_spec" class="ui search dropdown" |
|
|
|
|
|
placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' |
|
|
|
|
|
name="resource_spec_id"> |
|
|
|
|
|
{{range .benchmark_resource_specs}} |
|
|
|
|
|
<option name="resource_spec_id" value="{{.Id}}"> |
|
|
|
|
|
{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{.MemMiB}},{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}} |
|
|
|
|
|
</option> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
</select> |
|
|
|
|
|
</div>--> |
|
|
|
|
|
|
|
|
|
|
|
<div class="required min_title inline field"> |
|
|
<div class="required min_title inline field"> |
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
<select id="__specs__" class="ui search dropdown width48" |
|
|
<select id="__specs__" class="ui search dropdown width48" |
|
@@ -282,207 +211,144 @@ |
|
|
target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> |
|
|
target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="inline unite min_title field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;"></label> |
|
|
|
|
|
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
|
|
|
{{.i18n.Tr "repo.cloudbrain.new"}} |
|
|
|
|
|
</button> |
|
|
|
|
|
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</form> |
|
|
|
|
|
{{else if eq .benchmarkMode "aisafety"}} |
|
|
|
|
|
<form id="form_id" class="ui form alogrithm_form" action="{{.Link}}?benchmarkMode=alogrithm" method="post"> |
|
|
|
|
|
{{.CsrfTokenHtml}} |
|
|
|
|
|
<input type="hidden" name="action" value="update"> |
|
|
|
|
|
<input type="hidden" name="job_type" value="BENCHMARK"> |
|
|
|
|
|
<div class="required min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}</label> |
|
|
|
|
|
<div class="ui blue small menu compact selectcloudbrain"> |
|
|
|
|
|
<a class="item alogrithm_benchmark" |
|
|
|
|
|
href="{{.Link}}?benchmarkMode=alogrithm">{{.i18n.Tr "repo.cloudbrain.benchmark.algorithm"}}</a> |
|
|
|
|
|
<a class="item model_benchmark" |
|
|
|
|
|
href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> |
|
|
|
|
|
<a class="active item aisafety_benchmark" |
|
|
|
|
|
href="{{.RepoLink}}/modelsafety/create_gpu">模型安全评测</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
<div class="min_title inline field" style="margin-top:-10px;"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;"></label> |
|
|
|
|
|
{{template "custom/task_wait_count" .}} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="required min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> |
|
|
|
|
|
<input style="width: 80%;" name="display_job_name" id="trainjob_job_name" |
|
|
|
|
|
placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" |
|
|
|
|
|
tabindex="3" autofocus required maxlength="36"> |
|
|
|
|
|
<span class="tooltips" style="display: block;margin-left: 11.5rem;">{{.i18n.Tr "repo.cloudbrain_jobname_err"}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;" |
|
|
|
|
|
for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label> |
|
|
|
|
|
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="254" |
|
|
|
|
|
placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} |
|
|
|
|
|
onchange="this.value=this.value.substring(0, 255)" |
|
|
|
|
|
onkeydown="this.value=this.value.substring(0, 255)" |
|
|
|
|
|
onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="images-new-cb"> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="required min_title inline field"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> |
|
|
|
|
|
<select id="__specs__" class="ui search dropdown width48" |
|
|
|
|
|
placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' ovalue="{{.spec_id}}" |
|
|
|
|
|
name="spec_id"> |
|
|
|
|
|
</select> |
|
|
|
|
|
<span><i class="question circle icon link"></i></span> |
|
|
|
|
|
<a href="{{AppSubUrl}}/resource_desc" target="_blank">{{.i18n.Tr "custom.resource_description"}}</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="inline min_title field required"> |
|
|
|
|
|
<label class="label-fix-width" style="font-weight: normal;">推理程序</label> |
|
|
|
|
|
<input disabled="disabled" style="width: 33.5%;" name="test_file" id="test_file" value="test.py" |
|
|
|
|
|
tabindex="3" autofocus required maxlength="254"> |
|
|
|
|
|
<a id="test_href_id" href="https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark" |
|
|
|
|
|
target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="inline unite min_title field"> |
|
|
|
|
|
|
|
|
<div class="inline min_title field"> |
|
|
<label class="label-fix-width" style="font-weight: normal;"></label> |
|
|
<label class="label-fix-width" style="font-weight: normal;"></label> |
|
|
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
<button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}"> |
|
|
{{.i18n.Tr "repo.cloudbrain.new"}} |
|
|
{{.i18n.Tr "repo.cloudbrain.new"}} |
|
|
</button> |
|
|
</button> |
|
|
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> |
|
|
|
|
|
|
|
|
<a class="ui button" href="{{.RepoLink}}/cloudbrain/benchmark">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</form> |
|
|
</form> |
|
|
|
|
|
|
|
|
{{end}} |
|
|
{{end}} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
{{template "base/footer" .}} |
|
|
{{template "base/footer" .}} |
|
|
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> |
|
|
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> |
|
|
|
|
|
<script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> |
|
|
<script> |
|
|
<script> |
|
|
let form = document.getElementById('form_id'); |
|
|
|
|
|
let createFlag = false |
|
|
|
|
|
form.onsubmit = function (e) { |
|
|
|
|
|
if(createFlag) return false |
|
|
|
|
|
createFlag = true |
|
|
|
|
|
} |
|
|
|
|
|
let repolink = {{.RepoLink }} |
|
|
|
|
|
let url_href = window.location.pathname.split('create')[0] |
|
|
|
|
|
$(".ui.button").attr('href', url_href) |
|
|
|
|
|
$('.menu .item') |
|
|
|
|
|
.tab(); |
|
|
|
|
|
$('#benchmark_types_id').change(function () { |
|
|
|
|
|
setChildType(); |
|
|
|
|
|
}) |
|
|
|
|
|
$(document).ready(() => { |
|
|
|
|
|
$('.ui.search.dropdown.job_type').dropdown({ |
|
|
|
|
|
onChange: function (value, text, $selectedItem) { |
|
|
|
|
|
if (value === "BRAINSCORE") { |
|
|
|
|
|
$('#brainscore_child_type').css('display', 'block') |
|
|
|
|
|
$('#benchmark_model_example').attr('href', 'https://openi.pcl.ac.cn/BDIP/similarity2brain_ann') |
|
|
|
|
|
} else { |
|
|
|
|
|
$('#brainscore_child_type').css('display', 'none') |
|
|
|
|
|
$('#benchmark_model_example').attr('href', 'https://openi.pcl.ac.cn/BDIP/snn4imagenet') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
function setChildType() { |
|
|
|
|
|
let type_id = $('#benchmark_types_id').val(); |
|
|
|
|
|
if (type_id == 3) { |
|
|
|
|
|
$('#train_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_MOT_benchmark'); |
|
|
|
|
|
$('#test_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_MOT_benchmark'); |
|
|
|
|
|
} else { |
|
|
|
|
|
$('#train_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark'); |
|
|
|
|
|
$('#test_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark'); |
|
|
|
|
|
} |
|
|
|
|
|
let child_selected_id = $('#benchmark_child_types_id_hidden').val(); |
|
|
|
|
|
$.get(`${repolink}/cloudbrain/benchmark/get_child_types?benchmark_type_id=${type_id}`, (data) => { |
|
|
|
|
|
const n_length = data['child_types'].length |
|
|
|
|
|
let html = '' |
|
|
|
|
|
for (let i = 0; i < n_length; i++) { |
|
|
|
|
|
if (child_selected_id == data['child_types'][i].id) { |
|
|
|
|
|
html += `<option value="${data['child_types'][i].id}" selected="true">${data['child_types'][i].value}</option>`; |
|
|
|
|
|
} else { |
|
|
|
|
|
html += `<option value="${data['child_types'][i].id}">${data['child_types'][i].value}</option>`; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
document.getElementById("benchmark_child_types_id").innerHTML = html; |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
document.onreadystatechange = function () { |
|
|
|
|
|
if (document.readyState === "complete") { |
|
|
|
|
|
if ($('input[name=benchmarkMode]').val() === 'alogrithm' || $('input[name=benchmarkMode]').val() === '') { |
|
|
|
|
|
setChildType(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
var isValidate = false; |
|
|
|
|
|
function validate() { |
|
|
|
|
|
$('.ui.form') |
|
|
|
|
|
.form({ |
|
|
|
|
|
on: 'blur', |
|
|
|
|
|
fields: { |
|
|
|
|
|
image: { |
|
|
|
|
|
identifier: 'image', |
|
|
|
|
|
rules: [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: 'empty', |
|
|
|
|
|
promt: '' |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
display_job_name: { |
|
|
|
|
|
identifier: 'display_job_name', |
|
|
|
|
|
rules: [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', |
|
|
|
|
|
promt: '' |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
spec_id: { |
|
|
|
|
|
identifier: 'spec_id', |
|
|
|
|
|
rules: [{ type: 'empty' }] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
onSuccess: function () { |
|
|
|
|
|
// $('.ui.page.dimmer').dimmer('show') |
|
|
|
|
|
document.getElementById("mask").style.display = "block" |
|
|
|
|
|
isValidate = true; |
|
|
|
|
|
}, |
|
|
|
|
|
onFailure: function (e) { |
|
|
|
|
|
isValidate = false; |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// let repolink = {{.RepoLink }} |
|
|
|
|
|
// $('#benchmark_types_id').change(function () { |
|
|
|
|
|
// console.log("----") |
|
|
|
|
|
// // setChildType(); |
|
|
|
|
|
// }) |
|
|
|
|
|
// $("#benchmark_types_id").dropdown({ |
|
|
|
|
|
// onChange:function (value, text, $selectedItem){ |
|
|
|
|
|
// console.log(value) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// $(document).ready(() => { |
|
|
|
|
|
// $('.ui.search.dropdown.job_type').dropdown({ |
|
|
|
|
|
|
|
|
|
|
|
// onChange: function (value, text, $selectedItem) { |
|
|
|
|
|
// console.log(value) |
|
|
|
|
|
// if (value === "BRAINSCORE") { |
|
|
|
|
|
// $('#brainscore_child_type').css('display', 'block') |
|
|
|
|
|
// $('#benchmark_model_example').attr('href', 'https://openi.pcl.ac.cn/BDIP/similarity2brain_ann') |
|
|
|
|
|
// } else { |
|
|
|
|
|
// $('#brainscore_child_type').css('display', 'none') |
|
|
|
|
|
// $('#benchmark_model_example').attr('href', 'https://openi.pcl.ac.cn/BDIP/snn4imagenet') |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }) |
|
|
|
|
|
// function setChildType(type_id=1) { |
|
|
|
|
|
// if (type_id == 3) { |
|
|
|
|
|
// $('#train_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_MOT_benchmark'); |
|
|
|
|
|
// $('#test_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_MOT_benchmark'); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// $('#train_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark'); |
|
|
|
|
|
// $('#test_href_id').attr('href', 'https://openi.pcl.ac.cn/CV_benchmark/CV_reID_benchmark'); |
|
|
|
|
|
// } |
|
|
|
|
|
// let child_selected_id = $('#benchmark_child_types_id_hidden').val(); |
|
|
|
|
|
// $.get(`${repolink}/cloudbrain/benchmark/get_child_types?benchmark_type_id=${type_id}`, (data) => { |
|
|
|
|
|
// const n_length = data['child_types'].length |
|
|
|
|
|
// let html = '' |
|
|
|
|
|
// for (let i = 0; i < n_length; i++) { |
|
|
|
|
|
// if (child_selected_id == data['child_types'][i].id) { |
|
|
|
|
|
// html += `<option value="${data['child_types'][i].id}" selected="true">${data['child_types'][i].value}</option>`; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// html += `<option value="${data['child_types'][i].id}">${data['child_types'][i].value}</option>`; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// document.getElementById("benchmark_child_types_id").innerHTML = html; |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// $(document).ready(function (){ |
|
|
|
|
|
// console.log("00") |
|
|
|
|
|
// $(".ui.selection.dropdown.benchmark_types_id").dropdown({ |
|
|
|
|
|
// onChange:function (value, text, $selectedItem){ |
|
|
|
|
|
// console.log(value) |
|
|
|
|
|
// setChildType(value) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }) |
|
|
|
|
|
// document.onreadystatechange = function () { |
|
|
|
|
|
// if (document.readyState === "complete") { |
|
|
|
|
|
// if ($('input[name=benchmarkMode]').val() === 'alogrithm' || $('input[name=benchmarkMode]').val() === '') { |
|
|
|
|
|
// setChildType(); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
// var isValidate = false; |
|
|
|
|
|
// function validate() { |
|
|
|
|
|
// $('.ui.form') |
|
|
|
|
|
// .form({ |
|
|
|
|
|
// on: 'blur', |
|
|
|
|
|
// fields: { |
|
|
|
|
|
// image: { |
|
|
|
|
|
// identifier: 'image', |
|
|
|
|
|
// rules: [ |
|
|
|
|
|
// { |
|
|
|
|
|
// type: 'empty', |
|
|
|
|
|
// promt: '' |
|
|
|
|
|
// } |
|
|
|
|
|
// ] |
|
|
|
|
|
// }, |
|
|
|
|
|
// display_job_name: { |
|
|
|
|
|
// identifier: 'display_job_name', |
|
|
|
|
|
// rules: [ |
|
|
|
|
|
// { |
|
|
|
|
|
// type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', |
|
|
|
|
|
// promt: '' |
|
|
|
|
|
// } |
|
|
|
|
|
// ] |
|
|
|
|
|
// }, |
|
|
|
|
|
// spec_id: { |
|
|
|
|
|
// identifier: 'spec_id', |
|
|
|
|
|
// rules: [{ type: 'empty' }] |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
// onSuccess: function () { |
|
|
|
|
|
// // $('.ui.page.dimmer').dimmer('show') |
|
|
|
|
|
// document.getElementById("mask").style.display = "block" |
|
|
|
|
|
// isValidate = true; |
|
|
|
|
|
// }, |
|
|
|
|
|
// onFailure: function (e) { |
|
|
|
|
|
// isValidate = false; |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
validate() |
|
|
|
|
|
$('.ui.create_train_job.green.button').click(function (e) { |
|
|
|
|
|
validate() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// validate() |
|
|
|
|
|
// $('.ui.create_train_job.green.button').click(function (e) { |
|
|
|
|
|
// validate() |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
;(function() { |
|
|
|
|
|
var SPECS = {{ .benchmark_specs }}; |
|
|
|
|
|
var showPoint = {{ .CloudBrainPaySwitch }}; |
|
|
|
|
|
window.renderSpecsSelect($('#__specs__'), SPECS, showPoint, { |
|
|
|
|
|
gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}}, |
|
|
|
|
|
free: {{$.i18n.Tr "cloudbrain.free"}}, |
|
|
|
|
|
point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}}, |
|
|
|
|
|
memory: {{$.i18n.Tr "cloudbrain.memory"}}, |
|
|
|
|
|
shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}}, |
|
|
|
|
|
}); |
|
|
|
|
|
})(); |
|
|
|
|
|
|
|
|
// ;(function() { |
|
|
|
|
|
// var SPECS = {{ .benchmark_specs }}; |
|
|
|
|
|
// var showPoint = {{ .CloudBrainPaySwitch }}; |
|
|
|
|
|
// window.renderSpecsSelect($('#__specs__'), SPECS, showPoint, { |
|
|
|
|
|
// gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}}, |
|
|
|
|
|
// free: {{$.i18n.Tr "cloudbrain.free"}}, |
|
|
|
|
|
// point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}}, |
|
|
|
|
|
// memory: {{$.i18n.Tr "cloudbrain.memory"}}, |
|
|
|
|
|
// shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}}, |
|
|
|
|
|
// }); |
|
|
|
|
|
// })(); |
|
|
</script> |
|
|
</script> |