You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

show.tmpl 29 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. {{template "base/head" .}}
  2. <div id="mask">
  3. <div id="loadingPage">
  4. <div class="rect1"></div>
  5. <div class="rect2"></div>
  6. <div class="rect3"></div>
  7. <div class="rect4"></div>
  8. <div class="rect5"></div>
  9. </div>
  10. </div>
  11. <div class="repository">
  12. {{template "repo/header" .}}
  13. <div class="ui container">
  14. <h4 class="ui header" id="vertical-segment">
  15. <div class="ui breadcrumb">
  16. <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all">
  17. {{$.i18n.Tr "repo.cloudbrain"}}
  18. </a>
  19. <div class="divider"> / </div>
  20. <a class="section" href="{{$.RepoLink}}/cloudbrain/benchmark">
  21. {{$.i18n.Tr "repo.modelarts.evaluate_job"}}
  22. </a>
  23. <div class="divider"> / </div>
  24. <div class="active section">{{.displayJobName}}</div>
  25. </div>
  26. </h4>
  27. {{range $k ,$v := .version_list_task}}
  28. <div class="ui accordion border-according" id="accordion{{.VersionName}}"
  29. data-repopath="{{$.RepoRelPath}}/cloudbrain" data-jobid="{{.ID}}" data-version="{{.VersionName}}">
  30. <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}">
  31. <div class="{{if eq $k 0}}active{{end}} title padding0">
  32. <div class="according-panel-heading">
  33. <div class="accordion-panel-title">
  34. <i class="dropdown icon"></i>
  35. <span class="accordion-panel-title-content">
  36. <span>
  37. <div class="ac-display-inblock title_text acc-margin-bottom">
  38. <span class="cti-mgRight-sm">
  39. <td>{{TimeSinceUnix1 .CreatedUnix}}</td>
  40. </span>
  41. <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}:
  42. <span id="{{.VersionName}}-status-span"><i id="icon"
  43. style="vertical-align: middle;" class="{{.Status}}"></i><span id="text"
  44. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  45. </span>
  46. <span
  47. class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
  48. <span class="cti-mgRight-sm uc-accordionTitle-black"
  49. id="{{.VersionName}}-duration-span">{{$.duration}}</span>
  50. </div>
  51. </span>
  52. </span>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="{{if eq $k 0}}active{{end}} content">
  57. <div class="content-pad">
  58. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  59. <a class="active item"
  60. data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  61. <a class="item log_bottom" data-tab="second{{$k}}"
  62. data-version="{{.VersionName}}">{{$.i18n.Tr "repo.modelarts.log"}}</a>
  63. </div>
  64. <div class="ui tab active" data-tab="first{{$k}}">
  65. <div style="padding-top: 10px;">
  66. <div class="tab_2_content">
  67. <div class="ac-grid ac-grid-col2">
  68. <div class="ac-grid-col">
  69. <table class="ti-form">
  70. <tbody class="ti-text-form">
  71. <tr class="ti-no-ng-animate">
  72. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  73. {{$.i18n.Tr "repo.cloudbrain_task"}}
  74. </td>
  75. <td class="ti-text-form-content">
  76. <div class="text-span text-span-w">
  77. {{.DisplayJobName}}
  78. </div>
  79. </td>
  80. </tr>
  81. <tr class="ti-no-ng-animate">
  82. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  83. {{$.i18n.Tr "repo.modelarts.status"}}
  84. </td>
  85. <td class="ti-text-form-content">
  86. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  87. {{.Status}}
  88. </div>
  89. </td>
  90. </tr>
  91. <tr class="ti-no-ng-animate">
  92. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  93. {{$.i18n.Tr "repo.modelarts.createtime"}}
  94. </td>
  95. <td class="ti-text-form-content">
  96. <div class="text-span text-span-w">
  97. <span style="font-size: 12px;" class="">
  98. {{TimeSinceUnix1 .CreatedUnix}}
  99. </span>
  100. </div>
  101. </td>
  102. </tr>
  103. <tr class="ti-no-ng-animate">
  104. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  105. {{$.i18n.Tr "repo.cloudbrain.time.starttime"}}
  106. </td>
  107. <td class="ti-text-form-content">
  108. <div class="text-span text-span-w"
  109. id="{{.VersionName}}-startTime">
  110. {{if not (eq .StartTime 0)}}
  111. {{TimeSinceUnix1 .StartTime}}
  112. {{else}}
  113. --
  114. {{end}}
  115. </div>
  116. </td>
  117. </tr>
  118. <tr class="ti-no-ng-animate">
  119. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  120. {{$.i18n.Tr "repo.cloudbrain.time.endtime"}}
  121. </td>
  122. <td class="ti-text-form-content">
  123. <div class="text-span text-span-w"
  124. id="{{.VersionName}}-EndTime">
  125. {{if not (eq .EndTime 0)}}
  126. {{TimeSinceUnix1 .EndTime}}
  127. {{else}}
  128. --
  129. {{end}}
  130. </div>
  131. </td>
  132. </tr>
  133. <tr class="ti-no-ng-animate">
  134. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  135. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  136. </td>
  137. <td class="ti-text-form-content">
  138. <div class="text-span text-span-w"
  139. id="{{.VersionName}}-duration">
  140. {{$.duration}}
  141. </div>
  142. </td>
  143. </tr>
  144. <tr class="ti-no-ng-animate">
  145. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  146. {{$.i18n.Tr "cloudbrain.mirror"}}
  147. </td>
  148. <td class="ti-text-form-content">
  149. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  150. <span class="ui poping up clipboard" data-position="top center" id="clipboard-btn" style="cursor:pointer"
  151. data-clipboard-text="{{.Image}}"
  152. data-success="{{$.i18n.Tr "repo.copy_link_success"}}"
  153. data-error="{{$.i18n.Tr "repo.copy_link_error"}}"
  154. data-content="{{$.i18n.Tr "repo.copy_link"}}"
  155. data-variation="inverted tiny"
  156. >
  157. <span title="{{.Image}}">{{.Image}}</span>
  158. </span>
  159. </div>
  160. </td>
  161. </tr>
  162. <tr class="ti-no-ng-animate">
  163. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  164. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}
  165. </td>
  166. <td class="ti-text-form-content">
  167. <div class="text-span text-span-w"
  168. id="{{.VersionName}}-BenchmarkTypeName">
  169. {{.BenchmarkType}}
  170. </div>
  171. </td>
  172. </tr>
  173. <tr class="ti-no-ng-animate">
  174. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  175. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
  176. </td>
  177. <td class="ti-text-form-content">
  178. <div class="text-span text-span-w"
  179. id="{{.VersionName}}-BenchmarkTypeName">
  180. {{.BenchmarkTypeName}}
  181. </div>
  182. </td>
  183. </tr>
  184. </tbody>
  185. </table>
  186. </div>
  187. <div class="ac-grid-col">
  188. <table class="ti-form">
  189. <tbody class="ti-text-form">
  190. {{if eq .JobType "BENCHMARK"}}
  191. <tr class="ti-no-ng-animate">
  192. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  193. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}
  194. </td>
  195. <td class="ti-text-form-content">
  196. <div class="text-span text-span-w">
  197. train.py
  198. </div>
  199. </td>
  200. </tr>
  201. <tr class="ti-no-ng-animate">
  202. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  203. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}
  204. </td>
  205. <td class="ti-text-form-content">
  206. test.py
  207. </div>
  208. </td>
  209. </tr>
  210. {{else}}
  211. <tr class="ti-no-ng-animate">
  212. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  213. {{$.i18n.Tr "repo.modelarts.model_name"}}
  214. </td>
  215. <td class="ti-text-form-content">
  216. <div class="text-span text-span-w">{{if .ModelName}}{{.ModelName}}{{else}}--{{end}}</div>
  217. </td>
  218. </tr>
  219. <tr class="ti-no-ng-animate">
  220. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  221. {{$.i18n.Tr "repo.modelconvert.modelversion"}}
  222. </td>
  223. <td class="ti-text-form-content">
  224. <div class="text-span text-span-w">{{if .ModelVersion}}{{.ModelVersion}}{{else}}--{{end}}</div>
  225. </td>
  226. </tr>
  227. <tr class="ti-no-ng-animate">
  228. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  229. {{$.i18n.Tr "repo.modelarts.infer_job_model_file"}}
  230. </td>
  231. <td class="ti-text-form-content">
  232. <div class="text-span text-span-w">{{if .CkptName}}{{.CkptName}}{{else}}--{{end}}</div>
  233. </td>
  234. </tr>
  235. {{end}}
  236. <tr class="ti-no-ng-animate">
  237. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  238. {{$.i18n.Tr "repo.modelarts.train_job.description"}}
  239. </td>
  240. <td class="ti-text-form-content">
  241. <div class="text-span text-span-w" title="{{.Description}}">
  242. {{if .Description}}
  243. {{.Description}}
  244. {{else}}
  245. --
  246. {{end}}
  247. </div>
  248. </td>
  249. </tr>
  250. <tr class="ti-no-ng-animate">
  251. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  252. {{$.i18n.Tr "cloudbrain.gpu_type"}}
  253. </td>
  254. <td class="ti-text-form-content resorce_type">
  255. <div class="text-span text-span-w"></div>
  256. </td>
  257. </tr>
  258. <tr class="ti-no-ng-animate">
  259. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  260. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  261. </td>
  262. <td class="ti-text-form-content spec">
  263. <div class="text-span text-span-w"></div>
  264. </td>
  265. </tr>
  266. <tr class="ti-no-ng-animate">
  267. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  268. {{$.i18n.Tr "repo.cloudbrain_creator"}}
  269. </td>
  270. <td class="ti-text-form-content">
  271. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  272. {{if .User}}
  273. {{.User.Name}}
  274. {{else}}
  275. --
  276. {{end}}
  277. </div>
  278. </td>
  279. </tr>
  280. <tr class="ti-no-ng-animate">
  281. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  282. {{if eq .BenchmarkTypeName "BRAINSCORE"}}
  283. {{$.i18n.Tr "cloudbrain.brain_area"}}
  284. {{else}}
  285. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}
  286. {{end}}
  287. </td>
  288. <td class="ti-text-form-content">
  289. <div class="text-span text-span-w"
  290. id="{{.VersionName}}-BenchmarkChildTypeName">
  291. {{if $.BenchmarkChildTypeName}}
  292. {{$.BenchmarkChildTypeName}}
  293. {{else}}
  294. --
  295. {{end}}
  296. </div>
  297. </td>
  298. </tr>
  299. </tbody>
  300. </table>
  301. </div>
  302. </div>
  303. </div>
  304. <div style="clear: both;"></div>
  305. </div>
  306. </div>
  307. <div class="ui tab" data-tab="second{{$k}}">
  308. <div class="file-info">
  309. <a id="{{.VersionName}}-log-down"
  310. class='{{if $.canDownload}}ti-download-file{{else}}disabled{{end}} file-info'
  311. href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.ID}}/download_log_file">
  312. <i class="ri-download-cloud-2-line"></i>
  313. <span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span>
  314. </a>
  315. <div class="file-info full-log-dialog" data-version="{{.VersionName}}" data-log="{{$.i18n.Tr "repo.modelarts.log_file"}}"
  316. data-exit="{{$.i18n.Tr "repo.modelarts.exit_full_screen"}}" style="margin-left: 1rem;color:#0366d6;cursor: pointer;"
  317. data-log-down="{{$.i18n.Tr "repo.modelarts.download_log"}}" data-href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.ID}}/download_log_file"
  318. data-scroll-top="{{$.i18n.Tr "repo.log_scroll_start"}}" data-scroll-bottom="{{$.i18n.Tr "repo.log_scroll_end"}}">
  319. <i class="ri-aspect-ratio-line"></i>
  320. <span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.fullscreen_log_file"}}</span>
  321. </div>
  322. </div>
  323. <div
  324. style="position: relative;border: 1px solid rgba(0,0,0,.2);padding: 0 10px;margin-top: 10px;">
  325. <span>
  326. <a title="{{$.i18n.Tr "repo.log_scroll_start"}}" style="position: absolute; right: -32px;cursor: pointer;"
  327. class="log_top" data-version="{{.VersionName}}"><i class="icon-to-top"></i></a>
  328. </span>
  329. <span class="log-info-{{.VersionName}}">
  330. <a title="{{$.i18n.Tr "repo.log_scroll_end"}}" style="position: absolute; bottom: 10px;right: -32px;cursor: pointer;"
  331. class="log_bottom" data-version="{{.VersionName}}"><i
  332. class="icon-to-bottom"></i></a>
  333. </span>
  334. <div class="ui message message{{.VersionName}}" style="display: none;">
  335. <div id="header"></div>
  336. </div>
  337. <div class="ui attached log log-scroll" id="log{{.VersionName}}" data-version="{{.VersionName}}"
  338. style="height: 300px !important; overflow: auto;">
  339. <div class="ui inverted active dimmer">
  340. <div class="ui loader"></div>
  341. </div>
  342. <input type="hidden" name="end_line" value>
  343. <input type="hidden" name="end_line-max" value>
  344. <input type="hidden" name="start_line-max" value>
  345. <input type="hidden" name="start_line-max-copy" value>
  346. <input type="hidden" name="start_line" value>
  347. <input type="hidden" name="init_log" value>
  348. <pre id="log_file{{.VersionName}}"></pre>
  349. </div>
  350. </div>
  351. </div>
  352. </div>
  353. </div>
  354. </div>
  355. {{template "custom/max_log" .}}
  356. {{end}} {{template "base/paginate" .}}
  357. </div>
  358. <!-- 确认模态框 -->
  359. <div id="deletemodel">
  360. <div class="ui basic modal">
  361. <div class="ui icon header">
  362. <i class="trash icon"></i> {{$.i18n.Tr "cloudbrain.delete_task"}}
  363. </div>
  364. <div class="content">
  365. <p>{{$.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  366. </div>
  367. <div class="actions">
  368. <div class="ui red basic inverted cancel button">
  369. <i class="remove icon"></i> {{$.i18n.Tr "cloudbrain.operate_cancel"}}
  370. </div>
  371. <div class="ui green basic inverted ok button">
  372. <i class="checkmark icon"></i> {{$.i18n.Tr "cloudbrain.operate_confirm"}}
  373. </div>
  374. </div>
  375. </div>
  376. </div>
  377. </div>
  378. {{template "base/footer" .}}
  379. <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  380. <script>
  381. ;(function() {
  382. var SPEC = {{ $.Spec }};
  383. var showPoint = false;
  384. var specStr = window.renderSpecStr(SPEC, showPoint, {
  385. gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}},
  386. free: {{$.i18n.Tr "cloudbrain.free"}},
  387. point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}},
  388. memory: {{$.i18n.Tr "cloudbrain.memory"}},
  389. shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}},
  390. });
  391. $('td.ti-text-form-content.spec div').text(specStr);
  392. SPEC && $('td.ti-text-form-content.resorce_type div').text(getListValueWithKey(ACC_CARD_TYPE, SPEC.AccCardType));
  393. })();
  394. </script>
  395. <script>
  396. $('.menu .item').tab()
  397. $(document).ready(function () {
  398. $('.ui.accordion').accordion({ selector: { trigger: '.icon' } });
  399. });
  400. $(document).ready(function () {
  401. $('.secondary.menu .item').tab();
  402. });
  403. let userName
  404. let repoPath
  405. let jobName
  406. $(document).ready(function () {
  407. let url = window.location.href;
  408. let urlArr = url.split('/')
  409. userName = urlArr.slice(-5)[0]
  410. repoPath = urlArr.slice(-4)[0]
  411. jobName = urlArr.slice(-1)[0]
  412. })
  413. function loadLog(version_name) {
  414. document.getElementById("mask").style.display = "block"
  415. $.get(`/api/v1/repos/${userName}/${repoPath}/cloudbrain/${jobName}/log?version_name=${version_name}&lines=50&order=asc`, (data) => {
  416. $('input[name=end_line]').val(data.EndLine)
  417. $('input[name=start_line]').val(data.StartLine)
  418. $(`#log_file${version_name}`).text(data.Content)
  419. document.getElementById("mask").style.display = "none"
  420. }).fail(function (err) {
  421. console.log(err);
  422. document.getElementById("mask").style.display = "none"
  423. });
  424. }
  425. </script>