Download scripts/glm53flash.py from nvidia/aisimulate-fpm-dataset: direct link, hf CLI and curl.
- Browser
- Download file 40.8 kB
-
https://huggingface.co/datasets/nvidia/aisimulate-fpm-dataset/resolve/main/scripts/glm53flash.py
- Command line
-
hf download hf://datasets/nvidia/aisimulate-fpm-dataset/scripts/glm53flash.py
-
curl -L -o glm53flash.py https://huggingface.co/datasets/nvidia/aisimulate-fpm-dataset/resolve/main/scripts/glm53flash.py
40.8 kB
| """Public GLM-5.3-Flash schema-7 import policy; source bytes are immutable. | |
| This policy first admitted the nine GB300 AISimulate PR #324 calibration tables collected with | |
| engine-native forward-pass metrics (FPM) on the default serving configuration with | |
| prefix caching on: | |
| * SGLang 0.5.20 (campaign ``glm53flash-pr324-native-fpm``): FP8 and NVFP4 at pure TP2 | |
| and TP4. ``latency_ms`` is the median of ten repetitions of the native rank-0 | |
| ``ForwardPassMetrics`` ``wall_time`` (DeviceTimer forward interval). | |
| * Stock vLLM 0.31.0 (campaign ``glm53flash-vllm-v031-native-fpm``): FP8 at pure TP2 and | |
| TP4, NVFP4 at pure TP1, TP2 and TP4 (FP8 does not fit on one GPU). ``latency_ms`` is the | |
| median of ten repetitions of the Dynamo ``InstrumentedScheduler`` FPM ``wall_time``; | |
| prefill inputs are on the 4-token IndexPool grid (align-4). | |
| The multi-GPU campaigns (``glm53flash-multigpu-vllm-v031-native-fpm`` and | |
| ``glm53flash-multigpu-sglang-v0520-native-fpm``) use the same producers, measurement | |
| policies and row labels on GB200, B300, H200 and H100 (TP1 to TP8), from their own source | |
| revision. Their request tokens are seeded ids (seed 53) for both backends; the sidecar keeps | |
| the producer's ``input_source`` verbatim. The GB300 SGLang tables keep their text-corpus | |
| inputs, so SGLang tables of the two campaigns are not corpus-comparable. KV-cache dtype is | |
| part of the identity: FP8 on Blackwell, BF16 on Hopper (stock vLLM 0.31.0 and SGLang 0.5.20 | |
| do not serve FP8 sparse-MLA KV on SM90). NVFP4 on Hopper is a design exclusion. The vLLM and | |
| SGLang images are pinned per CPU architecture. | |
| An additional B300 SXM FP8 TP4 table remains development-only. It combines the | |
| original native calibration with a disjoint align-4 refinement; both source jobs | |
| and native evidence hashes are required. Historical failed validation is retained. | |
| Normalized manifests and catalog records carry no campaign labels or scheduler IDs | |
| (configuration manifest v4, measurement manifest v5, catalog v6). A table is identified by | |
| its SHA256 in REVIEWED_SOURCES; its campaign and collection jobs are checked against | |
| the per-leaf source evidence (fpm/provenance/provenance.json and the byte-identical | |
| source sidecar). Calibration-only bundles keep files: [] and collection_runs: []. | |
| Calibration rows are byte copies of the evaluated consumer inputs. Holdout observations | |
| are not calibration rows and are never published as measurement truth. Every row label | |
| describes ``latency_ms`` exactly. | |
| Withdrawn and superseded tables are listed in ``WITHDRAWN_SOURCES`` and are never | |
| admitted: the earlier custom-timer campaigns (``glm53flash-pr324`` and | |
| ``glm53flash-pr324-prefill-graph``), the native-FPM vLLM ``0.30.0+glm53tail`` tables, | |
| and the superseded vLLM 0.31.0 NVFP4 TP4 table built from calibration-decode job 904065. | |
| """ | |
| from __future__ import annotations | |
| import hashlib | |
| import json | |
| import math | |
| import re | |
| from collections import Counter | |
| from pathlib import Path | |
| import pyarrow.parquet as pq | |
| CAMPAIGN = "glm53flash-pr324-native-fpm" | |
| VLLM_CAMPAIGN = "glm53flash-vllm-v031-native-fpm" | |
| MULTIGPU_SGLANG_CAMPAIGN = "glm53flash-multigpu-sglang-v0520-native-fpm" | |
| MULTIGPU_VLLM_CAMPAIGN = "glm53flash-multigpu-vllm-v031-native-fpm" | |
| CAMPAIGN_BACKENDS = { | |
| CAMPAIGN: "sglang", | |
| VLLM_CAMPAIGN: "vllm", | |
| MULTIGPU_SGLANG_CAMPAIGN: "sglang", | |
| MULTIGPU_VLLM_CAMPAIGN: "vllm", | |
| } | |
| CAMPAIGNS = set(CAMPAIGN_BACKENDS) | |
| # GB300 campaign of each backend; reviewed sources without a ``campaign`` key belong to it. | |
| BACKEND_CAMPAIGNS = {"sglang": CAMPAIGN, "vllm": VLLM_CAMPAIGN} | |
| MULTIGPU_CAMPAIGNS = {MULTIGPU_SGLANG_CAMPAIGN, MULTIGPU_VLLM_CAMPAIGN} | |
| # Normalized manifest and catalog fields that must never carry campaign labels or scheduler IDs. | |
| UNNORMALIZED_FIELDS = ("source_campaign_id", "source_campaign_path", "producer_job_id") | |
| POLICY = "aisimulate-glm53flash-native-fpm-byte-preserving-v1" | |
| SOURCE_REVISION = "055dcc1c4a0641cf488dbe4306f5b559f7cafec7" | |
| # AISimulate revision of the multi-GPU producers (TP8, BF16 KV on Hopper, SGLang page-size check). | |
| MULTIGPU_SOURCE_REVISION = "1a73bcfe75b3430a19fa6718a51ef33b9976b7fd" | |
| SOURCE_REVISIONS = { | |
| CAMPAIGN: SOURCE_REVISION, | |
| VLLM_CAMPAIGN: SOURCE_REVISION, | |
| MULTIGPU_SGLANG_CAMPAIGN: MULTIGPU_SOURCE_REVISION, | |
| MULTIGPU_VLLM_CAMPAIGN: MULTIGPU_SOURCE_REVISION, | |
| } | |
| CAMPAIGN_SOURCE_REVISIONS = SOURCE_REVISIONS # name used by other import changes | |
| B300_CAMPAIGN = 'glm53flash-b300-vllm-v031-native-fpm-20261019' | |
| CAMPAIGN_BACKENDS[B300_CAMPAIGN] = "vllm" | |
| CAMPAIGNS.add(B300_CAMPAIGN) | |
| CAMPAIGN_SOURCE_REVISIONS[B300_CAMPAIGN] = '8d021d5a41f6f47fd3d4c8064be6361b7c8b3c85' | |
| SOURCE_REPOSITORY = "https://github.com/ai-dynamo/aisimulate" | |
| MODEL_REVISIONS = { | |
| "zai-org/GLM-5.3-Flash": "eb9eb208eb0d988989d07a6a12d0fdeb5f52574a", | |
| "nvidia/GLM-5.3-Flash-NVFP4": "09b04e5e74bca08ca8549fc736d4cdd8624bfde3", | |
| } | |
| BACKEND_VERSIONS = {"sglang": "0.5.20", "vllm": "0.31.0"} | |
| MEASUREMENT_POLICIES = { | |
| "sglang": "sglang_native_fpm_radix_seed_median_v1", | |
| "vllm": "vllm_native_fpm_prefix_seed_median_v1", | |
| } | |
| TIMING_BOUNDARIES = { | |
| "sglang": "sglang_native_fpm_rank0_device_timer_wall_time", | |
| "vllm": "dynamo_vllm_instrumented_scheduler_fpm_wall_time", | |
| } | |
| STATE_PROTOCOLS = { | |
| "sglang": "glm53flash_sglang_radix_real_seed_v1", | |
| "vllm": "glm53flash_prefix_cache_real_seed_v1", | |
| } | |
| # system -> (gpu_family, CPU architecture of the image, KV-cache dtype identity). | |
| SYSTEMS = { | |
| "gb300": ("GB300", "arm64", "fp8"), | |
| "gb200": ("GB200", "arm64", "fp8"), | |
| "b300_sxm": ("B300_SXM", "amd64", "fp8"), | |
| "h200_sxm": ("H200", "amd64", "bfloat16"), | |
| "h100_sxm": ("H100", "amd64", "bfloat16"), | |
| } | |
| HOPPER_SYSTEMS = {"h200_sxm", "h100_sxm"} | |
| TP_SIZES = (1, 2, 4, 8) | |
| # Registry child digest per CPU architecture (multi-arch indexes: vLLM c1c9f6fd, SGLang 06e4f2ed). | |
| VLLM_IMAGES = { | |
| "arm64": "vllm/vllm-openai@sha256:3f7dd5b777d34d1724456ce71f87385dca288c3bb23029ab27dee358f5d2b971", | |
| "amd64": "vllm/vllm-openai@sha256:a4a4c0437bf7240089da5f08aa370c4aee17ae5290f7a3b468825ee26c4c3a6b", | |
| } | |
| SGLANG_IMAGES = { | |
| "arm64": "lmsysorg/sglang@sha256:b0d8718a4424bb22e448e04407ab3ce5f7399a4c5fc702d6fbe36c3772ec8862", | |
| "amd64": "lmsysorg/sglang@sha256:b27fce60bc5494c118c4910702812bcfa8cee67abcdd1ff8b0902f21647552f4", | |
| } | |
| # Multi-GPU campaigns: producer input_source (kept verbatim in the sidecar) must name the seeded generator. | |
| SEEDED_INPUT_SOURCE = "seeded_tokens: collector/glm53flash_attention_tokens.py sha256_counter_rejection v1 seed 53" | |
| # Multi-GPU provenance lists every point not collected: infeasible_kv_capacity (KV beyond the measured capacity) and | |
| # infeasible_memory (the KV fits, but the point hits a transient OOM, e.g. in the indexer, on every retry at the | |
| # deployment's single qualified memory setting; there are no per-point overrides, and the evidence records the | |
| # setting used, transient vs free memory and, when known, the setting range that would have fit), next to excluded | |
| # calibration and holdout points. Lists may be empty, never absent. | |
| # Recorded design exclusions of the multi-GPU campaigns (not failures; no table exists for them). | |
| DESIGN_EXCLUSIONS = { | |
| "nvfp4_on_hopper": "NVFP4 checkpoints are served on Blackwell only", | |
| "fp8_kv_on_hopper": ( | |
| "Hopper uses BF16 KV for both backends: stock vLLM 0.31.0 FLASHINFER_MLA_SPARSE_SM90 passes uint8 KV storage " | |
| "to the FlashInfer 0.7.0.post1 fa3 MLA plan(), which rejects it; SGLang 0.5.20 does not support FP8 KV on SM90" | |
| ), | |
| "fp8_tp1": "FP8 weights (about 299 GiB) do not fit on one GPU", | |
| "gb200_tp8": "TP8 on GB200 spans two 4-GPU nodes (cross-node, out of scope)", | |
| } | |
| SGLANG_ALLOCATOR_MAX_SPLIT_SIZE_MB = 16384 | |
| VLLM_RUNTIME = { | |
| "vllm_image": VLLM_IMAGES["arm64"], | |
| "vllm_framework_source": "https://github.com/vllm-project/vllm/tree/db9527a46873454610df6dbedf79a36d6bf1a7f6", | |
| "mamba_cache_mode": "align", | |
| "prefix_match_unit": 4, | |
| "collection_rule": "kpool_align4", | |
| } | |
| # Reviewed calibration tables: sha256 -> review record. Records without ``campaign`` and ``system`` | |
| # are the GB300 tables of BACKEND_CAMPAIGNS. Multi-GPU records add "campaign", "system" and the | |
| # reviewed memory policy ("sglang_mem_fraction_static" or "vllm_gpu_memory_utilization"). A multi-GPU phase may list | |
| # several calibration jobs (the original run first, then recorded supplement runs). A reviewed record may also pin | |
| # "source_revision", "gpu_family", "snapshot_id", "admission", "vllm_runtime" and "collection_jobs" (all calibration | |
| # jobs, with per-source evidence in provenance "calibration_sources"); absent keys take the campaign defaults. | |
| # SGLang FP8 TP2 has 176 prefill rows: calibration points 227 and 250 (B32 x 131008-token prefix) | |
| # got no radix hits on the stock server and are excluded, not imputed. | |
| REVIEWED_SOURCES = { | |
| 'a3e696a41246b36fe872a1de786fd0b98df71014e9c5fc11dd73c990b8e0a0b1': {'backend': 'vllm', 'precision': 'fp8', 'tp': 4, 'jobs': {'prefill': 'glm53-b300-fpm-1019-r3', 'decode': 'glm53-b300-fpm-1019-r3'}, 'phase_rows': {'prefill': 427, 'decode': 175}, 'system': 'b300_sxm', 'gpu_family': 'B300', 'campaign': 'glm53flash-b300-vllm-v031-native-fpm-20261019', 'source_revision': '8d021d5a41f6f47fd3d4c8064be6361b7c8b3c85', 'snapshot_id': 'aisim-commit-8d021d5a', 'vllm_runtime': {'vllm_image': 'vllm/vllm-openai@sha256:a4a4c0437bf7240089da5f08aa370c4aee17ae5290f7a3b468825ee26c4c3a6b', 'vllm_framework_source': 'https://github.com/vllm-project/vllm/tree/db9527a46873454610df6dbedf79a36d6bf1a7f6', 'mamba_cache_mode': 'align', 'prefix_match_unit': 4, 'collection_rule': 'kpool_align4'}, 'admission': 'development', 'collection_jobs': ['glm53-b300-fpm-1019-r1', 'glm53-b300-fpm-1019-r3']}, | |
| "b36960c57b070b6172a985fa2f57468a812ef22993e28079f500b1b113407896": { | |
| "backend": "sglang", "precision": "fp8", "tp": 2, "jobs": {"prefill": "822204", "decode": "820175"}, | |
| "phase_rows": {"prefill": 176, "decode": 147}, "sglang_mem_fraction_static": 0.78, | |
| }, | |
| "0c1f9df5375f81955c4c911487ece18b840b4c17da9b8b50d1874efb58348ad9": { | |
| "backend": "sglang", "precision": "fp8", "tp": 4, "jobs": {"prefill": "820518", "decode": "820551"}, | |
| "phase_rows": {"prefill": 178, "decode": 147}, "sglang_mem_fraction_static": 0.75, | |
| }, | |
| "0c988389787955fb355c1ecda753287316a56b55269947a368f76556b56b7aab": { | |
| "backend": "sglang", "precision": "nvfp4", "tp": 2, "jobs": {"prefill": "820907", "decode": "820986"}, | |
| "phase_rows": {"prefill": 178, "decode": 147}, "sglang_mem_fraction_static": 0.78, | |
| }, | |
| "ae2169da361180d64ccf436519885e02cbfd8d0dead7ce8aeb9a9b03185e45b6": { | |
| "backend": "sglang", "precision": "nvfp4", "tp": 4, "jobs": {"prefill": "821382", "decode": "821441"}, | |
| "phase_rows": {"prefill": 178, "decode": 147}, "sglang_mem_fraction_static": 0.78, | |
| }, | |
| "c590d709a0ddc7d0b432f4fc607a6f97a902756d955555ed8e45921e02a9804c": { | |
| "backend": "vllm", "precision": "fp8", "tp": 2, "jobs": {"prefill": "898822", "decode": "899326"}, | |
| "phase_rows": {"prefill": 213, "decode": 147}, | |
| }, | |
| "887b74ff40469e8c39e3839d52203a9b0e65a0810a0425b11987a848f7df6260": { | |
| "backend": "vllm", "precision": "fp8", "tp": 4, "jobs": {"prefill": "899675", "decode": "901298"}, | |
| "phase_rows": {"prefill": 212, "decode": 147}, | |
| }, | |
| "a3d3ad924935474380f8b9cabf25cb51b8b3d3abdaa71de567be837b2ecf5577": { | |
| "backend": "vllm", "precision": "nvfp4", "tp": 1, "jobs": {"prefill": "896544", "decode": "898419"}, | |
| "phase_rows": {"prefill": 230, "decode": 147}, | |
| }, | |
| "960b3aa187de794fba07e0ee8d4b9583b324a64b5ca5eab435247b7d44958c1f": { | |
| "backend": "vllm", "precision": "nvfp4", "tp": 2, "jobs": {"prefill": "901822", "decode": "902620"}, | |
| "phase_rows": {"prefill": 213, "decode": 147}, | |
| }, | |
| "0a7d62334768aa61b99fc0b9ad96220eebb1961b0e8c702a642a834f12933f80": { | |
| "backend": "vllm", "precision": "nvfp4", "tp": 4, "jobs": {"prefill": "902669", "decode": "910726"}, | |
| "phase_rows": {"prefill": 212, "decode": 147}, | |
| }, | |
| # Multi-GPU campaign tables (AISimulate PR #515): GB200, B300, H200, H100. B300 vLLM FP8 TP4 is not part of | |
| # this campaign's tables (provided separately). | |
| "3061cd8b0e8047cebb02a5d32116abb77eef5166083d836e94ad0e7b3e83a14a": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "5069282", "prefill": "5069280"}, "phase_rows": {"decode": 147, "prefill": 178}, "precision": "nvfp4", "sglang_mem_fraction_static": 0.78, "system": "b300_sxm", "tp": 4}, | |
| "4b1ed5b0bee4abbb86ae61015332211e172cb0c052e5ed8cfd953fa26f696f70": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "5069272", "prefill": "5069271"}, "phase_rows": {"decode": 147, "prefill": 178}, "precision": "fp8", "sglang_mem_fraction_static": 0.75, "system": "b300_sxm", "tp": 4}, | |
| "737a80794268b601dafbb22b88bf2d9896b3392ed2f8cc8578b51a26c25adeb1": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "5069268", "prefill": "5072487"}, "phase_rows": {"decode": 147, "prefill": 176}, "precision": "fp8", "sglang_mem_fraction_static": 0.8, "system": "b300_sxm", "tp": 2}, | |
| "777d4ffbaa3c44034e4fade4db8315a9865ebbd4237aa0616327ff2738ddc277": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "5069277", "prefill": "5069275"}, "phase_rows": {"decode": 147, "prefill": 178}, "precision": "nvfp4", "sglang_mem_fraction_static": 0.78, "system": "b300_sxm", "tp": 2}, | |
| "1b50b08288ef78b4aaea8a7644a8df04091290671555d2d47de5c1e8591f1fea": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "4960080", "prefill": "4960079"}, "phase_rows": {"decode": 147, "prefill": 230}, "precision": "nvfp4", "system": "b300_sxm", "tp": 1, "vllm_gpu_memory_utilization": 0.92}, | |
| "3f80617c9cc1463eb6bb223373c3a395b4fe752ad3a4738d393c6d52505b548f": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "4960088", "prefill": "4960087"}, "phase_rows": {"decode": 147, "prefill": 212}, "precision": "nvfp4", "system": "b300_sxm", "tp": 4, "vllm_gpu_memory_utilization": 0.92}, | |
| "66fdbaa5cb0de06af0c8f16bd2877bcfb73031c061905d7519c6754f2ad49ae6": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "4960084", "prefill": "4960083"}, "phase_rows": {"decode": 147, "prefill": 213}, "precision": "nvfp4", "system": "b300_sxm", "tp": 2, "vllm_gpu_memory_utilization": 0.92}, | |
| "ec31281a2742bb957fc130ae2e842c268ae339d9f82c000a7bac615b5a2bd6ea": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "4960071", "prefill": "4960070"}, "phase_rows": {"decode": 147, "prefill": 213}, "precision": "fp8", "system": "b300_sxm", "tp": 2, "vllm_gpu_memory_utilization": 0.92}, | |
| "2232f0dc1e77883749792771aa574ce6fd592d4bad69920dc8dac3bba356a398": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "8005756", "prefill": "8005755"}, "phase_rows": {"decode": 146, "prefill": 175}, "precision": "nvfp4", "sglang_mem_fraction_static": 0.78, "system": "gb200", "tp": 2}, | |
| "55bd645151629c74088ef65073bca9fcb22725caa9da1df2a28020c1140fafaa": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "8005760", "prefill": "8005759"}, "phase_rows": {"decode": 147, "prefill": 177}, "precision": "nvfp4", "sglang_mem_fraction_static": 0.78, "system": "gb200", "tp": 4}, | |
| "dda4af7ca27388eceecea12adeac4d386847cbc88e42d6705c9b6306556b9361": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "8005752", "prefill": "8005751"}, "phase_rows": {"decode": 147, "prefill": 177}, "precision": "fp8", "sglang_mem_fraction_static": 0.75, "system": "gb200", "tp": 4}, | |
| "18013c65e5df6c24d7e7c657633d07ad8a0790a53288941b5b03ec4273afde90": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "7927247", "prefill": "7927246"}, "phase_rows": {"decode": 147, "prefill": 213}, "precision": "nvfp4", "system": "gb200", "tp": 2, "vllm_gpu_memory_utilization": 0.92}, | |
| "c053c48cfb97aef9fe0b3bbe615a9179feb1d6ecfa4716914b52ff711ebbf27d": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "7927242", "prefill": "7927241"}, "phase_rows": {"decode": 147, "prefill": 212}, "precision": "fp8", "system": "gb200", "tp": 4, "vllm_gpu_memory_utilization": 0.92}, | |
| "6423a23cd9ca5b837fa02dbbc27cf59f02ada227273b58fedd9cc30aa6b5b673": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "2528030", "prefill": "2528028"}, "phase_rows": {"decode": 141, "prefill": 166}, "precision": "fp8", "sglang_mem_fraction_static": 0.78, "system": "h100_sxm", "tp": 8}, | |
| "8cffa6168029c4932405bba42a910e8b95816f27d8dbe80c45d242959f707c6e": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "2525014", "prefill": ["2525012", "2532667"]}, "phase_rows": {"decode": 144, "prefill": 216}, "precision": "fp8", "system": "h100_sxm", "tp": 8, "vllm_gpu_memory_utilization": 0.88}, | |
| "271f8eaa545efbb9cef745632c3ce982a618ad2a841538c9a15016e3acad40a1": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "5071768", "prefill": "5076578"}, "phase_rows": {"decode": 146, "prefill": 175}, "precision": "fp8", "sglang_mem_fraction_static": 0.84, "system": "h200_sxm", "tp": 8}, | |
| "f6171c57345b78dc21a0e10ca34aac9beec29ee152ea8d413557818632d2e43b": {"backend": "sglang", "campaign": "glm53flash-multigpu-sglang-v0520-native-fpm", "jobs": {"decode": "4975418", "prefill": "4975416"}, "phase_rows": {"decode": 144, "prefill": 172}, "precision": "fp8", "sglang_mem_fraction_static": 0.82, "system": "h200_sxm", "tp": 4}, | |
| "2bf695ad5ba5f3d079442f6ae5f10021862515e7bb158caf21756b4385562f16": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "4964101", "prefill": ["4964100", "5067932"]}, "phase_rows": {"decode": 146, "prefill": 219}, "precision": "fp8", "system": "h200_sxm", "tp": 4, "vllm_gpu_memory_utilization": 0.92}, | |
| "a2249f9535b0b36a5e2a1bcb234d2e07a867bcf26400915e4d144669d6d7322c": {"backend": "vllm", "campaign": "glm53flash-multigpu-vllm-v031-native-fpm", "jobs": {"decode": "4980899", "prefill": ["4966280", "4985538"]}, "phase_rows": {"decode": 147, "prefill": 222}, "precision": "fp8", "system": "h200_sxm", "tp": 8, "vllm_gpu_memory_utilization": 0.92}, | |
| } | |
| _OLD_TIMER = ( | |
| "withdrawn: earlier custom-timer GLM-5.3-Flash collection whose host work inside or around the " | |
| "timed window inflated long-context, large-batch latency (up to about 3.6x vLLM, 4x SGLang rank 0)" | |
| ) | |
| _GLM53TAIL = ( | |
| "withdrawn: native-FPM vLLM 0.30.0+glm53tail.eb4704514fdf table; replaced by stock vLLM 0.31.0" | |
| ) | |
| _SUPERSEDED_904065 = ( | |
| "superseded: vLLM 0.31.0 NVFP4 TP4 table built from calibration-decode job 904065 (transient +1 ms " | |
| "B1 step at contexts 121-130 that the rerun 910726 did not reproduce)" | |
| ) | |
| WITHDRAWN_SOURCES = { | |
| 'e75fd1e15bddec1d9a2952f113b2015130e71284fc7ac5934d38d50c009e5419': "superseded experimental B300 grid: unchanged rows retained in the expanded calibration; original failed validation remains in HF commit 4dc9dda1ccc5f6b778c0bbea5138b28237082b2f and integration evidence", | |
| **{ | |
| digest: _OLD_TIMER | |
| for digest in ( | |
| # glm53flash-pr324 (default config) | |
| "68af04fea2e8f66b8c8b38a508cbe51e6058c7a87a7c07935d47f61c4a2a5da9", | |
| "a6de7d6ec55984f5c9c1ea3117fa95402922ac8cee7f63b15a217ee83ddb17bc", | |
| "266a1efe4d8392d32ae260c234ba904f11e89d69e694c84be9f4498f8dcd5783", | |
| "a92aa4030711ee7606bbb52c86659567baa4fddb0b5214d94de353919e6175b4", | |
| "2e3e4414c2ce8bf8ac4573830d015e4abba520daa8f591c67f446a2fc901a6e3", | |
| "2765f8a0270a5f4a479efc53db5fcaacd5131f76fab6bf75e24d3443330dc8c0", | |
| "35776b56b27c6cbfc02578d0535f698cdeff6476fb21bbb9a63564beece227f5", | |
| "78ead149f368245a6baaa90ff4e99199694547bd4eda335c91e220a25c43049f", | |
| # glm53flash-pr324-prefill-graph, including the superseded SGLang NVFP4 TP4 0.82 table | |
| "762b5c030c8bf189d76b26b502e474cb0f30ac28c42cc0c9f3264e4de4aae679", | |
| "30e1d7d5031d57d33f6b2c314d336757fd19f4bf21231d323f7128414c2a0258", | |
| "7e8749e473e2b5ea16581805cc296a7c589ef0427a675767a495ef754600ca56", | |
| "66023dc0be3f6e70662934508dea0c3a59a6b2dee362c6b7560079d5f26768da", | |
| "62a9988aad157bbf7449fb61d8148669b68244d03dfcb856b80306e80a108eeb", | |
| "07f328746e3e299864af6c1c58d4decef562ae0612870eb10c7310ec348c227d", | |
| "0994819af4a75910eb3bf5857c0f4675aec5af7c6ebb227e944631153a163e17", | |
| "149addaa9f405755916678fa342717da1d93106379df78664fb870ba1c916cf4", | |
| "9ab63cc062ff51eb1ca66f6b01b40bf9465d6cccfcdc289d8279c30a9b9dac08", | |
| ) | |
| }, | |
| **{ | |
| digest: _GLM53TAIL | |
| for digest in ( | |
| "0c8c9edda3854edf27bfb53b9c614797004e45c8aa787bea809fcbb13535f329", | |
| "f31e9d412096d92b4bed3db8c93b82f7daa7b76fa4511416cf05d6c55199c236", | |
| "f7cd5c5a8fd207ba8f4e57002020ab81eb73f9968b39b3f07e19dd466b0d779f", | |
| "eb025e0183c9b15675b0e718859cb7050cccd049b1477cbfdfe91e9f47207567", | |
| ) | |
| }, | |
| "0111f283c0236a472236b33411c7197b560c0e3725695fb13b9e0b15fff99990": _SUPERSEDED_904065, | |
| } | |
| IDENTITY_FIELDS = ( | |
| "model_path system backend backend_version weight_quantization gemm_quant_mode " | |
| "moe_quant_mode fmha_quant_mode fmha_resolution comm_quant_mode kv_cache_dtype " | |
| "parallel_strategy tp moe_tp pp dp moe_ep cp moe_backend attention_backend " | |
| "enable_wideep enable_eplb model_config_sha256 execution_profile engram_residency " | |
| "input_modality measurement_policy timing_boundary state_protocol " | |
| "measurement_repeats warmup_repeats" | |
| ).split() | |
| SGLANG_IDENTITY_FIELDS = ("sglang_allocator_max_split_size_mb", "sglang_allocator_policy_sha256") | |
| REQUIRED_ROLES = { | |
| "source_metadata", | |
| "consumer_system_configuration", | |
| "evaluation_support", | |
| "provenance", | |
| "source_license", | |
| } | |
| def read(path): | |
| return json.loads(Path(path).read_text()) | |
| def sha(path): | |
| return hashlib.sha256(Path(path).read_bytes()).hexdigest() | |
| def require(ok, message): | |
| if not ok: | |
| raise ValueError(message) | |
| def identity(path): | |
| rows = pq.read_table(path).to_pylist() | |
| require(bool(rows), "Empty GLM-5.3-Flash table") | |
| backend = rows[0].get("backend") | |
| require(backend in BACKEND_VERSIONS, "Unreviewed GLM-5.3-Flash backend") | |
| fields = IDENTITY_FIELDS + (list(SGLANG_IDENTITY_FIELDS) if backend == "sglang" else []) | |
| result = {k: rows[0].get(k) for k in fields} | |
| require( | |
| all(all(row.get(k) == v for k, v in result.items()) for row in rows), | |
| "Mixed GLM-5.3-Flash execution identity", | |
| ) | |
| require(result["model_path"] in MODEL_REVISIONS, "Unexpected model") | |
| require(result["system"] in SYSTEMS, "Unexpected system") | |
| require(BACKEND_VERSIONS[backend] == result["backend_version"], "Unreviewed backend version") | |
| require(result["measurement_policy"] == MEASUREMENT_POLICIES[backend], "Unexpected measurement policy") | |
| require(result["timing_boundary"] == TIMING_BOUNDARIES[backend], "Unexpected timing boundary") | |
| require(result["state_protocol"] == STATE_PROTOCOLS[backend], "Unexpected state protocol") | |
| require( | |
| (result["measurement_repeats"], result["warmup_repeats"]) == (10, 5), | |
| "Unexpected repetition policy", | |
| ) | |
| require( | |
| result["parallel_strategy"] == "pure_tp" | |
| and result["tp"] == result["moe_tp"] | |
| and result["tp"] in TP_SIZES | |
| and (result["pp"], result["dp"], result["moe_ep"], result["cp"]) == (1, 1, 1, 1), | |
| "Unexpected topology", | |
| ) | |
| require( | |
| result["kv_cache_dtype"] == result["fmha_quant_mode"] == SYSTEMS[result["system"]][2], | |
| "Unexpected KV-cache dtype", | |
| ) | |
| require( | |
| not (result["system"] in HOPPER_SYSTEMS and result["model_path"] == "nvidia/GLM-5.3-Flash-NVFP4"), | |
| "NVFP4 on Hopper is a design exclusion", | |
| ) | |
| require(result["execution_profile"] == "full", "Unknown execution profile") | |
| if backend == "sglang": | |
| require( | |
| result["sglang_allocator_max_split_size_mb"] == SGLANG_ALLOCATOR_MAX_SPLIT_SIZE_MB, | |
| "Unexpected SGLang allocator policy", | |
| ) | |
| require( | |
| all(math.isfinite(r["latency_ms"]) and r["latency_ms"] > 0 for r in rows), | |
| "Invalid observed latency", | |
| ) | |
| result["phase_rows"] = dict(Counter(row["workload_kind"] for row in rows)) | |
| return result | |
| def selector(ids): | |
| """Execution identity recorded in the sidecar (``phase_rows`` is a count, not identity).""" | |
| return {k: v for k, v in ids.items() if k != "phase_rows"} | |
| def path_component(value): | |
| """Directory name of an identity value (as manage_dataset.path_component: b300_sxm -> b300-sxm).""" | |
| return re.sub(r"[^a-z0-9.-]+", "-", str(value).lower()).strip("-") | |
| def snapshot_identity(ids, digest): | |
| """Normalized identity of a reviewed, current calibration table.""" | |
| model = ids["model_path"] | |
| parallelism = f"pure-tp{ids['tp']}" | |
| return { | |
| "model_id": model, | |
| "model_revision": MODEL_REVISIONS[model], | |
| "gpu_family": REVIEWED_SOURCES.get(digest, {}).get("gpu_family", SYSTEMS[ids["system"]][0]), | |
| "framework": ids["backend"], | |
| "framework_version": ids["backend_version"], | |
| "parallelism": parallelism, | |
| "configuration_path": "/".join(( | |
| "data", model.replace("/", "--"), path_component(ids["system"]), ids["backend"], | |
| ids["backend_version"], parallelism, | |
| )), | |
| "snapshot_id": REVIEWED_SOURCES.get(digest, {}).get("snapshot_id", f"aisim-commit-unknown-{digest[:12]}"), | |
| "snapshot_status": "current", | |
| **{k: ids[k] for k in ( | |
| "system", "parallel_strategy", "tp", "pp", "dp", "moe_tp", "moe_ep", "cp", | |
| "weight_quantization", "kv_cache_dtype", | |
| )}, | |
| } | |
| def deployment(ids): | |
| precision = "fp8" if ids["model_path"] == "zai-org/GLM-5.3-Flash" else "nvfp4" | |
| return ids["backend"], precision, ids["tp"] | |
| def reviewed(digest, ids): | |
| """Return the reviewed source record for ``digest`` after checking it describes ``ids``.""" | |
| require(digest not in WITHDRAWN_SOURCES, "Withdrawn GLM-5.3-Flash table") | |
| source = REVIEWED_SOURCES.get(digest) | |
| require(source is not None, "Unreviewed GLM-5.3-Flash table") | |
| require(deployment(ids) == (source["backend"], source["precision"], source["tp"]), "Reviewed deployment mismatch") | |
| require(ids["system"] == source.get("system", "gb300"), "Reviewed system mismatch") | |
| require(ids["phase_rows"] == source["phase_rows"], "Unexpected phase row counts") | |
| return source | |
| def producer_identity(metadata): | |
| values = [item.get("producer_provenance", {}).get("aic_revision") for item in metadata] | |
| revisions = sorted({value for value in values if isinstance(value, str) and value}) | |
| commits = {value for value in revisions if re.fullmatch(r"[0-9a-f]{40}", value)} | |
| if len(revisions) > 1: | |
| commit, status = None, "mixed" | |
| elif len(commits) == 1 and all(values): | |
| commit, status = next(iter(commits)), "recorded" | |
| else: | |
| commit, status = None, "unknown" | |
| return { | |
| "aisim_commit": commit, | |
| "aisim_commit_status": status, | |
| "producer_revisions": revisions, | |
| "producer_identity_missing": any(not value for value in values), | |
| } | |
| def validate_latency_policy(meta, ids): | |
| backend = ids["backend"] | |
| label = MEASUREMENT_POLICIES[backend] | |
| require(meta.get("measurement_policy") == label, "Sidecar row label changed") | |
| require(meta.get("row_measurement_policy_label") == label, "Row label not declared") | |
| require(meta.get("latency_ms_policy") == label, "Actual latency policy missing or wrong") | |
| require(meta.get("row_label_describes_latency_ms") is True, "Row-label semantics must be explicit") | |
| require(meta.get("timing_boundary") == TIMING_BOUNDARIES[backend], "Timing boundary missing") | |
| require(meta.get("state_protocol") == STATE_PROTOCOLS[backend], "State protocol missing") | |
| def owns(digest): | |
| """Whether this policy decides admission of a schema-7 table (reviewed or withdrawn).""" | |
| return digest in REVIEWED_SOURCES or digest in WITHDRAWN_SOURCES | |
| def source_campaign(source): | |
| """Campaign of a reviewed source record (GB300 records name none).""" | |
| return source.get("campaign", BACKEND_CAMPAIGNS[source["backend"]]) | |
| def source_revision(source): | |
| return source.get("source_revision") or SOURCE_REVISIONS[source_campaign(source)] | |
| def phase_jobs(jobs): | |
| """Calibration jobs per phase as lists (GB300 records name one job per phase).""" | |
| return {phase: [job] if isinstance(job, str) else list(job) for phase, job in jobs.items()} | |
| def runtime_images(system): | |
| arch = SYSTEMS[system][1] | |
| return {"vllm": VLLM_IMAGES[arch], "sglang": SGLANG_IMAGES[arch]} | |
| def source_provenance(root, meta): | |
| """The per-leaf source evidence (campaign, collection jobs, runtime) of a table.""" | |
| entries = [f for f in meta["supporting_files"] if f["role"] == "provenance"] | |
| require(len(entries) == 1, "One GLM provenance file per table") | |
| path = root / entries[0]["path"] | |
| require(sha(path) == entries[0]["sha256"], "Provenance file changed") | |
| return read(path) | |
| def validate_serving_configuration(meta, source, provenance): | |
| backend = source["backend"] | |
| campaign = source_campaign(source) | |
| system = source.get("system", "gb300") | |
| multigpu = campaign in MULTIGPU_CAMPAIGNS | |
| require(meta.get("serving_configuration") is True, "Must declare the default serving configuration") | |
| require(meta.get("prefix_caching") is True, "Prefix caching must be on") | |
| require(meta.get("timing_source") == "engine_native_fpm", "Timing must be engine-native FPM") | |
| require( | |
| sorted(meta.get("collector_attempt_ids") or []) | |
| == sorted(source.get("collection_jobs") or [job for jobs in phase_jobs(source["jobs"]).values() for job in jobs]), | |
| "Source jobs mismatch", | |
| ) | |
| require( | |
| provenance.get("campaign") == campaign | |
| and provenance.get("source_revision") == source_revision(source) | |
| and provenance.get("system", system) == system | |
| and {phase: [run["job"], *run.get("supplement_jobs", [])] | |
| for phase, run in provenance["runs"]["calibration"].items()} == phase_jobs(source["jobs"]), | |
| "Source evidence mismatch", | |
| ) | |
| if "collection_jobs" in source: | |
| require(sorted(provenance.get("collection_jobs", [])) == sorted(source["collection_jobs"]), | |
| "Expanded calibration source jobs mismatch") | |
| require({r["job"] for r in provenance.get("calibration_sources", [])} == set(source["collection_jobs"]), | |
| "Missing expanded calibration source evidence") | |
| require(sum(r["rows"] for r in provenance["calibration_sources"]) == meta["row_count"], | |
| "Expanded calibration source row counts mismatch") | |
| require({r["native_raw_sha256"] for r in provenance["calibration_sources"]} | |
| == set(meta.get("source_native_primary_sha256s", [])), | |
| "Expanded calibration native source hashes mismatch") | |
| if backend == "sglang": | |
| require( | |
| meta.get("sglang_mem_fraction_static") == source["sglang_mem_fraction_static"] | |
| == provenance["serving_configuration"]["sglang_mem_fraction_static"], | |
| "SGLang static memory fraction mismatch", | |
| ) | |
| require( | |
| meta.get("sglang_allocator_max_split_size_mb") == SGLANG_ALLOCATOR_MAX_SPLIT_SIZE_MB, | |
| "SGLang allocator policy mismatch", | |
| ) | |
| if multigpu: | |
| image = runtime_images(system)["sglang"] | |
| require( | |
| meta.get("sglang_image") == image == provenance["serving_configuration"].get("image"), | |
| "SGLang runtime identity mismatch", | |
| ) | |
| else: | |
| runtime = source.get("vllm_runtime") or dict(VLLM_RUNTIME, vllm_image=runtime_images(system)["vllm"]) | |
| require({k: meta.get(k) for k in runtime} == runtime, "vLLM runtime identity mismatch") | |
| serving = provenance["serving_configuration"] | |
| require( | |
| serving.get("image") == runtime["vllm_image"] | |
| and serving.get("framework_source") == runtime["vllm_framework_source"], | |
| "vLLM runtime evidence mismatch", | |
| ) | |
| if multigpu: | |
| require( | |
| meta.get("vllm_gpu_memory_utilization") == source["vllm_gpu_memory_utilization"] | |
| == serving.get("gpu_memory_utilization"), | |
| "vLLM memory utilization mismatch", | |
| ) | |
| if multigpu: | |
| require( | |
| str(meta.get("input_source", "")).startswith(SEEDED_INPUT_SOURCE) | |
| and provenance.get("input_source") == meta.get("input_source"), | |
| "Seeded input source not recorded", | |
| ) | |
| exclusions = provenance.get("exclusions") | |
| require( | |
| isinstance(exclusions, dict) | |
| and exclusions.get("design_exclusions") == DESIGN_EXCLUSIONS | |
| and all(isinstance(exclusions.get(k), list) for k in ( | |
| "excluded_calibration_points", "infeasible_kv_capacity", "infeasible_memory", | |
| "excluded_holdout_points")), | |
| "Exclusions must be recorded explicitly", | |
| ) | |
| def campaign_of(value): | |
| require(value in CAMPAIGNS, "Unknown GLM campaign") | |
| return value | |
| def validate_snapshot(root, manifest): | |
| require( | |
| not any(key in manifest["provenance"] for key in UNNORMALIZED_FIELDS), | |
| "Campaign labels and scheduler IDs are not normalized manifest fields", | |
| ) | |
| require( | |
| bool(manifest["fpm"]) and all(entry["sha256"] in REVIEWED_SOURCES for entry in manifest["fpm"]), | |
| "Unreviewed GLM-5.3-Flash table", | |
| ) | |
| require( | |
| {REVIEWED_SOURCES[entry["sha256"]]["backend"] for entry in manifest["fpm"]} == {manifest["framework"]}, | |
| "Reviewed backend mismatch", | |
| ) | |
| require(manifest["manifest_version"] == 4, "Configuration manifest v4 required") | |
| require( | |
| {source_revision(REVIEWED_SOURCES[entry["sha256"]]) for entry in manifest["fpm"]} | |
| == {manifest["provenance"]["source_revision"]}, | |
| "Unreviewed source revision", | |
| ) | |
| require(MODEL_REVISIONS.get(manifest["model_id"]) == manifest["model_revision"], "Model revision changed") | |
| require( | |
| BACKEND_VERSIONS.get(manifest["framework"]) == manifest["framework_version"], | |
| "Unreviewed framework_version", | |
| ) | |
| require(len(manifest["fpm"]) == 1, "One calibration table per configuration") | |
| entry = manifest["fpm"][0] | |
| require(sha(root / entry["path"]) == entry["sha256"], "Changed source calibration bytes") | |
| ids = identity(root / entry["path"]) | |
| reviewed(entry["sha256"], ids) | |
| expected = snapshot_identity(ids, entry["sha256"]) | |
| for field, value in expected.items(): | |
| require(manifest.get(field) == value, "Manifest identity mismatch: " + field) | |
| require(manifest["measurements"]["file_count"] == 0, "Holdout is not published as truth") | |
| bundle = read(root / manifest["measurements"]["manifest_path"]) | |
| require( | |
| bundle["manifest_version"] == 5 and bundle["files"] == [] and bundle["collection_runs"] == [], | |
| "Calibration-only bundle must keep empty truth files and collection runs", | |
| ) | |
| require( | |
| not any(key in bundle["provenance"] for key in UNNORMALIZED_FIELDS) | |
| and bundle["provenance"] == manifest["provenance"], | |
| "Measurement manifest provenance must equal the normalized configuration provenance", | |
| ) | |
| for field in (*expected, "aisim_commit", "aisim_commit_status", "evidence_date"): | |
| require(bundle.get(field) == manifest[field], "Measurement manifest identity mismatch: " + field) | |
| require( | |
| bundle["measurement_artifact_id"] == manifest["measurements"]["artifact_id"], | |
| "Measurement artifact identity mismatch", | |
| ) | |
| paths = set() | |
| metadata = [] | |
| roles = set() | |
| for entry in manifest["fpm"]: | |
| meta = read(root / entry["metadata_path"]) | |
| metadata.append(meta) | |
| require(meta.get("import_policy") == POLICY, "Missing GLM import policy") | |
| require(meta.get("configuration_selector") == selector(ids), "Schema7 execution identity mismatch") | |
| require(meta.get("model_revision") == manifest["model_revision"], "Model revision discarded") | |
| for f in meta["supporting_files"]: | |
| p = root / f["path"] | |
| require(p.resolve().is_relative_to((root / manifest["configuration_path"]).resolve()), "Escaping path") | |
| require(sha(p) == f["sha256"], "Supporting file digest mismatch") | |
| paths.add(f["path"]) | |
| roles.add(f["role"]) | |
| systems = [f for f in meta["supporting_files"] if f["role"] == "consumer_system_configuration"] | |
| require( | |
| len(systems) == 1 and Path(systems[0]["path"]).name == f"systems.{manifest['system']}.yaml", | |
| "Consumer system configuration must be the table's system YAML", | |
| ) | |
| source = root / next(f["path"] for f in meta["supporting_files"] if f["role"] == "source_metadata") | |
| require(sha(source) == meta["source_metadata_sha256"], "Source sidecar changed") | |
| require(read(source).get("parquet_sha256") == entry["sha256"], "Source sidecar names another table") | |
| require(REQUIRED_ROLES <= roles, "Required GLM supporting files missing") | |
| producer = producer_identity(metadata) | |
| for field in ("aisim_commit", "aisim_commit_status"): | |
| require(manifest[field] == producer[field], "Producer identity mismatch: " + field) | |
| for field in ("producer_revisions", "producer_identity_missing"): | |
| require(manifest["provenance"].get(field) == producer[field], "Producer provenance mismatch: " + field) | |
| catalogs = ( | |
| (read(root / "catalog/fpm.json")["records"], "path", entry["path"]), | |
| (pq.read_table(root / "catalog/index.parquet").to_pylist(), "manifest_path", | |
| manifest["configuration_path"] + "/manifest.json"), | |
| ) | |
| for records, key, value in catalogs: | |
| matches = [record for record in records if record[key] == value] | |
| require(len(matches) == 1, "Snapshot must have one matching catalog entry: " + key) | |
| for field in (*expected, "aisim_commit", "aisim_commit_status", "evidence_date"): | |
| require(matches[0].get(field) == manifest[field], "Catalog snapshot identity mismatch: " + field) | |
| return paths | |
| def validate_catalog_record(root, record): | |
| path = root / record["path"] | |
| require(record["sha256"] not in WITHDRAWN_SOURCES, "Withdrawn GLM-5.3-Flash table") | |
| require( | |
| not any(key in record for key in UNNORMALIZED_FIELDS), | |
| "Campaign labels and scheduler IDs are not normalized catalog fields", | |
| ) | |
| require(record["sha256"] in REVIEWED_SOURCES, "Unreviewed GLM-5.3-Flash table") | |
| require(record["source_revision"] == source_revision(REVIEWED_SOURCES[record["sha256"]]), "Unreviewed source revision") | |
| require(record.get("source_kind") == "source_qualified_native_calibration", "Calibration kind changed") | |
| require(record["source_sha256"] == sha(path) == record["sha256"], "Changed source calibration bytes") | |
| require( | |
| record["schema_version"] == 7 and record["schema_name"] == "aic_fpm_forward_perf", | |
| "Invalid schema7", | |
| ) | |
| ids = identity(path) | |
| source = reviewed(record["sha256"], ids) | |
| require(record["row_count"] == sum(source["phase_rows"].values()), "Unreviewed GLM row count") | |
| meta = read(root / record["metadata_path"]) | |
| require(meta.get("configuration_selector") == selector(ids), "Schema7 execution identity mismatch") | |
| require(meta.get("import_policy") == POLICY, "Unreviewed GLM import") | |
| validate_latency_policy(meta, ids) | |
| validate_serving_configuration(meta, source, source_provenance(root, meta)) | |
| for field, value in snapshot_identity(ids, record["sha256"]).items(): | |
| require(record.get(field) == value, "Catalog identity mismatch: " + field) | |
| require(record["snapshot_status"] == "current" and meta["admission"] == source.get("admission", "serving"), | |
| "Admission invalid") | |
| require(meta.get("independent_evaluation_truth") is False, "Calibration cannot be truth") | |
| require(meta.get("heldout_observations_used_for_calibration") is False, "Holdout leaked into calibration") | |
| return 7 | |