Skip to content

Commit 3f1b944

Browse files
authored
fix(inference): resolve framework aliases in getHardwareKey so disagg ATOMesh data renders (#465)
1 parent e1e2219 commit 3f1b944

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

packages/app/src/lib/chart-utils.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,20 @@ describe('getHardwareKey', () => {
933933
it('handles hw with no dashes', () => {
934934
expect(getHardwareKey(entry({ hw: 'h100', framework: '' }))).toBe('h100');
935935
});
936+
937+
it('resolves aliased frameworks to canonical keys (atom-disagg → mooncake-atom)', () => {
938+
// Must match the canonical key buildAvailabilityHwKey builds for the GPU filter,
939+
// otherwise disagg ATOMesh points are filtered out of the chart.
940+
expect(getHardwareKey(entry({ hw: 'mi355x', framework: 'atom-disagg', disagg: true }))).toBe(
941+
'mi355x_mooncake-atom',
942+
);
943+
});
944+
945+
it('keeps the non-aliased atom framework distinct from atom-disagg', () => {
946+
expect(getHardwareKey(entry({ hw: 'mi355x', framework: 'atom', disagg: true }))).toBe(
947+
'mi355x_atom',
948+
);
949+
});
936950
});
937951

938952
// ===========================================================================

packages/app/src/lib/chart-utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,15 @@ export type YAxisMetric = (typeof Y_AXIS_METRICS)[number];
187187
export const getHardwareKey = (entry: AggDataEntry): string => {
188188
let normalizedHwName = entry.hw.split('-')[0];
189189
if (entry.framework) {
190+
// Resolve legacy/aliased framework names (e.g. atom-disagg → mooncake-atom) so chart
191+
// point keys match the canonical keys built by buildAvailabilityHwKey for the GPU filter.
192+
const fw = resolveFrameworkAlias(entry.framework);
190193
// Try framework as-is first, then disagg variant if it exists
191-
const candidateDirect = `${normalizedHwName}_${entry.framework}`;
194+
const candidateDirect = `${normalizedHwName}_${fw}`;
192195
if (isKnownGpu(candidateDirect)) {
193196
normalizedHwName = candidateDirect;
194197
} else if (entry.disagg) {
195-
const candidateDisagg = `${normalizedHwName}_${entry.framework}-disagg`;
198+
const candidateDisagg = `${normalizedHwName}_${fw}-disagg`;
196199
normalizedHwName = isKnownGpu(candidateDisagg) ? candidateDisagg : candidateDirect;
197200
} else {
198201
normalizedHwName = candidateDirect;

0 commit comments

Comments
 (0)