Skip to content

Commit

Permalink
fix applying memory overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Oct 26, 2021
1 parent 83ffa38 commit 0cf38fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('Model service', () => {
model_size: 100139008,
},
],
total: 793309535,
total: 761852255,
},
},
roles: ['data', 'ingest', 'master', 'ml', 'transform'],
Expand Down Expand Up @@ -367,7 +367,7 @@ describe('Model service', () => {
model_size: 100139008,
},
],
total: 793309535,
total: 761852255,
},
},
roles: ['data', 'master', 'ml', 'transform'],
Expand Down Expand Up @@ -490,7 +490,7 @@ describe('Model service', () => {
model_size: 100139008,
},
],
total: 793309535,
total: 761852255,
},
},
name: 'node1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export function modelsProvider(
};
});

const trainedModelsTotalMemory = sumBy(modelsMemoryUsage, 'model_size');

const memoryRes = {
adTotalMemory: sumBy(
adMemoryReport.filter((ad) => ad.node_id === nodeId),
Expand All @@ -123,7 +125,6 @@ export function modelsProvider(
dfaMemoryReport.filter((dfa) => dfa.node_id === nodeId),
'model_size'
),
trainedModelsTotalMemory: sumBy(modelsMemoryUsage, 'model_size'),
};

for (const key of Object.keys(memoryRes)) {
Expand Down Expand Up @@ -155,7 +156,7 @@ export function modelsProvider(
total: memoryRes.dfaTotalMemory,
},
trained_models: {
total: memoryRes.trainedModelsTotalMemory,
total: trainedModelsTotalMemory,
by_model: modelsMemoryUsage,
},
},
Expand Down

0 comments on commit 0cf38fb

Please sign in to comment.