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
2 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
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. {{template "base/head" .}}
  2. <style>
  3. .according-panel-heading {
  4. box-sizing: border-box;
  5. padding: 8px 16px;
  6. color: #252b3a;
  7. background-color: #f2f5fc;
  8. line-height: 1.5;
  9. cursor: pointer;
  10. -moz-user-select: none;
  11. -webkit-user-select: none;
  12. -ms-user-select: none;
  13. -khtml-user-select: none;
  14. user-select: none;
  15. }
  16. .accordion-panel-title {
  17. margin-top: 0;
  18. margin-bottom: 0;
  19. color: #252b3a;
  20. }
  21. .accordion-panel-title-content {
  22. vertical-align: middle;
  23. display: inline-block;
  24. width: calc(100% - 32px);
  25. cursor: default;
  26. }
  27. .acc-margin-bottom {
  28. margin-bottom: 5px;
  29. }
  30. .title_text {
  31. font-size: 12px;
  32. }
  33. .ac-display-inblock {
  34. display: inline-block;
  35. }
  36. .cti-mgRight-sm {
  37. margin-right: 8px;
  38. }
  39. .ac-text-normal {
  40. font-size: 14px;
  41. color: #575d6c;
  42. }
  43. .uc-accordionTitle-black {
  44. color: #333;
  45. }
  46. .accordion-border {
  47. border: 1px solid #cce2ff;
  48. }
  49. .padding0 {
  50. padding: 0 !important;
  51. }
  52. .content-pad {
  53. padding: 15px 35px;
  54. }
  55. .content-margin {
  56. margin: 10px 5px;
  57. }
  58. .tab_2_content {
  59. min-height: 360px;
  60. margin-left: 10px;
  61. }
  62. .ac-grid {
  63. display: block;
  64. *zoom: 1;
  65. }
  66. .ac-grid-col {
  67. float: left;
  68. width: 100%;
  69. }
  70. .ac-grid-col2 .ac-grid-col {
  71. width: 50%;
  72. }
  73. .ti-form {
  74. text-align: left;
  75. max-width: 100%;
  76. vertical-align: middle;
  77. }
  78. .ti-form>tbody {
  79. font-size: 12px;
  80. }
  81. .ti-form>tbody,
  82. .ti-form>tbody>tr {
  83. vertical-align: inherit;
  84. }
  85. .ti-text-form-label {
  86. padding-bottom: 20px;
  87. padding-right: 20px;
  88. color: #8a8e99;
  89. font-size: 12px;
  90. white-space: nowrap !important;
  91. width: 80px;
  92. line-height: 30px;
  93. }
  94. .ti-text-form-content {
  95. line-height: 30px;
  96. padding-bottom: 20px;
  97. }
  98. .ti-form>tbody>tr>td {
  99. vertical-align: top;
  100. white-space: normal;
  101. }
  102. td,
  103. th {
  104. padding: 0;
  105. }
  106. .info_text {
  107. padding-bottom: 20px;
  108. padding-right: 20px;
  109. font-size: 12px;
  110. }
  111. .ac-grid-col .text-span {
  112. width: 450px;
  113. overflow: hidden;
  114. text-overflow: ellipsis;
  115. white-space: nowrap;
  116. }
  117. .redo-color {
  118. color: #3291F8;
  119. }
  120. .ti-action-menu-item:not(:last-child) {
  121. margin-right: 10px;
  122. padding-right: 11px;
  123. text-decoration: none !important;
  124. color: #526ecc;
  125. cursor: pointer;
  126. display: inline-block;
  127. -moz-user-select: none;
  128. -webkit-user-select: none;
  129. -ms-user-select: none;
  130. -khtml-user-select: none;
  131. user-select: none;
  132. position: relative;
  133. }
  134. .ti-action-menu-item:not(:last-child):after {
  135. content: "";
  136. display: inline-block;
  137. position: absolute;
  138. height: 12px;
  139. right: 0;
  140. top: 50%;
  141. -webkit-transform: translateY(-6px);
  142. -ms-transform: translateY(-6px);
  143. -o-transform: translateY(-6px);
  144. transform: translateY(-6px);
  145. border-right: 1px solid #dfe1e6;
  146. }
  147. .text-width80 {
  148. width: 100px;
  149. line-height: 30px;
  150. }
  151. .border-according {
  152. border: 1px solid #dfe1e6;
  153. }
  154. .disabled {
  155. cursor: default;
  156. pointer-events: none;
  157. color: rgba(0, 0, 0, .6) !important;
  158. opacity: .45 !important;
  159. }
  160. .pad20 {
  161. border: 0px !important;
  162. }
  163. .model_file_bread {
  164. margin-bottom: -0.5rem !important;
  165. padding-left: 1rem;
  166. padding-top: 0.5rem;
  167. }
  168. </style>
  169. <div id="mask">
  170. <div id="loadingPage">
  171. <div class="rect1"></div>
  172. <div class="rect2"></div>
  173. <div class="rect3"></div>
  174. <div class="rect4"></div>
  175. <div class="rect5"></div>
  176. </div>
  177. </div>
  178. <div class="repository">
  179. {{template "repo/header" .}}
  180. <div class="ui container">
  181. <h4 class="ui header" id="vertical-segment">
  182. <div class="ui breadcrumb">
  183. <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all">
  184. {{.i18n.Tr "repo.cloudbrain"}}
  185. </a>
  186. <div class="divider"> / </div>
  187. <a class="section" href="{{$.RepoLink}}/modelarts/inference-job">
  188. {{$.i18n.Tr "repo.modelarts.infer_job"}}
  189. </a>
  190. <div class="divider"> / </div>
  191. <div class="active section">{{.displayJobName}}</div>
  192. </div>
  193. </h4>
  194. {{with .task}}
  195. <div class="ui accordion border-according" id="accordion{{.VersionName}}"
  196. data-repopath="{{$.RepoRelPath}}/cloudbrain/inference-job" data-jobid="{{.JobID}}" data-version="{{.VersionName}}">
  197. <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}">
  198. <div class="active title padding0">
  199. <div class="according-panel-heading">
  200. <div class="accordion-panel-title">
  201. <i class="dropdown icon"></i>
  202. <span class="accordion-panel-title-content">
  203. <span>
  204. <div class="ac-display-inblock title_text acc-margin-bottom">
  205. <span class="cti-mgRight-sm">{{TimeSinceUnix1 .CreatedUnix}}</span>
  206. <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}:
  207. <span id="{{.VersionName}}-status-span"><i id="icon"
  208. style="vertical-align: middle;" class="{{.Status}}"></i><span id="text"
  209. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  210. </span>
  211. <span
  212. class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
  213. <span class="cti-mgRight-sm uc-accordionTitle-black"
  214. id="{{.VersionName}}-duration-span">{{$.duration}}</span>
  215. <span id="refresh-status" data-tooltip="刷新" style="cursor: pointer;" data-inverted="" data-version="{{.VersionName}}"><i
  216. class="redo icon redo-color"></i></span>
  217. </div>
  218. </span>
  219. </span>
  220. </div>
  221. </div>
  222. </div>
  223. <div class="active content">
  224. <div class="content-pad">
  225. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  226. <a class="active item"
  227. data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  228. <a class="item" data-tab="second"
  229. onclick="javascript:parseInfo()">{{$.i18n.Tr "repo.cloudbrain.runinfo"}}</a>
  230. <a class="item load-model-file" data-tab="four"
  231. data-gpu-flag="true" data-download-flag="{{$.canDownload}}" data-path="{{$.RepoLink}}/cloudbrain/inference-job/{{.JobID}}/result_list" data-version="{{.VersionName}}" data-parents="" data-filename="" data-init="init" >{{$.i18n.Tr "repo.model_download"}}</a>
  232. </div>
  233. <div class="ui tab active" data-tab="first" style="height:400px">
  234. <div style="padding-top: 10px;">
  235. <div class="tab_2_content">
  236. <div class="ac-grid ac-grid-col2">
  237. <div class="ac-grid-col">
  238. <table class="ti-form">
  239. <tbody class="ti-text-form">
  240. <tr class="ti-no-ng-animate">
  241. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  242. {{$.i18n.Tr "repo.cloudbrain_task"}}
  243. </td>
  244. <td class="ti-text-form-content">
  245. <div class="text-span text-span-w">
  246. {{.DisplayJobName}}
  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 "repo.modelarts.status"}}
  253. </td>
  254. <td class="ti-text-form-content">
  255. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  256. {{.Status}}
  257. </div>
  258. </td>
  259. </tr>
  260. <!-- <tr class="ti-no-ng-animate">
  261. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  262. {{$.i18n.Tr "repo.modelarts.run_version"}}
  263. </td>
  264. <td class="ti-text-form-content">
  265. <div class="text-span text-span-w">
  266. {{.VersionName}}
  267. </div>
  268. </td>
  269. </tr> -->
  270. <tr class="ti-no-ng-animate">
  271. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  272. {{$.i18n.Tr "repo.modelarts.train_job.start_time"}}
  273. </td>
  274. <td class="ti-text-form-content">
  275. <div class="text-span text-span-w">
  276. <span style="font-size: 12px;" class="">
  277. {{if not (eq .StartTime 0)}}
  278. {{TimeSinceUnix1 .StartTime}}
  279. {{else}}
  280. {{TimeSinceUnix1 .CreatedUnix}}
  281. {{end}}
  282. </span>
  283. </div>
  284. </td>
  285. </tr>
  286. <tr class="ti-no-ng-animate">
  287. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  288. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  289. </td>
  290. <td class="ti-text-form-content">
  291. <div class="text-span text-span-w" id="{{.VersionName}}-duration">
  292. {{.TrainJobDuration}}
  293. </div>
  294. </td>
  295. </tr>
  296. <tr class="ti-no-ng-animate">
  297. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  298. {{$.i18n.Tr "repo.modelarts.train_job.resource_type"}}
  299. </td>
  300. <td class="ti-text-form-content">
  301. <div class="text-span text-span-w">
  302. {{$.resource_type}}
  303. </div>
  304. </td>
  305. </tr>
  306. <tr class="ti-no-ng-animate">
  307. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  308. {{$.i18n.Tr "repo.model.manage.description"}}
  309. </td>
  310. <td class="ti-text-form-content">
  311. <div class="text-span text-span-w" id="{{.VersionName}}-desc" style="width: 380px;">
  312. {{if .Description}}
  313. <span title="{{.Description}}">{{.Description}}</span>
  314. {{else}}
  315. <span>--</span>
  316. {{end}}
  317. </div>
  318. </td>
  319. </tr>
  320. <tr class="ti-no-ng-animate">
  321. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  322. 创建人
  323. </td>
  324. <td class="ti-text-form-content">
  325. <div class="text-span text-span-w" id="{{.VersionName}}-creator">
  326. {{.User.Name}}
  327. </div>
  328. </td>
  329. </tr>
  330. <tr class="ti-no-ng-animate">
  331. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  332. {{$.i18n.Tr "cloudbrain.mirror"}}
  333. </td>
  334. <td class="ti-text-form-content">
  335. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  336. {{.Image}}
  337. </div>
  338. </td>
  339. </tr>
  340. </tbody>
  341. </table>
  342. </div>
  343. <div class="ac-grid-col">
  344. <table class="ti-form">
  345. <tbody class="ti-text-form">
  346. <tr class="ti-no-ng-animate">
  347. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  348. {{$.i18n.Tr "repo.modelarts.infer_job_model"}}
  349. </td>
  350. <td class="ti-text-form-content">
  351. <div class="text-span text-span-w">
  352. <span>{{.ModelName}}</span>&nbsp;&nbsp;
  353. <span style="color: #8a8e99">{{$.i18n.Tr "repo.modelarts.version"}}:</span><span>{{.ModelVersion}}</span>&nbsp;&nbsp;
  354. </div>
  355. </td>
  356. </tr>
  357. <tr class="ti-no-ng-animate">
  358. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  359. {{$.i18n.Tr "repo.modelarts.infer_job_model_file"}}
  360. </td>
  361. <td class="ti-text-form-content">
  362. <div class="text-span text-span-w">
  363. {{.CkptName}}
  364. </div>
  365. </td>
  366. </tr>
  367. <tr class="ti-no-ng-animate">
  368. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  369. {{$.i18n.Tr "repo.modelarts.model_label"}}
  370. </td>
  371. <td class="ti-text-form-content">
  372. <div class="text-span text-span-w" id="{{.VersionName}}-labels">
  373. {{if .LabelName}}
  374. {{range $.LabelName}}
  375. <a class="ui label" title="{{.}}">{{.}}</a>
  376. {{end}}
  377. {{else}}
  378. <span>--</span>
  379. {{end}}
  380. </div>
  381. </td>
  382. </tr>
  383. <tr class="ti-no-ng-animate">
  384. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  385. {{$.i18n.Tr "repo.modelarts.code_version"}}
  386. </td>
  387. <td class="ti-text-form-content">
  388. <div class="text-span text-span-w">
  389. {{.BranchName}}
  390. </div>
  391. </td>
  392. </tr>
  393. <tr class="ti-no-ng-animate">
  394. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  395. {{$.i18n.Tr "repo.modelarts.train_job.start_file"}}
  396. </td>
  397. <td class="ti-text-form-content">
  398. <div class="text-span text-span-w">
  399. {{.BootFile}}
  400. </div>
  401. </td>
  402. </tr>
  403. <tr class="ti-no-ng-animate">
  404. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  405. {{$.i18n.Tr "repo.modelarts.infer_dataset"}}
  406. </td>
  407. <td class="ti-text-form-content">
  408. <div class="text-span text-span-w">
  409. {{.DatasetName}}
  410. </div>
  411. </td>
  412. </tr>
  413. <tr class="ti-no-ng-animate">
  414. <td class="ti-no-ng-animate ti-text-form-label text-width80" >
  415. {{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}}
  416. </td>
  417. <td class="ti-text-form-content">
  418. <div class="text-span text-span-w" title="{{.Parameters}}">
  419. {{if .Parameters}}
  420. <span>{{.Parameters}}</span>
  421. {{else}}
  422. <span>--</span>
  423. {{end}}
  424. </div>
  425. </td>
  426. </tr>
  427. <tr class="ti-no-ng-animate">
  428. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  429. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  430. </td>
  431. <td class="ti-text-form-content">
  432. <div class="text-span text-span-w">
  433. {{$.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}}
  434. </div>
  435. </td>
  436. </tr>
  437. </tbody>
  438. </table>
  439. </div>
  440. </div>
  441. </div>
  442. </div>
  443. </div>
  444. <div class="ui tab" data-tab="second">
  445. <div>
  446. <div class="ui message message{{.VersionName}}" style="display: none;">
  447. <div id="header"></div>
  448. </div>
  449. <div class="ui attached log" id="log{{.VersionName}}"
  450. style="height: 390px !important; overflow: auto;">
  451. <input type="hidden" id="json_value" value="{{$.result.JobStatus.AppExitDiagnostics}}">
  452. <input type="hidden" id="ExitDiagnostics" value="{{$.ExitDiagnostics}}">
  453. <span id="info_display" class="info_text">
  454. </span>
  455. </div>
  456. </div>
  457. </div>
  458. <div class="ui tab" data-tab="four">
  459. <input type="hidden" name="model{{.VersionName}}" value="-1">
  460. <input type="hidden" name="modelback{{.VersionName}}" value="-1">
  461. <div class='ui breadcrumb model_file_bread' id='file_breadcrumb{{.VersionName}}'>
  462. <div class="active section">{{.VersionName}}</div>
  463. <div class="divider"> / </div>
  464. </div>
  465. <div id="dir_list{{.VersionName}}">
  466. </div>
  467. </div>
  468. </div>
  469. </div>
  470. </div>
  471. {{end}}
  472. </div>
  473. </div>
  474. {{template "base/footer" .}}
  475. <script>
  476. $('.menu .item').tab()
  477. $(document).ready(function () {
  478. $('.ui.accordion').accordion({ selector: { trigger: '.icon' } });
  479. });
  480. $(document).ready(function () {
  481. $('.secondary.menu .item').tab();
  482. });
  483. let userName
  484. let repoPath
  485. let jobID
  486. let downlaodFlag = {{ $.canDownload }}
  487. let taskID = {{ $.task.ID }}
  488. let realJobName = {{ $.task.JobName }}
  489. function parseInfo() {
  490. let jsonValue = document.getElementById("json_value").value;
  491. let jsonObj = JSON.parse(jsonValue);
  492. let podRoleName = jsonObj["podRoleName"];
  493. let html = "";
  494. if (podRoleName != null) {
  495. let task0 = podRoleName["task1-0"];
  496. let podEvents = jsonObj["podEvents"];
  497. let podEventArray = podEvents[task0];
  498. if (podEventArray != null) {
  499. for (var i = 0; i < podEventArray.length; i++) {
  500. if (podEventArray[i]["reason"] != "") {
  501. html += "<p><b>[" + podEventArray[i]["reason"] + "]</b></p>";
  502. html += "<p>" + podEventArray[i]["message"] + "</p>";
  503. html += "<p>" + podEventArray[i]["action"] + "</p>";
  504. }
  505. }
  506. }
  507. let extras = jsonObj["extras"];
  508. if (extras != null) {
  509. for (var i = 0; i < extras.length; i++) {
  510. if (extras[i]["reason"] != "") {
  511. html += "<p><b>[" + extras[i]["reason"] + "]</b></p>";
  512. html += "<p>" + extras[i]["message"] + "</p>";
  513. html += "<p>" + extras[i]["action"] + "</p>";
  514. }
  515. }
  516. }
  517. }
  518. let string = document.getElementById("ExitDiagnostics").value;
  519. string = string.replace(/\r\n/g, "<br>")
  520. string = string.replace(/\n/g, "<br>");
  521. string = string.replace(/(\r\n)|(\n)/g, '<br>');
  522. if (string != "") {
  523. html += "<p><b>[ExitDiagnostics]</b></p>";
  524. html += "<p>" + string + "</p>";
  525. }
  526. document.getElementById("info_display").innerHTML = html;
  527. }
  528. </script>