From f876a126a4f11c23a51e6211bfa55c95a125b6d4 Mon Sep 17 00:00:00 2001 From: Oseltamivir <58582368+Oseltamivir@users.noreply.github.com> Date: Thu, 23 Jul 2026 18:37:43 +0800 Subject: [PATCH] fix(etl): map AMD Kimi-K2.7-Code identifiers to kimik2.7-code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AMD AgentX sweeps label the model with the bare prefix `kimik2.7` (no `-code`) and the MXFP4 model path `amd/Kimi-K2.7-Code-MXFP4`. Neither was in PREFIX_ALIASES or MODEL_TO_KEY, so resolveModelKey returned null and mapBenchmarkRow / the eval mapper skipped every row as `unmappedModel`. Effect: the unofficial-run overlay for such runs (e.g. GitHub Actions run 29975243963) fetched artifacts fine but produced 0 benchmarks and 0 evaluations, rendering nothing — and official ingest would drop the rows for the same reason. Add the bare prefix alias (which also covers precision-suffixed forms like `kimik2.7-fp4` via PRECISION_SUFFIX stripping) and the AMD MXFP4 model path, both folding into the canonical `kimik2.7-code` DB bucket. Consistent with existing `amd/…-MXFP4` entries (GLM-5.1, Llama-3.3-70B). 中文:AMD AgentX 基准测试(benchmark)的产物(artifact)用裸前缀 `kimik2.7` (不带 `-code`)和 MXFP4 模型路径 `amd/Kimi-K2.7-Code-MXFP4` 标注模型,二者都 不在 PREFIX_ALIASES / MODEL_TO_KEY 中,导致 resolveModelKey 返回 null,所有 行被当作未映射模型(unmappedModel)跳过。结果:此类运行的非官方运行(unofficial run)叠加层能正常拉取产物却解析出 0 条基准与 0 条评估(evaluation),页面空白; 官方摄取(ingest)也会因同样原因丢弃这些行。本次新增裸前缀别名(经 PRECISION_SUFFIX 去后缀后也覆盖 `kimik2.7-fp4` 等形式)与 AMD MXFP4 模型路径,统一归入规范的 `kimik2.7-code` 数据桶,与既有的 `amd/…-MXFP4` 条目(GLM-5.1、Llama-3.3-70B)保持一致。 --- packages/db/src/etl/normalizers.test.ts | 15 +++++++++++++++ packages/db/src/etl/normalizers.ts | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/packages/db/src/etl/normalizers.test.ts b/packages/db/src/etl/normalizers.test.ts index a24ee6db..25022f8b 100644 --- a/packages/db/src/etl/normalizers.test.ts +++ b/packages/db/src/etl/normalizers.test.ts @@ -135,6 +135,21 @@ describe('resolveModelKey', () => { expect(resolveModelKey({ infmax_model_prefix: 'dsv4pro-fp8' })).toBe('dsv4'); }); + it('resolves AMD Kimi-K2.7-Code identifiers to the canonical kimik2.7-code key', () => { + // AMD AgentX sweeps emit the bare prefix `kimik2.7` (no `-code`) and the + // MXFP4 model path `amd/Kimi-K2.7-Code-MXFP4`; both must fold into the + // canonical `kimik2.7-code` DB bucket. Regression for GitHub Actions run + // 29975243963, whose overlay rendered nothing because every row was skipped + // as an unmapped model. + expect(resolveModelKey({ infmax_model_prefix: 'kimik2.7' })).toBe('kimik2.7-code'); + expect(resolveModelKey({ infmax_model_prefix: 'kimik2.7-fp4' })).toBe('kimik2.7-code'); + expect(resolveModelKey({ model_prefix: 'kimik2.7' })).toBe('kimik2.7-code'); + expect(resolveModelKey({ model: 'amd/Kimi-K2.7-Code-MXFP4' })).toBe('kimik2.7-code'); + // Canonical identifiers still resolve to the same bucket. + expect(resolveModelKey({ infmax_model_prefix: 'kimik2.7-code' })).toBe('kimik2.7-code'); + expect(resolveModelKey({ model: 'moonshotai/Kimi-K2.7-Code' })).toBe('kimik2.7-code'); + }); + it('falls back to MODEL_TO_KEY when prefix not present', () => { expect(resolveModelKey({ model: 'deepseek-ai/DeepSeek-R1' })).toBe('dsr1'); expect(resolveModelKey({ model: 'nvidia/Llama-3.3-70B-Instruct-FP8' })).toBe('llama70b'); diff --git a/packages/db/src/etl/normalizers.ts b/packages/db/src/etl/normalizers.ts index 275cd6ea..355629d9 100644 --- a/packages/db/src/etl/normalizers.ts +++ b/packages/db/src/etl/normalizers.ts @@ -45,6 +45,10 @@ const PRECISION_SUFFIX = /-(?:fp4|fp8|mxfp4|nvfp4)(?:-.*)?$/iu; const PREFIX_ALIASES: Record = { gptoss: 'gptoss120b', dsv4pro: 'dsv4', + // AMD AgentX sweeps emit the bare prefix `kimik2.7` instead of the canonical + // `kimik2.7-code` DB key; alias it so those rows resolve (and precision-suffixed + // forms like `kimik2.7-fp4` fold in via PRECISION_SUFFIX stripping too). + 'kimik2.7': 'kimik2.7-code', }; function resolvePrefixToKey(prefix: string): string | null { @@ -94,6 +98,7 @@ export const MODEL_TO_KEY: Record = { 'moonshotai/Kimi-K2.5': 'kimik2.5', 'moonshotai/Kimi-K2.6': 'kimik2.6', 'moonshotai/Kimi-K2.7-Code': 'kimik2.7-code', + 'amd/Kimi-K2.7-Code-MXFP4': 'kimik2.7-code', // MiniMax-M2.5 'MiniMaxAI/MiniMax-M2.5': 'minimaxm2.5', // MiniMax-M3 (428B, distinct architecture from the M2 series)