diff --git a/mindinsight/ui/src/locales/en-us.json b/mindinsight/ui/src/locales/en-us.json index 80c175d6bb87ce61a4fe7385048a95a216273e26..8b682c58cce25d79849925ea62b6f38c8ea8ec04 100644 --- a/mindinsight/ui/src/locales/en-us.json +++ b/mindinsight/ui/src/locales/en-us.json @@ -238,6 +238,8 @@ "profilingDashboard": "Profiling Dashboard", "showAverage": "Average value", "iterationGapTime": "Step interval", + "fpBpTime": "Forward and Backward Propagation", + "tailTime": "Step Tail", "time": "Time", "operatorTimeConAnalysis": "Operator Time Consumption Analysis", "avgCost": "Average total consumed time:", @@ -318,7 +320,7 @@ "pipelineTopTitle": "Average usage of queues between operators", "pipelineMiddleTitle": "Queue relationship between operators", "deviceQueueOp": "Data Transmission", - "deviceQueueOpTip": "Data Transmission Operator", + "deviceQueueOpTip": "Forward and Backward Propagation", "getNext": "Data Obtaining Operator", "connectorQuene": "Host Queues", "getData": "Data Obtaining", @@ -339,9 +341,9 @@ "fpbpTimeRatio": "Ratio of time consumed by forward and backward propagation:", "iterationGapTimeRatio": "Ratio of time consumed by step interval:", "iterativeTailingTimeRatio": "Ratio of time consumed by step tail:", - "dataProcess": "This shows the data processing. Data is stored in the host queue during data processing, and then stored in the data queue on a chip during data transmission. Finally, the data transmission operator get_next transmits the data to forward propagation.", + "dataProcess": "This shows the data processing. Data is stored in the host queue during data processing, and then stored in the data queue on a chip during data transmission. Finally, the forward and backward propagation get_next transmits the data to forward propagation.", "dataProcessInfo": "By determining the empty host and data queues, you can preliminarily determine the stage where the performance is abnormal.", - "analysisOne": "1. If the step interval is long and some batches of the data queue on a chip are empty, the performance is abnormal during data processing and transmission. Otherwise, locate the internal problem of the data transmission operator get_next.", + "analysisOne": "1. If the step interval is long and some batches of the data queue on a chip are empty, the performance is abnormal during data processing and transmission. Otherwise, locate the internal problem of the forward and backward propagation get_next.", "analysisTwo": "2. If the performance is abnormal during data processing and transmission, check the host queue. If the host queue is empty at a high probability, the exception may occur during data transmission.", "higherAnalysis": "Note: You can perform advanced analysis based on the time consumed by operators.", "chipInfo": "Ratio of empty data queues on a chip:", diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index a11ba2e915291128005d06dc3b192ad9d17a75dd..f5d73bed72d87dc76dbd1b5e742509632cc1f533 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -236,6 +236,8 @@ "profilingDashboard": "性能看板", "showAverage": "展示平均值", "iterationGapTime": "迭代间隙时间", + "fpBpTime": "前向+反向时间", + "tailTime": "迭代拖尾时间", "time": "时间", "operatorTimeConAnalysis": "算子耗时分析", "avgCost": "平均总耗时:", diff --git a/mindinsight/ui/src/router.js b/mindinsight/ui/src/router.js index aa302e1e5ce3b8a3c2f61851cd0e6ccbd14c6ca7..07092ba250417843e06243d303f916770a22dead 100644 --- a/mindinsight/ui/src/router.js +++ b/mindinsight/ui/src/router.js @@ -80,25 +80,24 @@ export default new Router({ }, { path: '/profiling', - component: () => import('./views/train-manage/profiling.vue'), + component: () => import('./views/profiling/profiling.vue'), redirect: '/profiling/profiling-dashboard', children: [ { path: 'profiling-dashboard', - component: () => - import('./views/train-manage/profiling-dashboard.vue'), + component: () => import('./views/profiling/profiling-dashboard.vue'), }, { path: 'step-trace', - component: () => import('./views/train-manage/step-trace.vue'), + component: () => import('./views/profiling/step-trace.vue'), }, { path: 'operator', - component: () => import('./views/train-manage/operator.vue'), + component: () => import('./views/profiling/operator.vue'), }, { path: 'data-process', - component: () => import('./views/train-manage/data-process.vue'), + component: () => import('./views/profiling/data-process.vue'), }, ], }, diff --git a/mindinsight/ui/src/views/train-manage/data-process.vue b/mindinsight/ui/src/views/profiling/data-process.vue similarity index 99% rename from mindinsight/ui/src/views/train-manage/data-process.vue rename to mindinsight/ui/src/views/profiling/data-process.vue index 223bb8c6607e6e295dec765556205637caad697b..8728450e7409c916c826245208a7823e2079d065 100644 --- a/mindinsight/ui/src/views/train-manage/data-process.vue +++ b/mindinsight/ui/src/views/profiling/data-process.vue @@ -902,7 +902,9 @@ export default { xAxis: { name: `${this.$t('profiling.sampleInterval')}/${ data.sample_interval - }ms`, + }ms` + .split(' ') + .join('\n'), data: dataY.map((val, index) => index + 1), }, yAxis: { diff --git a/mindinsight/ui/src/views/train-manage/operator.vue b/mindinsight/ui/src/views/profiling/operator.vue similarity index 95% rename from mindinsight/ui/src/views/train-manage/operator.vue rename to mindinsight/ui/src/views/profiling/operator.vue index 307d51f75160cd5c80a02c1029d943d8cf309855..e06dd7d0bcc1d326c40ca49c54452fac5c7bf3a1 100644 --- a/mindinsight/ui/src/views/train-manage/operator.vue +++ b/mindinsight/ui/src/views/profiling/operator.vue @@ -108,8 +108,13 @@ limitations under the License. :sortable="ele === 'op_info' ? false : 'custom'" :width="(ele==='avg_execution_time'|| ele==='subgraph' || ele==='op_name'|| ele==='op_type')?'220':''" - show-overflow-tooltip - :label="ele==='avg_execution_time'?`${ele} (${$t('profiling.unit')})`:ele"> + show-overflow-tooltip> + + sortable> + + + { + return params.data.name && + params.data.name.length > maxLabelLength + ? `${params.data.name.slice(0, maxLabelLength)}...` + : params.data.name; + }, }, itemStyle: { normal: { @@ -1111,6 +1138,11 @@ export default { background: #fff; padding: 0 16px; overflow: hidden; + .custom-label { + max-width: calc(100% - 25px); + padding: 0; + vertical-align: middle; + } .el-tabs { height: 100%; .el-tabs__header { diff --git a/mindinsight/ui/src/views/train-manage/profiling-dashboard.vue b/mindinsight/ui/src/views/profiling/profiling-dashboard.vue similarity index 98% rename from mindinsight/ui/src/views/train-manage/profiling-dashboard.vue rename to mindinsight/ui/src/views/profiling/profiling-dashboard.vue index 3912500a3bb5e5a5609782ad215b1652158fc8f6..21a0a6a3abbf00ddcb614dd681ef219468605478 100644 --- a/mindinsight/ui/src/views/train-manage/profiling-dashboard.vue +++ b/mindinsight/ui/src/views/profiling/profiling-dashboard.vue @@ -273,6 +273,7 @@ limitations under the License.

{{$t("public.dataLoading")}}

{{$t("public.noData")}}

+
{{$t('profiling.opTimes')}}{{timelineInfo.opTimes + $t('profiling.times')}}
-
@@ -369,6 +369,7 @@ limitations under the License.

{{$t("public.dataLoading")}}

{{$t("public.noData")}}

+ @@ -485,7 +486,12 @@ export default { this.timelineInfo.initOver = true; this.processSummary.initOver = true; } - if (newValue.query.dir && newValue.query.id && newValue.query.path && newValue.curCardNum) { + if ( + newValue.query.dir && + newValue.query.id && + newValue.query.path && + newValue.curCardNum + ) { this.summaryPath = newValue.query.dir; this.trainingJobId = newValue.query.id; this.relativePath = newValue.query.path; @@ -1114,13 +1120,17 @@ export default { this.timelineInfo.initOver = true; if (res && res.data) { this.timelineInfo.noData = false; - this.timelineInfo.totalTime = this.toFixedFun( - res.data.total_time, - 4, - ); - this.timelineInfo.streamNum = res.data.num_of_streams; - this.timelineInfo.opNum = res.data.num_of_ops; - this.timelineInfo.opTimes = res.data.op_exe_times; + + this.timelineInfo.totalTime = + this.toFixedFun(res.data.total_time, 4) || + (res.data.total_time === 0 ? 0 : '--'); + this.timelineInfo.streamNum = + res.data.num_of_streams || + (res.data.num_of_streams === 0 ? 0 : '--'); + this.timelineInfo.opNum = + res.data.num_of_ops || (res.data.num_of_ops === 0 ? 0 : '--'); + this.timelineInfo.opTimes = + res.data.op_exe_times || (res.data.op_exe_times === 0 ? 0 : '--'); } else { this.timelineInfo.noData = true; } diff --git a/mindinsight/ui/src/views/train-manage/profiling.vue b/mindinsight/ui/src/views/profiling/profiling.vue similarity index 97% rename from mindinsight/ui/src/views/train-manage/profiling.vue rename to mindinsight/ui/src/views/profiling/profiling.vue index d593bafdb1b8d2b1ee50984b4fc5f04d068ad906..5e4d8c3c3656e313a66ed280612f6538f7a6b7f2 100644 --- a/mindinsight/ui/src/views/train-manage/profiling.vue +++ b/mindinsight/ui/src/views/profiling/profiling.vue @@ -122,20 +122,19 @@ export default { }; RequestService.getProfilerDeviceData(params) .then((res) => { - if (res && res.data) { + if (res && res.data && res.data.length) { const deviceList = res.data; - if (deviceList.length) { - deviceList.forEach((item) => { - this.CardNumArr.push({ - value: item, - }); + deviceList.forEach((item) => { + this.CardNumArr.push({ + value: item, }); - this.curDashboardInfo.curCardNum = this.CardNumArr[0].value; - this.getDataOfProfileHelper(); - } + }); + this.curDashboardInfo.curCardNum = this.CardNumArr[0].value; + this.getDataOfProfileHelper(); } else { this.CardNumArr = []; this.curDashboardInfo.curCardNum = ''; + this.curDashboardInfo.initOver = true; } }) .catch(() => { diff --git a/mindinsight/ui/src/views/train-manage/step-trace.vue b/mindinsight/ui/src/views/profiling/step-trace.vue similarity index 98% rename from mindinsight/ui/src/views/train-manage/step-trace.vue rename to mindinsight/ui/src/views/profiling/step-trace.vue index f4d2624e3dde4d3e53b9d0bd7e16679bb5fa9017..f22c30c67cf6e518f8cfbaeb8eec3b3091b22af9 100644 --- a/mindinsight/ui/src/views/train-manage/step-trace.vue +++ b/mindinsight/ui/src/views/profiling/step-trace.vue @@ -30,7 +30,9 @@ limitations under the License. v-model.number="steps.step" :disabled="steps.disabled" @blur="resetStep" - @keyup.native.enter="changeStep"> + @keyup.native.enter="changeStep" + @clear="clearStep" + clearable> @@ -320,9 +322,18 @@ export default { */ resetStep() { setTimeout(() => { - this.steps.step = this.steps.trueStep; + if (!this.$refs.step.focused) { + this.steps.step = this.steps.trueStep; + } }, 200); }, + /** + * Clear the current step value + */ + clearStep() { + this.steps.step = null; + this.$refs.step.focus(); + }, /** * Get different types of time information * @param {String} id Dom id @@ -380,7 +391,8 @@ export default { type: 'value', name: '', nameTextStyle: { - padding: [0, 0, 0, 30], + padding: [0, 0, 0, -30], + align: 'left', }, }, grid: { @@ -411,15 +423,11 @@ export default { this.tabsArr[0].noData = this.steps.max ? false : true; this.tabsArr[0].initOver = true; } else if (type === 'fp_and_bp') { - option.yAxis.name = `${this.$t( - 'profiling.deviceQueueOpTip', - )}${this.$t('profiling.time')}(ms)`; + option.yAxis.name = `${this.$t('profiling.fpBpTime')}(ms)`; this.tabsArr[1].noData = this.steps.max ? false : true; this.tabsArr[1].initOver = true; } else if (type === 'tail') { - option.yAxis.name = `${this.$t( - 'profiling.lterationTail', - )}${this.$t('profiling.time')}(ms)`; + option.yAxis.name = `${this.$t('profiling.tailTime')}(ms)`; this.tabsArr[2].noData = this.steps.max ? false : true; this.tabsArr[2].initOver = true; } @@ -986,6 +994,7 @@ export default { .chart { height: calc(100% - 85px); min-height: 180px; + min-width: 250px; overflow: hidden; } .title {