Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/669tags/v1.21.12.1
| @@ -808,10 +808,10 @@ modelarts.train_job.fast_parameter_setting=fast_parameter_setting | |||||
| modelarts.train_job.fast_parameter_setting_config=fast_parameter_setting_config | modelarts.train_job.fast_parameter_setting_config=fast_parameter_setting_config | ||||
| modelarts.train_job.fast_parameter_setting_config_link=fast_parameter_setting_config_link | modelarts.train_job.fast_parameter_setting_config_link=fast_parameter_setting_config_link | ||||
| modelarts.train_job.frames=frames | modelarts.train_job.frames=frames | ||||
| modelarts.train_job.algorithm_origin=算法来源 | |||||
| modelarts.train_job.algorithm_origin=Algorithm Origin | |||||
| modelarts.train_job.AI_driver=AI Engine | modelarts.train_job.AI_driver=AI Engine | ||||
| modelarts.train_job.start_file=Start File | modelarts.train_job.start_file=Start File | ||||
| modelarts.train_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。 | |||||
| modelarts.train_job.boot_file_helper=The startup file is the entry file that your program executes, and it must be a file ending in .py | |||||
| modelarts.train_job.dataset=Dataset | modelarts.train_job.dataset=Dataset | ||||
| modelarts.train_job.run_parameter=Run Parameter | modelarts.train_job.run_parameter=Run Parameter | ||||
| modelarts.train_job.add_run_parameter=Add Run Parameter | modelarts.train_job.add_run_parameter=Add Run Parameter | ||||
| @@ -822,8 +822,8 @@ modelarts.train_job.resource_setting_info=resource_setting_info | |||||
| modelarts.train_job.resource_pool=resource_pool | modelarts.train_job.resource_pool=resource_pool | ||||
| modelarts.train_job.resource_type=resource_type | modelarts.train_job.resource_type=resource_type | ||||
| modelarts.train_job.standard=Standard | modelarts.train_job.standard=Standard | ||||
| modelarts.train_job.NAS_address=NAS地址 | |||||
| modelarts.train_job.NAS_mount_path=NAS挂载路径 | |||||
| modelarts.train_job.NAS_address=NAS Address | |||||
| modelarts.train_job.NAS_mount_path=NAS Mount Path | |||||
| modelarts.train_job.query_whether_save_parameter=query_whether_save_parameter | modelarts.train_job.query_whether_save_parameter=query_whether_save_parameter | ||||
| modelarts.train_job.save_helper=save_helper | modelarts.train_job.save_helper=save_helper | ||||
| modelarts.train_job.common_frame=common_frame | modelarts.train_job.common_frame=common_frame | ||||
| @@ -254,8 +254,8 @@ | |||||
| <a class="item" href="{{.RepoLink}}/modelarts/notebook" data-value="22">Ascend NPU</a> | <a class="item" href="{{.RepoLink}}/modelarts/notebook" data-value="22">Ascend NPU</a> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <a class="ui green button" href="{{.RepoLink}}/cloudbrain/create">{{$.i18n.Tr "repo.modelarts.train_job.new_debug"}}</a> | |||||
| {{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a class="ui green button" href="{{.RepoLink}}/cloudbrain/create">{{$.i18n.Tr "repo.modelarts.train_job.new_debug"}}</a>{{end}} | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -357,15 +357,27 @@ | |||||
| {{end}} | {{end}} | ||||
| <!-- 调试 --> | <!-- 调试 --> | ||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="model-debug-{{.JobID}}" class="ui basic {{if not .CanDebug}}disabled {{else}}blue {{end}}button" href="{{$.Link}}/{{.JobID}}/debug" target="_blank"> | <a id="model-debug-{{.JobID}}" class="ui basic {{if not .CanDebug}}disabled {{else}}blue {{end}}button" href="{{$.Link}}/{{.JobID}}/debug" target="_blank"> | ||||
| {{$.i18n.Tr "repo.debug"}} | {{$.i18n.Tr "repo.debug"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a class="ui basic disabled button" href="{{$.Link}}/{{.JobID}}/debug" target="_blank"> | |||||
| {{$.i18n.Tr "repo.debug"}} | |||||
| </a> | |||||
| {{end}} | |||||
| <form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> | <form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="stop-model-debug-{{.JobID}}" class="ui basic {{if or (eq .Status "STOPPED") (eq .Status "FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | <a id="stop-model-debug-{{.JobID}}" class="ui basic {{if or (eq .Status "STOPPED") (eq .Status "FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | ||||
| {{$.i18n.Tr "repo.stop"}} | {{$.i18n.Tr "repo.stop"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a class="ui basic disabled button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{$.i18n.Tr "repo.stop"}} | |||||
| </a> | |||||
| {{end}} | |||||
| </form> | </form> | ||||
| </div> | </div> | ||||
| <div class="ui compact buttons" style="margin-right:10px;"> | <div class="ui compact buttons" style="margin-right:10px;"> | ||||
| @@ -376,16 +388,25 @@ | |||||
| <!-- 接收结果 --> | <!-- 接收结果 --> | ||||
| <iframe src="" frameborder="0" name="iframeContent" style="display: none;"></iframe> | <iframe src="" frameborder="0" name="iframeContent" style="display: none;"></iframe> | ||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="model-image-{{.JobID}}" class="imageBtn ui basic {{if not .CanDebug}}disabled {{else}}blue {{end}}button" value="{{.CanDebug}}">{{$.i18n.Tr "repo.submit_image"}}</a> | <a id="model-image-{{.JobID}}" class="imageBtn ui basic {{if not .CanDebug}}disabled {{else}}blue {{end}}button" value="{{.CanDebug}}">{{$.i18n.Tr "repo.submit_image"}}</a> | ||||
| {{else}} | |||||
| <a class="imageBtn ui basic disabled button" value="{{.CanDebug}}">{{$.i18n.Tr "repo.submit_image"}}</a> | |||||
| {{end}} | |||||
| </div> | </div> | ||||
| <!-- 删除任务 --> | <!-- 删除任务 --> | ||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> | <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="model-delete-{{.JobID}}" class="ui compact {{if not .CanDel}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | <a id="model-delete-{{.JobID}}" class="ui compact {{if not .CanDel}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | ||||
| {{$.i18n.Tr "repo.delete"}} | {{$.i18n.Tr "repo.delete"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a class="ui compact disabled button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| {{$.i18n.Tr "repo.delete"}} | |||||
| </a> | |||||
| {{end}} | |||||
| </form> | </form> | ||||
| </div> | </div> | ||||
| @@ -224,8 +224,8 @@ | |||||
| <a class="item" href="{{.RepoLink}}/modelarts/notebook" data-value="22">Ascend NPU</a> | <a class="item" href="{{.RepoLink}}/modelarts/notebook" data-value="22">Ascend NPU</a> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <a class="ui green button" href="{{.RepoLink}}/modelarts/notebook/create">{{$.i18n.Tr "repo.modelarts.train_job.new_debug"}}</a> | |||||
| {{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a class="ui green button" href="{{.RepoLink}}/modelarts/notebook/create">{{$.i18n.Tr "repo.modelarts.train_job.new_debug"}}</a>{{end}} | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -310,15 +310,29 @@ | |||||
| <div class="ui compact buttons"> | <div class="ui compact buttons"> | ||||
| <!-- <a class="ui basic blue button" href="{{$.Link}}/{{.JobID}}"> | <!-- <a class="ui basic blue button" href="{{$.Link}}/{{.JobID}}"> | ||||
| 查看 | 查看 | ||||
| </a> --> | |||||
| </a> --> | |||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="model-debug-{{.JobID}}" style="margin-right: 2rem;" class="ui basic {{if not .CanDebug}}disabled {{else}}blue {{end}}button" href="{{$.Link}}/{{.JobID}}/debug" target="_blank"> | <a id="model-debug-{{.JobID}}" style="margin-right: 2rem;" class="ui basic {{if not .CanDebug}}disabled {{else}}blue {{end}}button" href="{{$.Link}}/{{.JobID}}/debug" target="_blank"> | ||||
| {{$.i18n.Tr "repo.debug"}} | {{$.i18n.Tr "repo.debug"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a style="margin-right: 2rem;" class="ui basic disabled button" href="{{$.Link}}/{{.JobID}}/debug" target="_blank"> | |||||
| {{$.i18n.Tr "repo.debug"}} | |||||
| </a> | |||||
| {{end}} | |||||
| <form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> | <form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <a id="stop-model-debug-{{.JobID}}" style="margin-right: 2rem;" class="ui basic {{if or (eq .Status "STOPPED") (eq .Status "FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="stop-model-debug-{{.JobID}}" style="margin-right: 2rem;" class="ui basic {{if or (eq .Status "STOPPED") (eq .Status "FAILED") (eq .Status "START_FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{$.i18n.Tr "repo.stop"}} | {{$.i18n.Tr "repo.stop"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a style="margin-right: 2rem;" class="ui basic disabled button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{$.i18n.Tr "repo.stop"}} | |||||
| </a> | |||||
| {{end}} | |||||
| </form> | </form> | ||||
| </div> | </div> | ||||
| @@ -337,9 +351,15 @@ | |||||
| <!-- 删除任务 --> | <!-- 删除任务 --> | ||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> | <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="model-delete-{{.JobID}}" class="ui compact {{if eq .Status "RUNNING"}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | <a id="model-delete-{{.JobID}}" class="ui compact {{if eq .Status "RUNNING"}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | ||||
| {{$.i18n.Tr "repo.delete"}} | {{$.i18n.Tr "repo.delete"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a class="ui compact disabled button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| {{$.i18n.Tr "repo.delete"}} | |||||
| </a> | |||||
| {{end}} | |||||
| </form> | </form> | ||||
| </div> | </div> | ||||
| @@ -462,12 +482,16 @@ | |||||
| $('#model-delete-'+jobID).removeClass('red') | $('#model-delete-'+jobID).removeClass('red') | ||||
| $('#model-delete-'+jobID).addClass('disabled') | $('#model-delete-'+jobID).addClass('disabled') | ||||
| } | } | ||||
| if(status=="STOPPED" || status=="FAILED"){ | |||||
| if(status=="STOPPED" || status=="FAILED" ){ | |||||
| $('#stop-model-debug-'+jobID).removeClass('blue') | $('#stop-model-debug-'+jobID).removeClass('blue') | ||||
| $('#stop-model-debug-'+jobID).addClass('disabled') | $('#stop-model-debug-'+jobID).addClass('disabled') | ||||
| $('#model-delete-'+jobID).removeClass('disabled') | $('#model-delete-'+jobID).removeClass('disabled') | ||||
| $('#model-delete-'+jobID).addClass('red') | $('#model-delete-'+jobID).addClass('red') | ||||
| } | } | ||||
| if(status=="START_FAILED"){ | |||||
| $('#stop-model-debug-'+jobID).removeClass('blue') | |||||
| $('#stop-model-debug-'+jobID).addClass('disabled') | |||||
| } | |||||
| }).fail(function(err) { | }).fail(function(err) { | ||||
| console.log(err); | console.log(err); | ||||
| }); | }); | ||||
| @@ -247,8 +247,8 @@ | |||||
| <a class="item" href="{{.RepoLink}}/modelarts/notebook" data-value="22">Ascend NPU</a> | <a class="item" href="{{.RepoLink}}/modelarts/notebook" data-value="22">Ascend NPU</a> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <a class="ui green button" href="{{.RepoLink}}/modelarts/train-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_train"}}</a> | |||||
| {{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a class="ui green button" href="{{.RepoLink}}/modelarts/train-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_train"}}</a>{{end}} | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -354,9 +354,15 @@ | |||||
| </a> --> | </a> --> | ||||
| <form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> | <form id="stopForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/stop" method="post" style="margin-left:-1px;"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <a id="stop-model-debug-{{.JobID}}" class="ui basic {{if or (eq .Status "KILLED") (eq .Status "FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="stop-model-debug-{{.JobID}}" class="ui basic {{if or (eq .Status "KILLED") (eq .Status "FAILED") (eq .Status "START_FAILED")}}disabled {{else}}blue {{end}}button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{$.i18n.Tr "repo.stop"}} | {{$.i18n.Tr "repo.stop"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a class="ui basic disabled button" onclick="document.getElementById('stopForm-{{.JobID}}').submit();"> | |||||
| {{$.i18n.Tr "repo.stop"}} | |||||
| </a> | |||||
| {{end}} | |||||
| </form> | </form> | ||||
| </div> | </div> | ||||
| <div class="ui compact buttons" style="margin-right:10px;"> | <div class="ui compact buttons" style="margin-right:10px;"> | ||||
| @@ -373,9 +379,15 @@ | |||||
| <!-- 删除任务 --> | <!-- 删除任务 --> | ||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> | <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{$.Link}}/{{.JobID}}/del" method="post"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
| <a id="model-delete-{{.JobID}}" class="ui compact {{if eq .Status "RUNNING" }}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | <a id="model-delete-{{.JobID}}" class="ui compact {{if eq .Status "RUNNING" }}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | ||||
| {{$.i18n.Tr "repo.delete"}} | {{$.i18n.Tr "repo.delete"}} | ||||
| </a> | </a> | ||||
| {{else}} | |||||
| <a class="ui compact disabled button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| {{$.i18n.Tr "repo.delete"}} | |||||
| </a> | |||||
| {{end}} | |||||
| </form> | </form> | ||||
| </div> | </div> | ||||
| @@ -529,6 +541,10 @@ | |||||
| $('#model-delete-'+jobID).removeClass('disabled') | $('#model-delete-'+jobID).removeClass('disabled') | ||||
| $('#model-delete-'+jobID).addClass('red') | $('#model-delete-'+jobID).addClass('red') | ||||
| } | } | ||||
| if(status=="START_FAILED"){ | |||||
| $('#stop-model-debug-'+jobID).removeClass('blue') | |||||
| $('#stop-model-debug-'+jobID).addClass('disabled') | |||||
| } | |||||
| }).fail(function(err) { | }).fail(function(err) { | ||||
| console.log(err); | console.log(err); | ||||
| }); | }); | ||||
| @@ -165,7 +165,7 @@ | |||||
| --> | --> | ||||
| <div class="unite min_title inline field"> | <div class="unite min_title inline field"> | ||||
| <label for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> | <label for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> | ||||
| <textarea style="width: 80%;" id="description" name="description" rows="2"></textarea> | |||||
| <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="256" placeholder="描述字符不超过256个字符" onchange="this.value=this.value.substring(0, 256)" onkeydown="this.value=this.value.substring(0, 256)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | |||||
| </div> | </div> | ||||
| <!-- <h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}</h4> | <!-- <h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}</h4> | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| @@ -26,7 +26,7 @@ | |||||
| <div class="ui container"> | <div class="ui container"> | ||||
| <div class="ui top attached tabular menu"> | <div class="ui top attached tabular menu"> | ||||
| <a class="item active" data-tab="configs">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | <a class="item active" data-tab="configs">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | ||||
| <a class="item logs" data-tab="logs">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | |||||
| <a class="item logs" data-tab="logs">{{$.i18n.Tr "repo.modelarts.log"}}</a> | |||||
| <!-- <a class="item" data-tab="resources">资源占用情况</a> --> | <!-- <a class="item" data-tab="resources">资源占用情况</a> --> | ||||
| </div> | </div> | ||||
| <div class="ui bottom attached tab segment active" data-tab="configs"> | <div class="ui bottom attached tab segment active" data-tab="configs"> | ||||