| @@ -16,8 +16,8 @@ | |||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=TRAIN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="TRAIN">TRAIN</a> | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=TRAIN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="TRAIN">TRAIN</a> | ||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=INFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="INFERENCE">INFERENCE</a> | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=INFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="INFERENCE">INFERENCE</a> | ||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BENCHMARK&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BENCHMARK</a> | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BENCHMARK&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BENCHMARK</a> | ||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">SNN4IMAGENET</a> | |||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BRAINSCORE</a> | |||||
| <!-- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">SNN4IMAGENET</a> | |||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BRAINSCORE</a> --> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;"> | <div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;"> | ||||
| @@ -28,8 +28,8 @@ | |||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=TRAIN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="TRAIN">{{.i18n.Tr "cloudbrain.TRAIN"}}</a> | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=TRAIN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="TRAIN">{{.i18n.Tr "cloudbrain.TRAIN"}}</a> | ||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=INFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="INFERENCE">{{.i18n.Tr "cloudbrain.INFERENCE"}}</a> | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=INFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="INFERENCE">{{.i18n.Tr "cloudbrain.INFERENCE"}}</a> | ||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BENCHMARK&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BENCHMARK"}}</a> | <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BENCHMARK&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BENCHMARK"}}</a> | ||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.SNN4IMAGENET"}}</a> | |||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BRAINSCORE"}}</a> | |||||
| <!-- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.SNN4IMAGENET"}}</a> | |||||
| <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BRAINSCORE"}}</a> --> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;"> | <div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;"> | ||||
| @@ -1,14 +1,14 @@ | |||||
| <div class="dataset-repolink" id="dataset-repolink-init" style="display: none;" data-repolink="{{.RepoLink}}" data-cloudranin-type="{{.cloudbraintype}}"></div> | <div class="dataset-repolink" id="dataset-repolink-init" style="display: none;" data-repolink="{{.RepoLink}}" data-cloudranin-type="{{.cloudbraintype}}"></div> | ||||
| <div class="inline required unite min_title field" id="dataset-base" style="margin-bottom: 0 !important;"> | <div class="inline required unite min_title field" id="dataset-base" style="margin-bottom: 0 !important;"> | ||||
| {{if .newInference}} | |||||
| <label style="font-weight: normal;">{{.i18n.Tr "dataset.dataset"}}</label> | |||||
| {{if or (.benchmarkMode) (.newInference)}} | |||||
| <label style="font-weight: normal;">{{if .benchmarkMode}}{{.i18n.Tr "repo.model_manager"}}</label><span> </span>{{else}}{{.i18n.Tr "dataset.dataset"}}</label> {{end}} | |||||
| {{else}} | {{else}} | ||||
| <label style="font-weight: normal;">{{.i18n.Tr "dataset.dataset"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "dataset.dataset"}}</label> | ||||
| {{end}} | {{end}} | ||||
| <input type="hidden" name="attachment" :value="dataset_uuid"> | <input type="hidden" name="attachment" :value="dataset_uuid"> | ||||
| <input class="disabled" type="text" :value="dataset_name" required onfocus="this.blur();" style="width: 48.5%;"> | <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;"> {{.i18n.Tr "dataset.select_dataset"}}</el-button> | |||||
| <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> | |||||
| <el-dialog | <el-dialog | ||||
| title="{{.i18n.Tr "dataset.select_dataset"}}" | title="{{.i18n.Tr "dataset.select_dataset"}}" | ||||
| :visible.sync="dialogVisible" | :visible.sync="dialogVisible" | ||||
| @@ -69,28 +69,31 @@ | |||||
| <!-- 表头 --> | <!-- 表头 --> | ||||
| <div class="ui grid stackable" style="background: #f0f0f0;;"> | <div class="ui grid stackable" style="background: #f0f0f0;;"> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="three wide column padding0"> | |||||
| <div class="three wide column padding0" style="width: 18% !important;"> | |||||
| <span style="margin:0 6px">{{$.i18n.Tr "repo.cloudbrain_task"}}</span> | <span style="margin:0 6px">{{$.i18n.Tr "repo.cloudbrain_task"}}</span> | ||||
| </div> | </div> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||||
| <span>{{$.i18n.Tr "repo.modelarts.status"}}</span> | <span>{{$.i18n.Tr "repo.modelarts.status"}}</span> | ||||
| </div> | </div> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||||
| <span>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</span> | <span>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</span> | ||||
| </div> | </div> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||||
| <span>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</span> | |||||
| </div> | |||||
| <div class="two wide column text center padding0" style="width: 8.5% !important;"> | |||||
| <span>{{$.i18n.Tr "repo.modelarts.createtime"}}</span> | <span>{{$.i18n.Tr "repo.modelarts.createtime"}}</span> | ||||
| </div> | </div> | ||||
| <div class="one wide column text center padding0"> | |||||
| <div class="one wide column text center padding0" style="width: 8% !important;"> | |||||
| <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | ||||
| </div> | </div> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 8% !important;"> | |||||
| <span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | <span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | ||||
| </div> | </div> | ||||
| <div class="one wide column text center padding0"> | |||||
| <div class="one wide column text center padding0" style="width: 6% !important;"> | |||||
| <span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | ||||
| </div> | </div> | ||||
| <div class="three wide column text center padding0"> | |||||
| <div class="three wide column text center padding0" style="width: 20% !important;"> | |||||
| <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -101,36 +104,41 @@ | |||||
| <div class="row"> | <div class="row"> | ||||
| <!-- 任务名 --> | <!-- 任务名 --> | ||||
| <div class="three wide column padding0"> | |||||
| <div class="three wide column padding0" style="width: 18% !important;"> | |||||
| <a class="title" href="{{$.Link}}/{{.Cloudbrain.ID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | <a class="title" href="{{$.Link}}/{{.Cloudbrain.ID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | ||||
| <span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | <span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | ||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| <!-- 任务状态 --> | <!-- 任务状态 --> | ||||
| <div class="two wide column padding0" style="padding-left: 2.2rem !important;"> | |||||
| <div class="two wide column padding0" style="width: 10.5% !important;"> | |||||
| <span class="job-status" id="{{.Cloudbrain.ID}}" data-repopath="{{$.RepoRelPath}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}" data-jobid="{{.Cloudbrain.ID}}" data-version="{{.VersionName}}"> | <span class="job-status" id="{{.Cloudbrain.ID}}" data-repopath="{{$.RepoRelPath}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}" data-jobid="{{.Cloudbrain.ID}}" data-version="{{.VersionName}}"> | ||||
| <span><i id="{{.Cloudbrain.ID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.Cloudbrain.ID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | <span><i id="{{.Cloudbrain.ID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.Cloudbrain.ID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | ||||
| </span> | </span> | ||||
| </div> | </div> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||||
| <a style="font-size: 12px;" href="{{.BenchmarkTypeRankLink}}" target="_blank"> | |||||
| {{.BenchmarkType}} | |||||
| </a> | |||||
| </div> | |||||
| <div class="two wide column text center padding0" style="width: 10.5% !important;"> | |||||
| <a style="font-size: 12px;" href="{{.BenchmarkTypeRankLink}}" target="_blank"> | <a style="font-size: 12px;" href="{{.BenchmarkTypeRankLink}}" target="_blank"> | ||||
| {{.BenchmarkTypeName}} | |||||
| {{.BenchmarkTypeName}} | |||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| <!-- 任务创建时间 --> | <!-- 任务创建时间 --> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 8.5% !important;"> | |||||
| <span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | ||||
| </div> | </div> | ||||
| <!-- 任务运行时间 --> | <!-- 任务运行时间 --> | ||||
| <div class="one wide column text center padding0"> | |||||
| <div class="one wide column text center padding0" style="width: 8% !important;"> | |||||
| <span style="font-size: 12px;" id="duration-{{.Cloudbrain.ID}}">{{.TrainJobDuration}}</span> | <span style="font-size: 12px;" id="duration-{{.Cloudbrain.ID}}">{{.TrainJobDuration}}</span> | ||||
| </div> | </div> | ||||
| <!-- 计算资源 --> | <!-- 计算资源 --> | ||||
| <div class="two wide column text center padding0"> | |||||
| <div class="two wide column text center padding0" style="width: 8% !important;"> | |||||
| <span style="font-size: 12px;">{{.ComputeResource}}</span> | <span style="font-size: 12px;">{{.ComputeResource}}</span> | ||||
| </div> | </div> | ||||
| <!-- 创建者 --> | <!-- 创建者 --> | ||||
| <div class="one wide column text center padding0"> | |||||
| <div class="one wide column text center padding0" style="width: 6% !important;"> | |||||
| {{if .User.Name}} | {{if .User.Name}} | ||||
| <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | ||||
| {{else}} | {{else}} | ||||
| @@ -138,7 +146,7 @@ | |||||
| {{end}} | {{end}} | ||||
| </div> | </div> | ||||
| <div class="three wide column text center padding0"> | |||||
| <div class="three wide column text center padding0" style="width: 20% !important;"> | |||||
| <div class="ui compact buttons" > | <div class="ui compact buttons" > | ||||
| <!-- 停止任务 --> | <!-- 停止任务 --> | ||||
| <form id="stopForm-{{.Cloudbrain.ID}}" style="margin-left:-1px;"> | <form id="stopForm-{{.Cloudbrain.ID}}" style="margin-left:-1px;"> | ||||
| @@ -227,3 +235,6 @@ | |||||
| </div> | </div> | ||||
| {{template "base/footer" .}} | {{template "base/footer" .}} | ||||
| <script> | |||||
| console.log({{.Tasks}}) | |||||
| </script> | |||||
| @@ -76,19 +76,10 @@ | |||||
| {{.i18n.Tr "repo.modelarts.evaluate_job.new_job"}} | {{.i18n.Tr "repo.modelarts.evaluate_job.new_job"}} | ||||
| </h4> | </h4> | ||||
| <div class="ui attached segment"> | <div class="ui attached segment"> | ||||
| <input type="hidden" name="benchmarkMode" value="{{.benchmarkMode}}"> | |||||
| <!-- <form class="ui form"> | |||||
| <div class="required unite min_title inline field"> | |||||
| <label style="font-weight: normal;">评测场景</label> | |||||
| <div class="ui blue small menu compact selectcloudbrain"> | |||||
| <a class="active item alogrithm_benchmark" href="javascript:void(0)">算法评测</a> | |||||
| <a class="item model_benchmark" href="javascript:void(0)">模型评测</a> | |||||
| </div> | |||||
| </div> | |||||
| </form> --> | |||||
| <!-- equal width --> | |||||
| {{if eq .benchmarkMode "model"}} | {{if eq .benchmarkMode "model"}} | ||||
| <form class="ui form model_form" action="{{.Link}}" method="post"> | |||||
| <form class="ui form model_form" action="{{.Link}}?benchmarkMode=alogrithm" method="post"> | |||||
| {{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
| <input type="hidden" name="action" value="update"> | <input type="hidden" name="action" value="update"> | ||||
| <div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
| @@ -129,10 +120,7 @@ | |||||
| <a id="benchmark_model_example" href="https://git.openi.org.cn/yult/snn4imagenet">查看样例</a> | <a id="benchmark_model_example" href="https://git.openi.org.cn/yult/snn4imagenet">查看样例</a> | ||||
| </div> | </div> | ||||
| <div id="images-new-cb"> | <div id="images-new-cb"> | ||||
| </div> | </div> | ||||
| {{template "custom/select_dataset_train" .}} | {{template "custom/select_dataset_train" .}} | ||||
| <div class="required unite min_title inline field" style="margin-top:2rem;"> | <div class="required unite min_title inline field" style="margin-top:2rem;"> | ||||
| @@ -143,7 +131,6 @@ | |||||
| {{end}} | {{end}} | ||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| <div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
| <button class="ui create_train_job green button"> | <button class="ui create_train_job green button"> | ||||
| {{.i18n.Tr "repo.cloudbrain.new"}} | {{.i18n.Tr "repo.cloudbrain.new"}} | ||||
| @@ -153,7 +140,7 @@ | |||||
| </div> | </div> | ||||
| </form> | </form> | ||||
| {{else}} | {{else}} | ||||
| <form class="ui form alogrithm_form" action="{{.Link}}" method="post"> | |||||
| <form class="ui form alogrithm_form" action="{{.Link}}?benchmarkMode=alogrithm" method="post"> | |||||
| {{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
| <input type="hidden" name="action" value="update"> | <input type="hidden" name="action" value="update"> | ||||
| <input type="hidden" name="job_type" value="BENCHMARK"> | <input type="hidden" name="job_type" value="BENCHMARK"> | ||||
| @@ -183,8 +170,6 @@ | |||||
| {{end}} | {{end}} | ||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| <div class="required unite inline min_title fields" style="width: 90%;"> | <div class="required unite inline min_title fields" style="width: 90%;"> | ||||
| <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> | ||||
| @@ -206,13 +191,9 @@ | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div id="images-new-cb"> | <div id="images-new-cb"> | ||||
| </div> | </div> | ||||
| <div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
| <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> | <label 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"> | <select id="cloudbrain_resource_spec" class="ui search dropdown" placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' name="resource_spec_id"> | ||||
| @@ -332,7 +313,9 @@ | |||||
| document.onreadystatechange = function() { | document.onreadystatechange = function() { | ||||
| if (document.readyState === "complete") { | if (document.readyState === "complete") { | ||||
| setChildType(); | |||||
| if($('input[name=benchmarkMode]').val()==='alogrithm'){ | |||||
| setChildType(); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||