add fallback for acc metrics only on node level

This commit is contained in:
Christoph Kluge
2023-08-04 10:54:18 +02:00
parent 8a473de793
commit 298051c334
2 changed files with 16 additions and 5 deletions

View File

@@ -34,6 +34,7 @@
export let roles;
const accMetrics = ['acc_utilization', 'acc_mem_used', 'acc_power', 'nv_mem_util', 'nv_sm_clock', 'nv_temp'];
let accNodeOnly
const { query: initq } = init(`
job(id: "${dbid}") {
@@ -78,7 +79,7 @@
]);
// Select default Scopes to load: Check before if accelerator metrics are not on accelerator scope by default
const accNodeOnly = [...toFetch].some(function(m) {
accNodeOnly = [...toFetch].some(function(m) {
if (accMetrics.includes(m)) {
const mc = metrics(job.cluster, m)
return mc.scope !== 'accelerator'
@@ -398,6 +399,7 @@
job={$initq.data.job}
jobMetrics={$jobMetrics.data.jobMetrics}
accMetrics={accMetrics}
accNodeOnly={accNodeOnly}
/>
{/key}
{/if}