| @@ -936,6 +936,7 @@ modelarts.infer_job_model_file = Model File | |||||
| modelarts.infer_job = Inference Job | modelarts.infer_job = Inference Job | ||||
| modelarts.infer_job.model_version = Model/Version | modelarts.infer_job.model_version = Model/Version | ||||
| modelarts.infer_job.select_model = Select Model | modelarts.infer_job.select_model = Select Model | ||||
| modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed. | |||||
| model.manage.import_new_model=Import New Model | model.manage.import_new_model=Import New Model | ||||
| model.manage.create_error=Equal Name and Version has existed. | model.manage.create_error=Equal Name and Version has existed. | ||||
| @@ -948,6 +948,7 @@ modelarts.infer_job = 推理任务 | |||||
| modelarts.infer_job.model_version = 模型/版本 | modelarts.infer_job.model_version = 模型/版本 | ||||
| modelarts.infer_job.select_model = 选择模型 | modelarts.infer_job.select_model = 选择模型 | ||||
| modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。 | modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。 | ||||
| modelarts.infer_job.tooltip = 该模型已删除,无法查看。 | |||||
| model.manage.import_new_model=导入新模型 | model.manage.import_new_model=导入新模型 | ||||
| model.manage.create_error=相同的名称和版本的模型已经存在。 | model.manage.create_error=相同的名称和版本的模型已经存在。 | ||||
| @@ -110,8 +110,9 @@ | |||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| <!-- 模型版本 --> | <!-- 模型版本 --> | ||||
| <!-- href="{{$.RepoLink}}/modelmanage/show_model_info?name={{.ModelName}}" --> | |||||
| <div class="three wide column text center padding0"> | <div class="three wide column text center padding0"> | ||||
| <a href="{{$.RepoLink}}/modelmanage/show_model_info?name={{.ModelName}}">{{.ModelName}} </a> <span style="font-size: 12px;">{{.ModelVersion}} </span> | |||||
| <a id="{{.JobName}}" href="javascript:void(0);" data-variation="inverted" data-position="top center" data-content="{{$.i18n.Tr "repo.modelarts.infer_job.tooltip"}}" onclick="getModelInfo({{.ModelName}},{{.ModelVersion}},{{.JobName}})">{{.ModelName}} </a> <span style="font-size: 12px;">{{.ModelVersion}} </span> | |||||
| </div> | </div> | ||||
| <!-- 任务状态 --> | <!-- 任务状态 --> | ||||
| <div class="two wide column text center padding0" > | <div class="two wide column text center padding0" > | ||||
| @@ -252,6 +253,24 @@ function loadJobStatus() { | |||||
| }); | }); | ||||
| }); | }); | ||||
| }; | }; | ||||
| function getModelInfo(ID,version,JobName){ | |||||
| $.get("{{$.RepoLink}}/modelmanage/show_model_info_api?name="+ID,(data)=>{ | |||||
| if(data.length===0){ | |||||
| $(`#${JobName}`).popup('toggle') | |||||
| }else{ | |||||
| let versionData = data.filter((item)=>{ | |||||
| return item.Version === version | |||||
| }) | |||||
| if(versionData.length==0){ | |||||
| $(`#${JobName}`).popup('toggle') | |||||
| } | |||||
| else{ | |||||
| location.href = "{{$.RepoLink}}/modelmanage/show_model_info?name="+ID | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| function deleteVersion(version_name,jobID){ | function deleteVersion(version_name,jobID){ | ||||
| const url = '/api/v1/repos/{{$.RepoRelPath}}/modelarts/inference-job/'+jobID+'/del_version' | const url = '/api/v1/repos/{{$.RepoRelPath}}/modelarts/inference-job/'+jobID+'/del_version' | ||||
| $.post(url,{version_name:version_name},(data)=>{ | $.post(url,{version_name:version_name},(data)=>{ | ||||
| @@ -152,7 +152,7 @@ | |||||
| {{$isModelMangeEnabled := .Repository.UnitEnabled $.UnitTypeModelManage }} | {{$isModelMangeEnabled := .Repository.UnitEnabled $.UnitTypeModelManage }} | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| <label>{{.i18n.Tr "repo.model_manager"}}</label> | <label>{{.i18n.Tr "repo.model_manager"}}</label> | ||||
| <div class="ui checkbox {{if eq $.MODEL_COUNT 0}}disabled{{end}}"> | |||||
| <div class="ui checkbox {{if ne $.MODEL_COUNT 0}}disabled{{end}}"> | |||||
| <input class="enable-system" name="enable_model_manager" type="checkbox" {{if $isModelMangeEnabled}}checked{{end}}> | <input class="enable-system" name="enable_model_manager" type="checkbox" {{if $isModelMangeEnabled}}checked{{end}}> | ||||
| <label>{{.i18n.Tr "repo.settings.model_desc"}}</label> | <label>{{.i18n.Tr "repo.settings.model_desc"}}</label> | ||||
| </div> | </div> | ||||
| @@ -160,7 +160,7 @@ | |||||
| {{$isCloudBrainEnabled := .Repository.UnitEnabled $.UnitTypeCloudBrain }} | {{$isCloudBrainEnabled := .Repository.UnitEnabled $.UnitTypeCloudBrain }} | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| <label>{{.i18n.Tr "repo.cloudbrain"}}</label> | <label>{{.i18n.Tr "repo.cloudbrain"}}</label> | ||||
| <div class="ui checkbox"> | |||||
| <div class="ui checkbox {{if ne $.jobCount 0}}disabled{{end}}"> | |||||
| <input class="enable-system" name="enable_cloud_brain" type="checkbox" {{if $isCloudBrainEnabled}}checked{{end}}> | <input class="enable-system" name="enable_cloud_brain" type="checkbox" {{if $isCloudBrainEnabled}}checked{{end}}> | ||||
| <label>{{.i18n.Tr "repo.settings.cloudbrain_desc"}}</label> | <label>{{.i18n.Tr "repo.settings.cloudbrain_desc"}}</label> | ||||
| </div> | </div> | ||||