Browse Source

Merge pull request 'fix-1095' (#1192) from fix-1095 into V20211228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1192
Reviewed-by: wangjr <wangjr@pcl.ac.cn>
tags/v1.21.12.2^2
wangjr 3 years ago
parent
commit
152ec239b8
3 changed files with 28 additions and 23 deletions
  1. +2
    -0
      options/locale/locale_en-US.ini
  2. +2
    -0
      options/locale/locale_zh-CN.ini
  3. +24
    -23
      templates/repo/modelmanage/showinfo.tmpl

+ 2
- 0
options/locale/locale_en-US.ini View File

@@ -903,6 +903,8 @@ model.manage.F1 = F1
model.manage.Precision = Precision model.manage.Precision = Precision
model.manage.Recall = Recall model.manage.Recall = Recall
model.manage.sava_model = Sava Model model.manage.sava_model = Sava Model
model.manage.model_manage = ModelManage
model.manage.model_accuracy = Model Accuracy


template.items = Template Items template.items = Template Items
template.git_content = Git Content (Default Branch) template.git_content = Git Content (Default Branch)


+ 2
- 0
options/locale/locale_zh-CN.ini View File

@@ -913,6 +913,8 @@ model.manage.F1 = F1值
model.manage.Precision = 精确率 model.manage.Precision = 精确率
model.manage.Recall = 召回率 model.manage.Recall = 召回率
model.manage.sava_model = 保存模型 model.manage.sava_model = 保存模型
model.manage.model_manage = 模型管理
model.manage.model_accuracy = 模型精度


template.items=模板选项 template.items=模板选项
template.git_content=Git数据(默认分支) template.git_content=Git数据(默认分支)


+ 24
- 23
templates/repo/modelmanage/showinfo.tmpl View File

@@ -69,7 +69,7 @@
<!-- <a href="javascript:window.history.back();"><i class="arrow left icon"></i>返回</a> --> <!-- <a href="javascript:window.history.back();"><i class="arrow left icon"></i>返回</a> -->
<div class="ui breadcrumb"> <div class="ui breadcrumb">
<a class="section" href="{{$.RepoLink}}/modelmanage/show_model"> <a class="section" href="{{$.RepoLink}}/modelmanage/show_model">
模型管理
{{$.i18n.Tr "repo.model.manage.model_manage"}}
</a> </a>
<div class="divider"> / </div> <div class="divider"> / </div>
<div class="active section">{{.name}}</div> <div class="active section">{{.name}}</div>
@@ -83,15 +83,15 @@
<table class="tableStyle" style="margin-top:20px;"> <table class="tableStyle" style="margin-top:20px;">
<tbody> <tbody>
<tr> <tr>
<td class="ti-text-form-label text-width80">模型名称</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.model_name"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="ModelName" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="ModelName" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">版本</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.version"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="Version" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="Version" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">标签</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.migrate_items_labels"}}</td>
<td class="ti-text-form-content"> <td class="ti-text-form-content">
<div id="Label" style="overflow: hidden;width: 95%;"> <div id="Label" style="overflow: hidden;width: 95%;">
@@ -101,15 +101,15 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">大小</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.model_size"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="Size" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="Size" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">创建时间</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.createtime"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="CreateTime" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="CreateTime" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">模型描述</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.description"}}</td>
<td class="ti-text-form-content" > <td class="ti-text-form-content" >
<div id="edit-td" style="display:flex"> <div id="edit-td" style="display:flex">
<span id="Description" title="" class="iword-elipsis"></span> <span id="Description" title="" class="iword-elipsis"></span>
@@ -118,38 +118,42 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">代码版本</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.code_version"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="CodeBranch" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="CodeBranch" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">启动文件</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.train_job.start_file"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="BootFile" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="BootFile" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">训练数据集</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.train_job.train_dataset"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="DatasetName" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="DatasetName" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">运行参数</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="Parameters" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="Parameters" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">规格</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="EngineName" title=""></span></td>
</tr>
<tr>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.train_job.standard"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="FlavorName" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="FlavorName" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">计算节点</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="WorkServerNumber" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="WorkServerNumber" title=""></span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="half-table"> <div class="half-table">
<span class="model_header_text">模型精度</span>
<span class="model_header_text">{{$.i18n.Tr "repo.model.manage.model_accuracy"}}</span>
<table class="tableStyle" style="margin-top:20px;"> <table class="tableStyle" style="margin-top:20px;">
<tbody> <tbody>
<tr> <tr>
<td class="ti-text-form-label text-width80">准确率</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.Accuracy"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="Accuracy" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="Accuracy" title=""></span></td>
</tr> </tr>
<tr> <tr>
@@ -157,11 +161,11 @@
<td class="ti-text-form-content word-elipsis"><span id="F1" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="F1" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">精确率</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.Precision"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="Precision" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="Precision" title=""></span></td>
</tr> </tr>
<tr> <tr>
<td class="ti-text-form-label text-width80">召回率</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.Recall"}}</td>
<td class="ti-text-form-content word-elipsis"><span id="Recall" title=""></span></td> <td class="ti-text-form-content word-elipsis"><span id="Recall" title=""></span></td>
</tr> </tr>
</tbody> </tbody>
@@ -209,11 +213,9 @@ function transObj(data){
let modelAcc = JSON.parse(Accuracy) let modelAcc = JSON.parse(Accuracy)
TrainTaskInfo = JSON.parse(TrainTaskInfo) TrainTaskInfo = JSON.parse(TrainTaskInfo)
// Parameters = JSON.parse(Parameters) // Parameters = JSON.parse(Parameters)
console.log("TrainTaskInfo",TrainTaskInfo)
let {Parameters} = TrainTaskInfo
let {Parameters,EngineName} = TrainTaskInfo
Parameters = JSON.parse(Parameters) Parameters = JSON.parse(Parameters)
Parameters = Parameters.parameter.length === 0 ? '--':Parameters.parameter Parameters = Parameters.parameter.length === 0 ? '--':Parameters.parameter
console.log(Parameters)
let size = tranSize(Size) let size = tranSize(Size)
let time = transTime(CreatedUnix) let time = transTime(CreatedUnix)
let initObj = { let initObj = {
@@ -230,7 +232,8 @@ function transObj(data){
Parameters:TrainTaskInfo.Parameters || '--', Parameters:TrainTaskInfo.Parameters || '--',
FlavorName:TrainTaskInfo.FlavorName || '--', FlavorName:TrainTaskInfo.FlavorName || '--',
WorkServerNumber:TrainTaskInfo.WorkServerNumber || '--', WorkServerNumber:TrainTaskInfo.WorkServerNumber || '--',
Parameters:Parameters
Parameters:Parameters,
EngineName:EngineName,
} }
let initModelAcc = { let initModelAcc = {
Accuracy: modelAcc.Accuracy || '--', Accuracy: modelAcc.Accuracy || '--',
@@ -319,7 +322,6 @@ function renderInfo(obj,accObj,id){


} }
else if(key==="Parameters"){ else if(key==="Parameters"){
console.log("obj[key",obj[key])
if(obj[key]==='--'){ if(obj[key]==='--'){
$(`#${key}`).text(obj[key]) $(`#${key}`).text(obj[key])
}else{ }else{
@@ -328,7 +330,6 @@ function renderInfo(obj,accObj,id){
return labelValue return labelValue
}); });
const parameter = parameterArray.join('; ') const parameter = parameterArray.join('; ')
console.log(parameter)
$(`#${key}`).text(parameter) $(`#${key}`).text(parameter)
$(`#${key}`).attr("title",parameter) $(`#${key}`).attr("title",parameter)
} }


Loading…
Cancel
Save