您最多选择25个标签 标签必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

3 年前
3 年前
3 年前
3 年前
2 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
3 年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. {{template "base/head" .}}
  2. <style>
  3. .unite {
  4. font-family: SourceHanSansSC-medium !important;
  5. color: rgba(16, 16, 16, 100) !important;
  6. }
  7. .title {
  8. font-size: 16px !important;
  9. padding-left: 3rem !important;
  10. }
  11. .min_title{
  12. font-size: 14px !important;
  13. margin-bottom: 2rem !important;
  14. }
  15. .width81 {
  16. margin-left: 1.5rem;
  17. width: 81% !important;
  18. }
  19. .width48 {
  20. width: 48.5% !important;
  21. }
  22. .nowrapx {
  23. white-space: nowrap !important;
  24. }
  25. </style>
  26. {{template "custom/global_mask" .}}
  27. <div class="repository">
  28. {{template "repo/header" .}}
  29. <div class="ui container">
  30. {{template "base/alert" .}}
  31. <h4 class="ui top attached header">
  32. {{.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}
  33. </h4>
  34. <div class="ui attached segment">
  35. <input type="hidden" name="benchmarkMode" value="{{.benchmarkMode}}">
  36. {{if eq .benchmarkMode "model"}}
  37. <form class="ui form model_form" action="{{.Link}}?benchmarkMode=model" method="post">
  38. {{.CsrfTokenHtml}}
  39. <input type="hidden" name="action" value="update">
  40. <div class="required min_title inline field">
  41. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}</label>
  42. <div class="ui blue small menu compact selectcloudbrain">
  43. <a class="item alogrithm_benchmark"
  44. href="{{.Link}}?benchmarkMode=alogrithm">{{.i18n.Tr "repo.cloudbrain.benchmark.algorithm"}}</a>
  45. <a class="active item model_benchmark"
  46. href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a>
  47. </div>
  48. </div>
  49. <div>
  50. <div class="min_title inline field" style="margin-top:-10px;">
  51. <label class="label-fix-width" style="font-weight: normal;"></label>
  52. {{template "custom/task_wait_count" .}}
  53. </div>
  54. <div class="required min_title inline field">
  55. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
  56. <input style="width: 80%;" name="display_job_name" id="trainjob_job_name"
  57. placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}"
  58. tabindex="3" autofocus required maxlength="36">
  59. <span class="tooltips" style="display: block;margin-left:11.5rem;">{{.i18n.Tr "repo.cloudbrain_jobname_err"}}</span>
  60. </div>
  61. <div class="required min_title inline field">
  62. <label class="label-fix-width" style="font-weight: normal;"
  63. for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label>
  64. <textarea style="width: 80%;" id="description" name="description" rows="3" required
  65. maxlength="254" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}}
  66. onchange="this.value=this.value.substring(0, 255)"
  67. onkeydown="this.value=this.value.substring(0, 255)"
  68. onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea>
  69. </div>
  70. <!--<div class="required min_title inline field">
  71. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.gpu_type"}}</label>
  72. <select id="cloudbrain_gpu_type" class="ui search dropdown width48" placeholder="选择GPU类型"
  73. name="gpu_type">
  74. {{range .benchmark_gpu_types}}
  75. <option value="{{.Queue}}">{{.Value}}</option>
  76. {{end}}
  77. </select>
  78. </div>-->
  79. <div class="required unite min_title two inline fields" style="margin-left: 80px;">
  80. <div class="required ten wide field" style="width: 26.5% !important;">
  81. <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.task_type"}}</label>&nbsp;
  82. <select id="cloudbrain_job_type" class="ui search dropdown job_type"
  83. placeholder="select {{.i18n.Tr "cloudbrain.task_type"}}" name="job_type">
  84. <option value="SNN4IMAGENET">SNN4IMAGENET</option>
  85. <option value="BRAINSCORE">BRAINSCORE</option>
  86. </select>
  87. </div>
  88. <div class="required six widde field" id="brainscore_child_type"
  89. style="width: 15% !important;display: none;">
  90. <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.brain_area"}}</label>
  91. <select class="ui search dropdown" placeholder="select {{.i18n.Tr "cloudbrain.brain_area"}}"
  92. name="benchmark_child_types_id">
  93. <option value="0">V1</option>
  94. <option value="1">V2</option>
  95. <option value="2">V4</option>
  96. <option value="3">IT</option>
  97. </select>
  98. </div>
  99. <span>
  100. <i class="question circle icon link"
  101. data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}}
  102. data-position="right center" data-variation="mini"></i>
  103. </span>
  104. <a id="benchmark_model_example" href="https://git.openi.org.cn/BDIP/snn4imagenet"
  105. target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a>
  106. </div>
  107. <div id="images-new-cb">
  108. </div>
  109. {{template "custom/select_dataset_train" .}}
  110. <!--<div class="required min_title inline field" style="margin-top:2rem;">
  111. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label>
  112. <select id="cloudbrain_resource_spec" class="ui search dropdown"
  113. placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px'
  114. name="resource_spec_id">
  115. {{range .benchmark_resource_specs}}
  116. <option name="resource_spec_id" value="{{.Id}}">
  117. {{$.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}}
  118. </option>
  119. {{end}}
  120. </select>
  121. </div>-->
  122. <div class="required min_title inline field" style="margin-top:2rem;">
  123. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label>
  124. <select id="__specs__" class="ui search dropdown width48"
  125. placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px'
  126. name="spec_id">
  127. </select>
  128. </div>
  129. <div class="inline min_title field">
  130. <label class="label-fix-width" style="font-weight: normal;"></label>
  131. <button class="ui create_train_job green button">
  132. {{.i18n.Tr "repo.cloudbrain.new"}}
  133. </button>
  134. <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  135. </div>
  136. </div>
  137. </form>
  138. {{else}}
  139. <form class="ui form alogrithm_form" action="{{.Link}}?benchmarkMode=alogrithm" method="post">
  140. {{.CsrfTokenHtml}}
  141. <input type="hidden" name="action" value="update">
  142. <input type="hidden" name="job_type" value="BENCHMARK">
  143. <div class="required min_title inline field">
  144. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}</label>
  145. <div class="ui blue small menu compact selectcloudbrain">
  146. <a class="active item alogrithm_benchmark"
  147. href="{{.Link}}?benchmarkMode=alogrithm">{{.i18n.Tr "repo.cloudbrain.benchmark.algorithm"}}</a>
  148. <a class="item model_benchmark"
  149. href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a>
  150. </div>
  151. </div>
  152. <div>
  153. <div class="min_title inline field" style="margin-top:-10px;">
  154. <label class="label-fix-width" style="font-weight: normal;"></label>
  155. {{template "custom/task_wait_count" .}}
  156. </div>
  157. <div class="required min_title inline field">
  158. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
  159. <input style="width: 80%;" name="display_job_name" id="trainjob_job_name"
  160. placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}"
  161. tabindex="3" autofocus required maxlength="36">
  162. <span class="tooltips" style="display: block;margin-left: 11.5rem;">{{.i18n.Tr "repo.cloudbrain_jobname_err"}}</span>
  163. </div>
  164. <div class="min_title inline field">
  165. <label class="label-fix-width" style="font-weight: normal;"
  166. for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label>
  167. <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="254"
  168. placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}}
  169. onchange="this.value=this.value.substring(0, 255)"
  170. onkeydown="this.value=this.value.substring(0, 255)"
  171. onkeyup="this.value=this.value.substring(0, 255)">{{.description}}</textarea>
  172. </div>
  173. <!--<div class="required min_title inline field">
  174. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.gpu_type"}}</label>
  175. <select id="cloudbrain_gpu_type" class="ui search dropdown" placeholder="选择GPU类型"
  176. style='width:385px' name="gpu_type">
  177. {{range .benchmark_gpu_types}}
  178. <option value="{{.Queue}}">{{.Value}}</option>
  179. {{end}}
  180. </select>
  181. </div>-->
  182. <div class="required unite inline min_title fields" style="width: 90%;margin-left: 5.7rem;">&nbsp;
  183. <div class="required eight wide field">
  184. <label
  185. style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</label>
  186. <select class="ui fluid selection search dropdown" id="benchmark_types_id"
  187. name="benchmark_types_id">
  188. {{range .benchmark_types}}
  189. {{if eq .Id $.benchmarkTypeID}}
  190. <option value="{{.Id}}" selected="true">{{.First}}</option>
  191. {{else}}
  192. <option value="{{.Id}}">{{.First}}</option>
  193. {{end}}
  194. {{end}}
  195. </select>
  196. </div>
  197. <div class="eight wide field" id="engine_name">
  198. <input type="hidden" id="benchmark_child_types_id_hidden"
  199. name="benchmark_child_types_id_hidden" value="{{.benchmark_child_types_id_hidden}}">
  200. <label
  201. style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}</label>
  202. <select class="ui fluid selection dropdown nowrapx" id="benchmark_child_types_id"
  203. style='width: 100%;' name="benchmark_child_types_id">
  204. </select>
  205. </div>
  206. </div>
  207. <div id="images-new-cb">
  208. </div>
  209. <!--<div class="required min_title inline field">
  210. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label>
  211. <select id="cloudbrain_resource_spec" class="ui search dropdown"
  212. placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px'
  213. name="resource_spec_id">
  214. {{range .benchmark_resource_specs}}
  215. <option name="resource_spec_id" value="{{.Id}}">
  216. {{$.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}}
  217. </option>
  218. {{end}}
  219. </select>
  220. </div>-->
  221. <div class="required min_title inline field">
  222. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label>
  223. <select id="__specs__" class="ui search dropdown width48"
  224. placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px'
  225. name="spec_id">
  226. </select>
  227. </div>
  228. <div class="inline min_title field required">
  229. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</label>
  230. <input disabled="disabled" style="width: 33.5%;" name="train_file" id="train_file"
  231. value="train.py" tabindex="3" autofocus required maxlength="254">
  232. <a id="train_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark"
  233. target="_blank">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</a>
  234. </div>
  235. <div class="inline min_title field required">
  236. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}</label>
  237. <input disabled="disabled" style="width: 33.5%;" name="test_file" id="test_file" value="test.py"
  238. tabindex="3" autofocus required maxlength="254">
  239. <a id="test_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark"
  240. target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a>
  241. </div>
  242. <div class="inline unite min_title field">
  243. <label class="label-fix-width" style="font-weight: normal;"></label>
  244. <button class="ui create_train_job green button">
  245. {{.i18n.Tr "repo.cloudbrain.new"}}
  246. </button>
  247. <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  248. </div>
  249. </div>
  250. </form>
  251. {{end}}
  252. </div>
  253. </div>
  254. </div>
  255. {{template "base/footer" .}}
  256. <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  257. <script>
  258. let repolink = {{.RepoLink }}
  259. let url_href = window.location.pathname.split('create')[0]
  260. $(".ui.button").attr('href', url_href)
  261. $('.menu .item')
  262. .tab();
  263. $('#benchmark_types_id').change(function () {
  264. setChildType();
  265. })
  266. $(document).ready(() => {
  267. $('.ui.search.dropdown.job_type').dropdown({
  268. onChange: function (value, text, $selectedItem) {
  269. if (value === "BRAINSCORE") {
  270. $('#brainscore_child_type').css('display', 'block')
  271. $('#benchmark_model_example').attr('href', 'https://git.openi.org.cn/BDIP/similarity2brain_ann')
  272. } else {
  273. $('#brainscore_child_type').css('display', 'none')
  274. $('#benchmark_model_example').attr('href', 'https://git.openi.org.cn/BDIP/snn4imagenet')
  275. }
  276. }
  277. })
  278. })
  279. function setChildType() {
  280. let type_id = $('#benchmark_types_id').val();
  281. if (type_id == 3) {
  282. $('#train_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_MOT_benchmark');
  283. $('#test_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_MOT_benchmark');
  284. } else {
  285. $('#train_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark');
  286. $('#test_href_id').attr('href', 'https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark');
  287. }
  288. let child_selected_id = $('#benchmark_child_types_id_hidden').val();
  289. $.get(`${repolink}/cloudbrain/benchmark/get_child_types?benchmark_type_id=${type_id}`, (data) => {
  290. const n_length = data['child_types'].length
  291. let html = ''
  292. for (let i = 0; i < n_length; i++) {
  293. if (child_selected_id == data['child_types'][i].id) {
  294. html += `<option value="${data['child_types'][i].id}" selected="true">${data['child_types'][i].value}</option>`;
  295. } else {
  296. html += `<option value="${data['child_types'][i].id}">${data['child_types'][i].value}</option>`;
  297. }
  298. }
  299. document.getElementById("benchmark_child_types_id").innerHTML = html;
  300. })
  301. }
  302. document.onreadystatechange = function () {
  303. if (document.readyState === "complete") {
  304. if ($('input[name=benchmarkMode]').val() === 'alogrithm' || $('input[name=benchmarkMode]').val() === '') {
  305. setChildType();
  306. }
  307. }
  308. }
  309. function validate() {
  310. $('.ui.form')
  311. .form({
  312. on: 'blur',
  313. fields: {
  314. image: {
  315. identifier: 'image',
  316. rules: [
  317. {
  318. type: 'empty',
  319. promt: ''
  320. }
  321. ]
  322. },
  323. display_job_name: {
  324. identifier: 'display_job_name',
  325. rules: [
  326. {
  327. type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]',
  328. promt: ''
  329. }
  330. ]
  331. },
  332. },
  333. onSuccess: function () {
  334. // $('.ui.page.dimmer').dimmer('show')
  335. document.getElementById("mask").style.display = "block"
  336. },
  337. onFailure: function (e) {
  338. return false;
  339. }
  340. })
  341. }
  342. validate()
  343. $('.ui.create_train_job.green.button').click(function (e) {
  344. validate()
  345. })
  346. ;(function() {
  347. var SPECS = {{ .benchmark_specs }};
  348. var showPoint = true;
  349. renderSpecsSelect($('#__specs__'), SPECS, showPoint, {
  350. gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}},
  351. free: {{$.i18n.Tr "cloudbrain.free"}},
  352. point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}},
  353. memory: {{$.i18n.Tr "cloudbrain.memory"}},
  354. shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}},
  355. });
  356. })();
  357. </script>