|
|
@@ -5093,8 +5093,9 @@ function initChartsNpu() { |
|
|
|
data: [] |
|
|
|
}, |
|
|
|
grid: { |
|
|
|
top: '30%', |
|
|
|
top: '35%', |
|
|
|
bottom: '2%', |
|
|
|
x: '2%', |
|
|
|
containLabel: true |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
@@ -5130,14 +5131,16 @@ function initChartsNpu() { |
|
|
|
|
|
|
|
series: [] |
|
|
|
}; |
|
|
|
const sortBy = (arr, k) => arr.concat().sort((a, b) => (a[k] > b[k] ? 1 : a[k] < b[k] ? -1 : 0)); |
|
|
|
$('.metric_chart').click(function (e) { |
|
|
|
let versionName = $(this).data('version') |
|
|
|
let myCharts = echarts.init(document.getElementById(`metric-${versionName}`)) |
|
|
|
$.get(`${window.config.AppSubUrl}/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/metric_statistics?version_name=${versionName}&statistic_type=each`, (res) => { |
|
|
|
$.get(`${window.config.AppSubUrl}/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/metric_statistics?version_name=${versionName}&statistic_type=each&metrics=`, (res) => { |
|
|
|
let filterDta = res.MetricsInfo.filter((item) => { |
|
|
|
|
|
|
|
return !(['recvBytesRate', 'diskWriteRate', 'sendBytesRate', 'diskReadRate'].includes(item.metric)) |
|
|
|
}) |
|
|
|
filterDta = sortBy(filterDta, "metric") |
|
|
|
let legenData = filterDta.map((item) => { |
|
|
|
return item.metric |
|
|
|
}) |
|
|
|