Browse Source

转换模型详情页面。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
7d93a384c8
2 changed files with 108 additions and 27 deletions
  1. +4
    -1
      routers/repo/ai_model_convert.go
  2. +104
    -26
      templates/repo/modelmanage/convertshowinfo.tmpl

+ 4
- 1
routers/repo/ai_model_convert.go View File

@@ -184,10 +184,13 @@ func StopModelConvert(ctx *context.Context) {

func ShowModelConvertInfo(ctx *context.Context) {
ctx.Data["ID"] = ctx.Query("ID")
ctx.Data["name"] = ctx.Query("name")
ctx.Data["isModelManage"] = true
ctx.Data["ModelManageAccess"] = ctx.Repo.CanWrite(models.UnitTypeModelManage)

task, err := models.QueryModelConvertById(ctx.Query("ID"))
if err == nil {
ctx.Data["task"] = task
}
ctx.HTML(200, tplModelConvertInfo)
}



+ 104
- 26
templates/repo/modelmanage/convertshowinfo.tmpl View File

@@ -187,6 +187,7 @@ td, th {
<div class="active section">{{.Name}}</div>
</div>
</h4>
{{with .task}}
<div class="ui accordion border-according" id="accordion" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.CloudBrainTaskId}}" data-version="1">
<input type="hidden" id="jobId_input" name="jobId_input" value="{{.CloudBrainTaskId}}">
<div class="active title padding0">
@@ -202,7 +203,7 @@ td, th {
<span id="status-span"><i id="icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
</span>
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
<span class="cti-mgRight-sm uc-accordionTitle-black" id="duration-span">{{$.TrainJobDuration}}</span>
<span class="cti-mgRight-sm uc-accordionTitle-black" id="duration-span">{{.TrainJobDuration}}</span>
</div>
</span>
@@ -246,7 +247,32 @@ td, th {
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
输入张量形状
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="status">
{{.InputShape}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
输入数据格式
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="status">
{{.InputDataFormat}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}}
@@ -265,11 +291,22 @@ td, th {
<td class="ti-text-form-content">
<div class="text-span text-span-w" id="duration">
{{$.TrainJobDuration}}
{{.TrainJobDuration}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
网络输出数据类型
</td>
<td class="ti-text-form-content">
<div class="text-span text-span-w" id="duration">
{{.NetOutputFormat}}
</div>
</td>
</tr>
</tbody>
@@ -279,21 +316,68 @@ td, th {
<table class="ti-form">
<tbody class="ti-text-form">
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
模型名称
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.ModelName}}
</div>
</td>
</tr>


<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
模型版本
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.ModelVersion}}
</div>
</td>
</tr>


<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
模型文件
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.ModelPath}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.start_file"}}
原模型框架
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.BootFile}}
{{.SrcEngine}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
转换后格式
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.DestFormat}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
@@ -306,6 +390,18 @@ td, th {
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.cloudbrain_creator"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="username">
{{.UserName}}
</div>
</td>
</tr>
</tbody>
</table>
</div>
@@ -314,7 +410,7 @@ td, th {
</div>
</div>
{{end}}
<div class="ui tab" data-tab="second">
<div>
<div class="ui message message" style="display: none;">
@@ -366,25 +462,7 @@ td, th {
{{end}} {{template "base/paginate" .}}
</div>
<!-- 确认模态框 -->
<div id="deletemodel">
<div class="ui basic modal">
<div class="ui icon header">
<i class="trash icon"></i> 删除任务
</div>
<div class="content">
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p>
</div>
<div class="actions">
<div class="ui red basic inverted cancel button">
<i class="remove icon"></i> 取消操作
</div>
<div class="ui green basic inverted ok button">
<i class="checkmark icon"></i> 确定操作
</div>
</div>
</div>
</div>
</div>


Loading…
Cancel
Save