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.

new.tmpl 13 kB

2 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
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {{template "base/head" .}}
  2. {{template "custom/global_mask" .}}
  3. <div class="repository">
  4. {{template "repo/header" .}}
  5. <div class="ui container">
  6. <div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.attachment}}" data-dataset-name="{{.dataset_name}}" data-exceed-size="{{DebugAttachSize}}"></div>
  7. {{if eq .NotStopTaskCount 0}}
  8. {{template "base/alert" .}}
  9. {{end}}
  10. <div class="ui negative message" id="messageInfo" style="display: none;">
  11. <p></p>
  12. </div>
  13. <h4 class="ui top attached header">
  14. {{.i18n.Tr "repo.modelarts.train_job.new_debug"}}
  15. </h4>
  16. {{template "custom/alert_cb" .}}
  17. <div class="ui attached segment">
  18. <form class="ui form" id="form_id" action="{{.Link}}" method="post">
  19. <input type="hidden" name="type" value="2">
  20. <input type="hidden" name="image" value="">
  21. {{.CsrfTokenHtml}}
  22. <h4 class="train-job-title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
  23. <div class="required min_title inline field">
  24. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label>
  25. <div class="ui blue mini menu compact selectcloudbrain">
  26. <a class="item" href="{{.RepoLink}}/cloudbrain/create">
  27. <svg class="svg" sxmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667zM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13zM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667z"></path></svg>
  28. {{.i18n.Tr "cloudbrain.resource_cluster_openi"}}
  29. </a>
  30. <a class="active item" href="{{.RepoLink}}/grampus/notebook/create?type=1">
  31. <svg class="svg" sxmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667zM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13zM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667z"></path></svg>
  32. {{.i18n.Tr "cloudbrain.resource_cluster_c2net"}}(Beta)
  33. </a>
  34. </div>
  35. </div>
  36. <div class="inline required field">
  37. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label>
  38. <div class="ui blue small menu compact selectcloudbrain">
  39. <a class="item" href="{{.RepoLink}}/grampus/notebook/create?type=0">
  40. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
  41. <path fill="none" d="M0 0h24v24H0z"/>
  42. <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/>
  43. </svg>
  44. CPU/GPU</a>
  45. <a class="item" href="{{.RepoLink}}/grampus/notebook/create?type=1">
  46. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
  47. <path fill="none" d="M0 0h24v24H0z"/>
  48. <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/>
  49. </svg>
  50. Ascend NPU</a>
  51. <a class="active item" href="{{.RepoLink}}/grampus/notebook/create?type=2">
  52. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
  53. <path fill="none" d="M0 0h24v24H0z"/>
  54. <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/>
  55. </svg>
  56. GCU</a>
  57. </div>
  58. </div>
  59. <div class="inline field">
  60. <label class="label-fix-width" style="font-weight: normal;"></label>
  61. {{template "custom/task_wait_count" .}}
  62. <div style="display: flex;align-items: center;margin-left: 156px;margin-top: 0.5rem;">
  63. <i class="ri-error-warning-line" style="color: #f2711c;margin-right: 0.5rem;"></i>
  64. <span style="color: #888;font-size: 12px;">{{.i18n.Tr "cloudbrain.new_debug_gpu_tooltips1" "/code" "/dataset" "/pretrainmodel" | Safe}}</span>
  65. </div>
  66. </div>
  67. <div class="inline min_title required field" style="margin-bottom: 0rem !important;">
  68. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.task_name"}}</label>
  69. <input name="display_job_name" id="cloudbrain_job_name" placeholder="任务名称" style="width: 60%;" value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="36" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
  70. </div>
  71. <span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 2rem;">{{.i18n.Tr "repo.cloudbrain_jobname_err"}}</span>
  72. <div class="inline min_title field">
  73. <label class="label-fix-width" style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label>
  74. {{if .description}}
  75. <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}}>{{.description}}</textarea>
  76. {{else}}
  77. <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea>
  78. {{end}}
  79. </div>
  80. <div class="ui divider"></div>
  81. <div class="inline min_title required field">
  82. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label>
  83. <select class="ui dropdown width80 left2 {{if not .Branches}}error{{end}}" id="code_version"
  84. name="branch_name">
  85. {{if .branch_name}}
  86. <option name="branch_name" value="{{.branch_name}}">{{.branch_name}}</option>
  87. {{range $k, $v :=.Branches}}
  88. {{ if ne $v $.branch_name }}
  89. <option name="branch_name" value="{{$v}}">{{$v}}</option>
  90. {{end}}
  91. {{end}}
  92. {{else}}
  93. <option name="branch_name" value="{{.branchName}}">{{.branchName}}</option>
  94. {{range $k, $v :=.Branches}}
  95. {{ if ne $v $.branchName }}
  96. <option name="branch_name" value="{{$v}}">{{$v}}</option>
  97. {{end}}
  98. {{end}}
  99. {{end}}
  100. </select>
  101. </div>
  102. {{template "custom/select_model" .}}
  103. <div class="inline min_title required field">
  104. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.mirror"}}</label>
  105. <select class="ui search dropdown cloudbrain_image width48" placeholder="{{.i18n.Tr "cloudbrain.choose_mirror"}}" style='width:385px' name="image_id">
  106. {{range .images}}
  107. <option name="image_id" value="{{.ID}}">{{.Name}}</option>
  108. {{end}}
  109. </select>
  110. </div>
  111. <div id="select-multi-dataset">
  112. </div>
  113. <span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 1rem;"></span>
  114. <div class="inline min_title required field">
  115. <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.specification"}}</label>
  116. <select id="__specs__" class="ui search dropdown width48" ovalue="{{.spec_id}}"
  117. {{if .CloudBrainPaySwitch}}blance="{{.PointAccount.Balance}}"{{end}}
  118. placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' name="spec_id"></select>
  119. <span><i class="question circle icon link"></i></span>
  120. <a href="{{AppSubUrl}}/resource_desc" target="_blank">{{.i18n.Tr "custom.resource_description"}}</a>
  121. {{if .CloudBrainPaySwitch}}
  122. <div class="cloudbrain_resource_spec_blance_tip" style="padding:0 5px;margin:6px 0;margin-left:154px;font-size:12px;width:48.5%!important;">
  123. <span>{{$.i18n.Tr "points.balance_of_points"}}<span style="color:red;margin: 0 3px">{{.PointAccount.Balance}}</span>{{$.i18n.Tr "points.points"}}</span><span>{{$.i18n.Tr "points.expected_time"}}<span style="color:red;margin: 0 3px" class="can-use-time"></span>{{$.i18n.Tr "points.hours"}}</span>
  124. <span style="float:right;">
  125. <i class="question circle icon link" data-position="right center" data-variation="mini"></i>
  126. <a href="{{AppSubUrl}}/reward/point/rule" target="_blank">{{$.i18n.Tr "points.points_acquisition_instructions"}}</a>
  127. </span>
  128. </div>
  129. {{end}}
  130. </div>
  131. <div class="inline field">
  132. <label class="label-fix-width" style="font-weight: normal;"></label>
  133. <button class="ui create_train_job green button {{if eq .NotStopTaskCount 1}}disabled{{end}}">
  134. {{.i18n.Tr "repo.cloudbrain.new"}}
  135. </button>
  136. <a class="ui button cancel" href="{{.RepoLink}}/debugjob?debugListType=all">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  137. </div>
  138. </form>
  139. </div>
  140. </div>
  141. </div>
  142. {{template "base/footer" .}}
  143. <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  144. <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  145. <script>
  146. ;(function() {
  147. var SPECS = {{ .Specs }};
  148. var showPoint = {{ .CloudBrainPaySwitch }};
  149. window.renderSpecsSelect($('#__specs__'), SPECS, showPoint, {
  150. gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}},
  151. free: {{$.i18n.Tr "cloudbrain.free"}},
  152. point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}},
  153. memory: {{$.i18n.Tr "cloudbrain.memory"}},
  154. shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}},
  155. });
  156. })();
  157. </script>