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

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