Browse Source

UI support tensor detection view

tags/v1.1.0
WeiFeng-mindinsight 5 years ago
parent
commit
3bf3e0755d
4 changed files with 23 additions and 10 deletions
  1. +17
    -5
      mindinsight/ui/src/components/debugger-tensor.vue
  2. +2
    -2
      mindinsight/ui/src/locales/en-us.json
  3. +2
    -2
      mindinsight/ui/src/locales/zh-cn.json
  4. +2
    -1
      mindinsight/ui/src/mixins/debugger-mixin.vue

+ 17
- 5
mindinsight/ui/src/components/debugger-tensor.vue View File

@@ -224,7 +224,7 @@ limitations under the License.
<span>{{ $t('debugger.watchPoint') }}{{item.id}}</span>
<span>{{ $t('symbols.colon') }}</span>
<span>
{{ getWatchPointContent(item) }}
{{ getFormateWatchPoint(item) }}
</span>
</div>
</div>
@@ -372,7 +372,7 @@ export default {
if (!element.actual_value) {
element.actual = this.$t('symbols.rightbracket');
} else {
element.actual = `${this.$t('debugger.actualValue')}${this.$t('symbols.colon')}${
element.actual = `, ${this.$t('debugger.actualValue')}${this.$t('symbols.colon')}${
element.actual_value
}${this.$t('symbols.rightbracket')}`;
}
@@ -392,15 +392,27 @@ export default {
const name = this.$parent.transCondition(watchName);
return name;
},
getWatchPointContent(item) {
getFormateWatchPoint(item) {
let param = '';
if (item.params.length) {
item.params.forEach((i, ind) => {
const name = this.$parent.transCondition(i.name);
if (!ind) {
param += `${name}`;
param += !i.actual_value
? `${name}${this.$t('symbols.leftbracket')}${this.$t('debugger.setValue')}:${i.value}${this.$t(
'symbols.rightbracket',
)}`
: `${name}${this.$t('symbols.leftbracket')}${this.$t('debugger.setValue')}:${i.value}, ${this.$t(
'debugger.actualValue',
)}:${i.actual_value}${this.$t('symbols.rightbracket')}`;
} else {
param += `, ${name}`;
param += !i.actual_value
? `, ${name}${this.$t('symbols.leftbracket')}${this.$t('debugger.setValue')}:${i.value}${this.$t(
'symbols.rightbracket',
)}`
: `, ${name}${this.$t('symbols.leftbracket')}${this.$t('debugger.setValue')}:${i.value}, ${this.$t(
'debugger.actualValue',
)}:${i.actual_value}${this.$t('symbols.rightbracket')}`;
}
});
param = `(${param})`;


+ 2
- 2
mindinsight/ui/src/locales/en-us.json View File

@@ -579,8 +579,8 @@
"range_percentage_lt": "Percentage of the value in the range <",
"range_percentage_gt": "Percentage of the value in the range >",
"rtol": "Relative tolerance",
"abs_updata_ratio_mean_gt": "Average of the absolute value of the change ratio >",
"abs_updata_ratio_mean_lt": "Average of the absolute value of the change ratio <",
"abs_update_ratio_mean_gt": "Average of the absolute value of the change ratio >",
"abs_update_ratio_mean_lt": "Average of the absolute value of the change ratio <",
"param": "Threshold",
"max_min_lt": "MAX-MIN <",
"max_min_gt": "MAX-MIN >",


+ 2
- 2
mindinsight/ui/src/locales/zh-cn.json View File

@@ -578,8 +578,8 @@
"range_percentage_lt": "在范围中的值所占百分比<",
"range_percentage_gt": "在范围中的值所占百分比>",
"rtol": "相对容忍度",
"abs_updata_ratio_mean_gt": "变化比例绝对值的平均值>",
"abs_updata_ratio_mean_lt": "变化比例绝对值的平均值<",
"abs_update_ratio_mean_gt": "变化比例绝对值的平均值>",
"abs_update_ratio_mean_lt": "变化比例绝对值的平均值<",
"param": "阈值",
"max_min_lt": "MAX-MIN<",
"max_min_gt": "MAX-MIN>"


+ 2
- 1
mindinsight/ui/src/mixins/debugger-mixin.vue View File

@@ -466,7 +466,7 @@ export default {
}
if (res.data.watch_point_hits && res.data.watch_point_hits.length > 0) {
this.radio1 = 'hit';
this.dealWatchpointHits(res.data.watch_point_hits);
this.getWatchpointHits();
}
this.pollData();
}
@@ -545,6 +545,7 @@ export default {
* Add watchpoint
*/
addWatchPoint() {
this.createWatchPointArr = [];
this.createWatchPointArr.push({
collection: {
selectedId: this.conditionCollections[0].id,


Loading…
Cancel
Save