This commit is contained in:
2026-09-09 11:36:36 +08:00
parent e519e1d71d
commit 8c2c9ad77d
9 changed files with 118 additions and 23 deletions
+7
View File
@@ -537,6 +537,12 @@ function trainPercent(t) {
return Math.min(100, Math.round((t.currentEpoch / t.totalEpochs) * 100))
}
// 预计剩余时长文案:≥90 分钟按小时展示(服务端按已用均值×剩余轮数估算,随轮数增加趋准)
function etaText(mins) {
if (mins >= 90) return `${(mins / 60).toFixed(1)} 小时`
return `${mins} 分钟`
}
// 发布模型版本(按训练任务档位:s/n 各自的生效版本互不影响,版本号数据集内共用自增)
function publishTrain(row, t) {
const v = variantMeta[t.variant]
@@ -657,6 +663,7 @@ onBeforeUnmount(() => {
<template v-if="t.status === 'running'">
<el-progress :percentage="trainPercent(t)" :stroke-width="6" :show-text="false" class="ds-train-bar" />
<span class="ds-train-text">{{ t.currentEpoch || 0 }}/{{ t.totalEpochs || '-' }} </span>
<span v-if="t.etaMinutes" class="ds-train-text">· 剩余约 {{ etaText(t.etaMinutes) }}</span>
</template>
<el-tooltip v-else-if="t.status === 'failed' && t.error" :content="t.error" placement="top">
<el-tag :type="trainStatusTag[t.status] || 'info'" size="small">{{ trainStatusMap[t.status] }}</el-tag>