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.

version_new.tmpl 18 kB

3 years ago
2 years ago
3 years ago
2 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
2 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
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
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 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
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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. padding-left: 6rem !important;
  14. margin-bottom: 2rem !important;
  15. }
  16. .width{
  17. width:100% !important;
  18. }
  19. .width80{
  20. width: 80.7% !important;
  21. margin-left: 10px;
  22. }
  23. .width85{
  24. width: 85% !important;
  25. margin-left: 4.5rem !important;
  26. }
  27. .width81{
  28. margin-left: 1.5rem;
  29. width: 81% !important;
  30. }
  31. .add{font-size: 18px;
  32. padding: 0.5rem;
  33. border: 1px solid rgba(187, 187, 187, 100);
  34. border-radius: 0px 5px 5px 0px;
  35. line-height: 21px;
  36. text-align: center;
  37. color: #C2C7CC;
  38. }
  39. .min{
  40. font-size: 18px;
  41. padding: 0.5rem;
  42. border: 1px solid rgba(187, 187, 187, 100);
  43. border-radius: 5px 0px 0px 5px;
  44. line-height: 21px;
  45. text-align: center;
  46. color: #C2C7CC;"
  47. }
  48. </style>
  49. {{template "custom/global_mask" .}}
  50. <div class="repository">
  51. {{template "repo/header" .}}
  52. <div class="ui container">
  53. <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}}"></div>
  54. {{template "base/alert" .}}
  55. <h4 class="ui top attached header">
  56. {{.i18n.Tr "repo.modelarts.train_job.new"}}
  57. </h4>
  58. <div class="ui attached segment">
  59. <!-- equal width -->
  60. <form id="form_id" class="ui form" action="{{$.Link}}" method="post">
  61. {{.CsrfTokenHtml}}
  62. <input type="hidden" name="action" value="update">
  63. {{if .version_name}}
  64. <input type="hidden" name="version_name" value="{{.version_name}}">
  65. {{else}}
  66. <input type="hidden" name="version_name" value="">
  67. {{end}}
  68. <input type="hidden" id="ai_engine_name" name="engine_names" value="">
  69. <input type="hidden" id="ai_flaver_name" name="flaver_names" value="">
  70. <input type="hidden" id="display_job_name" name="display_job_name" value="{{.display_job_name}}">
  71. <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
  72. <div class="required min_title inline field">
  73. <label class="" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label>
  74. <div class="ui blue mini menu compact selectcloudbrain">
  75. <a class="active item" href="javascript:void 0;" style="cursor:not-allowed;">
  76. <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>
  77. {{.i18n.Tr "cloudbrain.resource_cluster_openi"}}
  78. </a>
  79. <a class="item" href="javascript:void 0;" style="cursor:not-allowed;background:rgba(0,0,0,.03);">
  80. <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>
  81. {{.i18n.Tr "cloudbrain.resource_cluster_c2net"}}(Beta)
  82. </a>
  83. </div>
  84. </div>
  85. <div class="required inline min_title field">
  86. <label class="" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label>
  87. <div class="ui blue mini menu compact selectcloudbrain">
  88. <a class="item" href="javascript:void 0;" style="cursor:not-allowed;background:rgba(0,0,0,.03);">
  89. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"
  90. height="16">
  91. <path fill="none" d="M0 0h24v24H0z" />
  92. <path
  93. 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" />
  94. </svg>
  95. CPU/GPU
  96. </a>
  97. <a class="active item" href="javascript:void 0;" style="cursor:not-allowed;">
  98. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"
  99. height="16">
  100. <path fill="none" d="M0 0h24v24H0z" />
  101. <path
  102. 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" />
  103. </svg>
  104. Ascend NPU</a>
  105. </div>
  106. </div>
  107. <div style="display: flex;align-items: center;margin-left: 156px;margin-top: -0.5rem;">
  108. {{template "custom/task_wait_count" .}}
  109. </div>
  110. <div style="display: flex;align-items: center;margin-left: 156px;margin-top: 0.5rem;margin-bottom: 1.5rem;">
  111. <i class="ri-error-warning-line" style="color: #f2711c;margin-right: 0.5rem;"></i>
  112. <span style="color: #888;font-size: 12px;">{{.i18n.Tr "cloudbrain.train_dataset_path_rule" | Safe}}</span>
  113. </div>
  114. <div class="required unite min_title inline field">
  115. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
  116. <input type="hidden" style="width: 60%;" name="job_name" id="job_name" value="{{.job_name}}">
  117. <input style="width: 60%;" name="display_job_name" id="display_job_name" value="{{.display_job_name}}" tabindex="3" disabled >
  118. </div>
  119. <div class="required unite min_title inline field">
  120. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.parents_version"}}</label>
  121. {{if .version_name}}
  122. <input style="width: 60%;" value="{{.version_name}}" tabindex="3" disabled >
  123. {{else}}
  124. <input id="parents_version" style="width: 60%;" value="" tabindex="3" disabled >
  125. {{end}}
  126. </div>
  127. <div class="unite min_title inline field">
  128. <label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}&nbsp;&nbsp;</label>
  129. <textarea style="width: 80%;" id="description" value="{{.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, 256)">{{.description}}</textarea>
  130. </div>
  131. <div class="ui divider"></div>
  132. <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4>
  133. <div class="required unite min_title inline field">
  134. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label>
  135. <select class="ui dropdown width80 left2" id="code_version" name="branch_name">
  136. {{if .branch_name}}
  137. <option name="branch_name" value="{{.branch_name}}">{{.branch_name}}</option>
  138. {{end}}
  139. {{range $k, $v :=.branches}}
  140. {{if ne $.branch_name $v}}
  141. <option name="branch_name" value="{{$v}}">{{$v}}</option>
  142. {{end}}
  143. {{end}}
  144. </select>
  145. </div>
  146. {{template "custom/select_model" .}}
  147. <div class="required unite min_title inline fields" style="width: 90%;">
  148. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.AI_driver"}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
  149. <div class="field" style="flex: 1.5;">
  150. <select class="ui dropdown width" id="trainjob_engines" >
  151. {{range .engines}}
  152. <option value="{{.Value}}">{{.Value}}</option>
  153. {{end}}
  154. </select>
  155. </div>
  156. <div class="field" style="flex: 2;" id="engine_name">
  157. <select class="ui dropdown width" id="trainjob_engine_versions" style='width: 100%;' name="engine_id">
  158. {{if .engine_id}}
  159. <option name="engine_id" value="{{.engine_id}}">{{.engine_name}}</option>
  160. {{end}}
  161. {{range .engine_versions}}
  162. {{if ne $.engine_id .ID}}
  163. <option name="engine_id" value="{{.ID}}">{{.Value}}</option>
  164. {{end}}
  165. {{end}}
  166. </select>
  167. </div>
  168. </div>
  169. <div class="inline unite min_title field required">
  170. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
  171. {{if .boot_file}}
  172. <input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="{{.boot_file}}" tabindex="3" autofocus required maxlength="255" >
  173. {{else}}
  174. <input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
  175. {{end}}
  176. <span>
  177. <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i>
  178. </span>
  179. <a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a>
  180. </div>
  181. <div id="select-multi-dataset">
  182. </div>
  183. <span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 1rem;"></span>
  184. <div class="inline unite min_title field">
  185. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label>
  186. <span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span>
  187. <input id="store_run_para" type="hidden" name="run_para_list">
  188. <div class="dynamic field" style="margin-top: 1rem;" data-params="{{.run_para_list}}" data-params-value="{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}" data-params-name="{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}">
  189. </div>
  190. </div>
  191. <div class="required field " style="display: none;">
  192. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label>
  193. <select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id">
  194. {{range .resource_pools}}
  195. <option value="{{.ID}}">{{.Value}}</option>
  196. {{end}}
  197. </select>
  198. </div>
  199. <div class="required grouped fields" style="display: none;">
  200. <label style="font-weight: normal;" for="resource_type">{{.i18n.Tr "repo.modelarts.train_job.resource_type"}}</label>
  201. <div class="field">
  202. <div class="ui grid">
  203. <div class="column">
  204. <div class="ui radio checkbox">
  205. <input type="radio" name="resource_type" checked="" tabindex="0">
  206. </div>
  207. </div>
  208. <div class="three wide column">train-private-1</div>
  209. <div class="three wide column">{{svg "octicon-verified" 16}} 运行中</div>
  210. <div class="three wide column"> CPU:192 核 2048GiB</div>
  211. </div>
  212. </div>
  213. </div>
  214. <div class="required unite min_title inline field" id="flaver_name">
  215. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label>
  216. <select id="__specs__" class="ui dropdown width80" style='width:385px' name="spec_id" ovalue="{{.spec_id}}" {{if .CloudBrainPaySwitch}}blance="{{.PointAccount.Balance}}"{{end}}></select>
  217. {{if .CloudBrainPaySwitch}}
  218. <div class="cloudbrain_resource_spec_blance_tip width80" style="padding:0 5px;margin:6px 0;margin-left:60px;font-size:12px;">
  219. <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>
  220. <span style="float:right;">
  221. <i class="question circle icon link" data-position="right center" data-variation="mini"></i>
  222. <a href="{{AppSubUrl}}/reward/point/rule" target="_blank">{{$.i18n.Tr "points.points_acquisition_instructions"}}</a>
  223. </span>
  224. </div>
  225. {{end}}
  226. </div>
  227. <div class="inline required unite min_title field">
  228. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label>
  229. <div class="ui labeled input" style="width: 5%;">
  230. <input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="{{.work_server_number}}" readonly>
  231. </div>
  232. </div>
  233. <div class="inline unite min_title field">
  234. <button class="ui create_train_job green button">
  235. {{.i18n.Tr "repo.cloudbrain.new"}}
  236. </button>
  237. <a class="ui button" href="{{.RepoLink}}/modelarts/train-job">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  238. </div>
  239. <!-- 模态框 -->
  240. </form>
  241. </div>
  242. </div>
  243. </div>
  244. {{template "base/footer" .}}
  245. <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  246. <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  247. <script>
  248. let version_name = location.search.split('?version_name=')[1]
  249. $("#parents_version").val(version_name)
  250. $("input[name=version_name]").attr('value',version_name)
  251. ;(function() {
  252. var SPECS = {{ .Specs }};
  253. var showPoint = {{ .CloudBrainPaySwitch }};
  254. window.renderSpecsSelect($('#__specs__'), SPECS, showPoint, {
  255. gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}},
  256. free: {{$.i18n.Tr "cloudbrain.free"}},
  257. point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}},
  258. memory: {{$.i18n.Tr "cloudbrain.memory"}},
  259. shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}},
  260. });
  261. })();
  262. </script>