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 28 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
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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  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, .ti-form>tbody>tr {
  82. vertical-align: inherit;
  83. }
  84. .ti-text-form-label {
  85. padding-bottom: 20px;
  86. padding-right: 20px;
  87. color: #8a8e99;
  88. font-size: 12px;
  89. white-space: nowrap !important;
  90. width: 80px;
  91. line-height: 30px;
  92. }
  93. .ti-text-form-content{
  94. line-height: 30px;
  95. padding-bottom: 20px;
  96. }
  97. .ti-form>tbody>tr>td {
  98. vertical-align: top;
  99. white-space: normal;
  100. }
  101. td, th {
  102. padding: 0;
  103. }
  104. .ac-grid-col .text-span {
  105. width: 450px;
  106. overflow: hidden;
  107. text-overflow: ellipsis;
  108. white-space: nowrap;
  109. }
  110. .redo-color{
  111. color: #3291F8;
  112. }
  113. .ti-action-menu-item:not(:last-child){
  114. margin-right: 10px;
  115. padding-right: 11px;
  116. text-decoration: none!important;
  117. color: #526ecc;
  118. cursor: pointer;
  119. display: inline-block;
  120. -moz-user-select: none;
  121. -webkit-user-select: none;
  122. -ms-user-select: none;
  123. -khtml-user-select: none;
  124. user-select: none;
  125. position: relative;
  126. }
  127. .ti-action-menu-item:not(:last-child):after {
  128. content: "";
  129. display: inline-block;
  130. position: absolute;
  131. height: 12px;
  132. right: 0;
  133. top: 50%;
  134. -webkit-transform: translateY(-6px);
  135. -ms-transform: translateY(-6px);
  136. -o-transform: translateY(-6px);
  137. transform: translateY(-6px);
  138. border-right: 1px solid #dfe1e6;
  139. }
  140. .text-width80{
  141. width: 100px;
  142. line-height: 30px;
  143. }
  144. .border-according{
  145. border: 1px solid #dfe1e6;
  146. }
  147. .disabled {
  148. cursor: default;
  149. pointer-events: none;
  150. color: rgba(0,0,0,.6) !important;
  151. opacity: .45 !important;
  152. }
  153. .pad20{
  154. border:0px !important;
  155. }
  156. .model_file_bread{
  157. margin-bottom: -0.5rem !important;
  158. padding-left: 1rem;
  159. padding-top: 0.5rem ;
  160. }
  161. </style>
  162. <div class="repository">
  163. {{template "repo/header" .}}
  164. <div class="ui container">
  165. <h4 class="ui header" id="vertical-segment">
  166. <div class="ui breadcrumb">
  167. <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all">
  168. {{.i18n.Tr "repo.cloudbrain"}}
  169. </a>
  170. <div class="divider"> / </div>
  171. <a class="section" href="{{$.RepoLink}}/modelarts/inference-job">
  172. {{$.i18n.Tr "repo.modelarts.infer_job"}}
  173. </a>
  174. <div class="divider"> / </div>
  175. <div class="active section">{{.displayJobName}}</div>
  176. </div>
  177. </h4>
  178. {{with .task}}
  179. <div class="ui accordion border-according" id="accordion{{.VersionName}}"
  180. data-repopath="{{$.RepoRelPath}}/modelarts/inference-job" data-jobid="{{.JobID}}" data-version="{{.VersionName}}">
  181. <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}">
  182. <div class="active title padding0">
  183. <div class="according-panel-heading">
  184. <div class="accordion-panel-title">
  185. <i class="dropdown icon"></i>
  186. <span class="accordion-panel-title-content">
  187. <span>
  188. <div class="ac-display-inblock title_text acc-margin-bottom">
  189. <span class="cti-mgRight-sm">{{TimeSinceUnix1 .CreatedUnix}}</span>
  190. <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}:
  191. <span id="{{.VersionName}}-status-span"><i id="icon"
  192. style="vertical-align: middle;" class="{{.Status}}"></i><span id="text"
  193. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  194. </span>
  195. <span
  196. class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
  197. <span class="cti-mgRight-sm uc-accordionTitle-black"
  198. id="{{.VersionName}}-duration-span">{{.TrainJobDuration}}</span>
  199. <span id="refresh-status" data-tooltip="刷新" style="cursor: pointer;" data-inverted="" data-version="{{.VersionName}}"><i
  200. class="redo icon redo-color"></i></span>
  201. </div>
  202. </span>
  203. </span>
  204. </div>
  205. </div>
  206. </div>
  207. <div class="active content">
  208. <div class="content-pad">
  209. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  210. <a class="active item" data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  211. <a class="item" data-tab="second" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a>
  212. <a class="item load-model-file" data-tab="third" data-path="{{$.RepoLink}}/modelarts/inference-job/{{.JobID}}/result_list" data-version="{{.VersionName}}" data-parents="" data-filename="" data-init="init" >{{$.i18n.Tr "repo.model_download"}}</a>
  213. </div>
  214. <div class="ui tab active" data-tab="first" style="height:400px">
  215. <div style="padding-top: 10px;">
  216. <div class="tab_2_content">
  217. <div class="ac-grid ac-grid-col2">
  218. <div class="ac-grid-col">
  219. <table class="ti-form">
  220. <tbody class="ti-text-form">
  221. <tr class="ti-no-ng-animate">
  222. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  223. {{$.i18n.Tr "repo.cloudbrain_task"}}
  224. </td>
  225. <td class="ti-text-form-content">
  226. <div class="text-span text-span-w">
  227. {{.DisplayJobName}}
  228. </div>
  229. </td>
  230. </tr>
  231. <tr class="ti-no-ng-animate">
  232. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  233. {{$.i18n.Tr "repo.modelarts.status"}}
  234. </td>
  235. <td class="ti-text-form-content">
  236. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  237. {{.Status}}
  238. </div>
  239. </td>
  240. </tr>
  241. <!-- <tr class="ti-no-ng-animate">
  242. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  243. {{$.i18n.Tr "repo.modelarts.run_version"}}
  244. </td>
  245. <td class="ti-text-form-content">
  246. <div class="text-span text-span-w">
  247. {{.VersionName}}
  248. </div>
  249. </td>
  250. </tr> -->
  251. <tr class="ti-no-ng-animate">
  252. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  253. {{$.i18n.Tr "repo.modelarts.train_job.start_time"}}
  254. </td>
  255. <td class="ti-text-form-content">
  256. <div class="text-span text-span-w">
  257. <span style="font-size: 12px;" class="">
  258. {{if not (eq .StartTime 0)}}
  259. {{TimeSinceUnix1 .StartTime}}
  260. {{else}}
  261. {{TimeSinceUnix1 .CreatedUnix}}
  262. {{end}}
  263. </span>
  264. </div>
  265. </td>
  266. </tr>
  267. <tr class="ti-no-ng-animate">
  268. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  269. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  270. </td>
  271. <td class="ti-text-form-content">
  272. <div class="text-span text-span-w" id="{{.VersionName}}-duration">
  273. {{.TrainJobDuration}}
  274. </div>
  275. </td>
  276. </tr>
  277. <tr class="ti-no-ng-animate">
  278. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  279. {{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}}
  280. </td>
  281. <td class="ti-text-form-content">
  282. <div class="text-span text-span-w">
  283. {{.EngineName}}
  284. </div>
  285. </td>
  286. </tr>
  287. <tr class="ti-no-ng-animate">
  288. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  289. {{$.i18n.Tr "repo.model.manage.description"}}
  290. </td>
  291. <td class="ti-text-form-content">
  292. <div class="text-span text-span-w" id="{{.VersionName}}-desc" style="width: 380px;">
  293. {{if .Description}}
  294. <span title="{{.Description}}">{{.Description}}</span>
  295. {{else}}
  296. <span>--</span>
  297. {{end}}
  298. </div>
  299. </td>
  300. </tr>
  301. <tr class="ti-no-ng-animate">
  302. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  303. 创建人
  304. </td>
  305. <td class="ti-text-form-content">
  306. <div class="text-span text-span-w" id="{{.VersionName}}-creator">
  307. {{$.userName}}
  308. </div>
  309. </td>
  310. </tr>
  311. <tr class="ti-no-ng-animate">
  312. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  313. {{$.i18n.Tr "repo.modelarts.train_job.compute_node"}}
  314. </td>
  315. <td class="ti-text-form-content">
  316. <div class="text-span text-span-w">
  317. {{.WorkServerNumber}}
  318. </div>
  319. </td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. </div>
  324. <div class="ac-grid-col">
  325. <table class="ti-form">
  326. <tbody class="ti-text-form">
  327. <tr class="ti-no-ng-animate">
  328. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  329. {{$.i18n.Tr "repo.modelarts.infer_job_model"}}
  330. </td>
  331. <td class="ti-text-form-content">
  332. <div class="text-span text-span-w">
  333. <span>{{.ModelName}}</span>&nbsp;&nbsp;
  334. <span style="color: #8a8e99">{{$.i18n.Tr "repo.modelarts.version"}}:</span><span>{{.ModelVersion}}</span>&nbsp;&nbsp;
  335. </div>
  336. </td>
  337. </tr>
  338. <tr class="ti-no-ng-animate">
  339. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  340. {{$.i18n.Tr "repo.modelarts.infer_job_model_file"}}
  341. </td>
  342. <td class="ti-text-form-content">
  343. <div class="text-span text-span-w">
  344. {{.CkptName}}
  345. </div>
  346. </td>
  347. </tr>
  348. <tr class="ti-no-ng-animate">
  349. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  350. {{$.i18n.Tr "repo.modelarts.model_label"}}
  351. </td>
  352. <td class="ti-text-form-content">
  353. <div class="text-span text-span-w" id="{{.VersionName}}-labels">
  354. {{if .LabelName}}
  355. {{range $.labelName}}
  356. <a class="ui label" title="{{.}}">{{.}}</a>
  357. {{end}}
  358. {{else}}
  359. <span>--</span>
  360. {{end}}
  361. </div>
  362. </td>
  363. </tr>
  364. <tr class="ti-no-ng-animate">
  365. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  366. {{$.i18n.Tr "repo.modelarts.code_version"}}
  367. </td>
  368. <td class="ti-text-form-content">
  369. <div class="text-span text-span-w">
  370. {{.BranchName}}
  371. </div>
  372. </td>
  373. </tr>
  374. <tr class="ti-no-ng-animate">
  375. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  376. {{$.i18n.Tr "repo.modelarts.train_job.start_file"}}
  377. </td>
  378. <td class="ti-text-form-content">
  379. <div class="text-span text-span-w">
  380. {{.BootFile}}
  381. </div>
  382. </td>
  383. </tr>
  384. <tr class="ti-no-ng-animate">
  385. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  386. {{$.i18n.Tr "repo.modelarts.infer_dataset"}}
  387. </td>
  388. <td class="ti-text-form-content">
  389. <div class="text-span text-span-w">
  390. {{.DatasetName}}
  391. </div>
  392. </td>
  393. </tr>
  394. <tr class="ti-no-ng-animate">
  395. <td class="ti-no-ng-animate ti-text-form-label text-width80" >
  396. {{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}}
  397. </td>
  398. <td class="ti-text-form-content">
  399. <div class="text-span text-span-w" title="{{.Parameters}}">
  400. {{if .Parameters}}
  401. <span>{{.Parameters}}</span>
  402. {{else}}
  403. <span>--</span>
  404. {{end}}
  405. </div>
  406. </td>
  407. </tr>
  408. <tr class="ti-no-ng-animate">
  409. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  410. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  411. </td>
  412. <td class="ti-text-form-content">
  413. <div class="text-span text-span-w">
  414. {{.FlavorName}}
  415. </div>
  416. </td>
  417. </tr>
  418. </tbody>
  419. </table>
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. </div>
  425. <div class="ui tab" data-tab="second">
  426. <div>
  427. <a id="{{.VersionName}}-log-down"
  428. class='{{if eq .Status "KILLED" "FAILED" "START_FAILED" "STOPPED" "COMPLETED" }}ti-download-file{{else}}disabled{{end}}'
  429. href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file?version_name={{.VersionName}}">
  430. <i class="ri-download-cloud-2-line"></i>
  431. <span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span>
  432. </a>
  433. </div>
  434. <div style="position: relative;border: 1px solid rgba(0,0,0,.2);padding: 0 10px;margin-top: 10px;">
  435. <span>
  436. <a title="滚动到顶部" style="position: absolute; right: -32px;cursor: pointer;"
  437. class="log_top" data-version="{{.VersionName}}"><i class="icon-to-top"></i></a>
  438. </span>
  439. <span>
  440. <a title="滚动到底部" style="position: absolute; bottom: 10px;right: -32px;cursor: pointer;"
  441. class="log_bottom" data-version="{{.VersionName}}"><i
  442. class="icon-to-bottom"></i></a>
  443. </span>
  444. <div class="ui message message{{.VersionName}}" style="display: none;">
  445. <div id="header"></div>
  446. </div>
  447. <div class="ui attached log log-scroll" data-version="{{.VersionName}}" id="log{{.VersionName}}" style="height: 300px !important; overflow: auto;">
  448. <input type="hidden" name="end_line" value>
  449. <input type="hidden" name="start_line" value>
  450. <pre id="log_file{{.VersionName}}"></pre>
  451. </div>
  452. </div>
  453. </div>
  454. <div class="ui tab" data-tab="third">
  455. <input type="hidden" name="model{{.VersionName}}" value="-1">
  456. <input type="hidden" name="modelback{{.VersionName}}" value="-1">
  457. <div class='ui breadcrumb model_file_bread' id='file_breadcrumb{{.VersionName}}'>
  458. <div class="active section">result</div>
  459. <div class="divider"> / </div>
  460. </div>
  461. <div id="dir_list{{.VersionName}}">
  462. </div>
  463. </div>
  464. </div>
  465. </div>
  466. </div>
  467. {{end}}
  468. </div>
  469. <!-- 确认模态框 -->
  470. </div>
  471. {{template "base/footer" .}}
  472. <script>
  473. $(document).ready(function(){
  474. $('.secondary.menu .item').tab();
  475. });
  476. let userName
  477. let repoPath
  478. let jobID
  479. let downlaodFlag = {{$.canDownload }}
  480. $(document).ready(function(){
  481. let url = window.location.href;
  482. let urlArr = url.split('/')
  483. userName = urlArr.slice(-5)[0]
  484. repoPath = urlArr.slice(-4)[0]
  485. jobID = urlArr.slice(-1)[0]
  486. })
  487. function loadLog(version_name){
  488. $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/inference-job/${jobID}/log?version_name=${version_name}&lines=50&order=asc`, (data) => {
  489. $('input[name=end_line]').val(data.EndLine)
  490. $('input[name=start_line]').val(data.StartLine)
  491. $(`#log_file${version_name}`).text(data.Content)
  492. }).fail(function(err) {
  493. console.log(err);
  494. });
  495. }
  496. </script>