Repository navigation
fix(dataset): bump mmap cache MANIFEST_VERSION to 27 after idle-gap warp removal - #48
Open
redhairdragon wants to merge 1 commit into
Open
redhairdragon wants to merge 1 commit into
redhairdragon wants to merge 1 commit into
Conversation
…arp removal deb5421 moved --trace-idle-gap-cap-seconds enforcement from a load-time timeline warp in the weka loader (_IdleGapTimeWarp) to the runtime scheduler. That changes Turn.timestamp / Turn.delay and the per-conversation start/end timestamps decoded for a given cache key, but MANIFEST_VERSION stayed at 26. The key has no source-code component unless AIPERF_VERSION is set, so a warm /aiperf_mmap_cache populated before deb5421 keeps serving the warped timeline under the same key: for the inferencex-agentx-mvp Kimi-K3 scenario (key e33b683c...), a pre-deb5421c entry is a 6.31 GiB dataset.dat while a fresh build is 6.30 GiB, and trajectory sampling (root_next, live branches, warmup credits) diverges between the two. Bump to 27 per the contract documented in this file so pre-deb5421c entries miss on upgrade, and add a regression test for a v26 manifest. Signed-off-by: Shen Teng <shen_teng@engineering.ucla.edu>
3 of 11 tasks
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@a50570e1c31b942c022ba7a689620ffc59573811Recommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@a50570e1c31b942c022ba7a689620ffc59573811Last updated for commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deb5421c(fix(agentx): enforce per-trajectory runtime idle caps, 2026-07-30) moved--trace-idle-gap-cap-secondsenforcement from a load-time timeline warp in the weka loader (_IdleGapTimeWarp, removed fromsrc/aiperf/dataset/loader/weka_trace.py) to the runtime scheduler. That changesTurn.timestamp/Turn.delayand the per-conversationstart_timestamp_ms/end_timestamp_msdecoded for a given cache key, butMANIFEST_VERSIONstayed at26(last bumped incef80df4, 2026-07-24).compute_cache_key()has no source-code component unlessAIPERF_VERSIONis set (_aiperf_version()returnsNoneby default), so bothbe758d62(pre-deb5421c) and every later revision produce the same key for the same CLI. A warm/aiperf_mmap_cachepopulated beforedeb5421ctherefore logsMemory-mapped dataset cache HITand keeps replaying the warped timeline — exactly the failure mode the contract comment at the top ofmmap_cache.pywarns about:Evidence (InferenceX
inferencex-agentx-mvpKimi-K3 scenario,--random-seed 42 --num-dataset-entries 393 --trace-idle-gap-cap-seconds 300)deb5421cbuild of the key (be758d62)754356e9e33b683c648e0cd197606a97c1e2a9f0e33b683c648e0cd197606a97c1e2a9f0(identical)dataset.dat6.31 GiB)6.30 GiB)manifest.json02bc0afb,sample_time 47%)root_next=0/13, live=13(58 profiling requests, 287k–365k ISL)root_next=0/13, live=1(0 profiling requests)069d7bf5,49%)root_next=149/219root_next=210/219Because
timing/trajectory_source.pysamplest* = start + U(0.25, 0.75)·(end − start)against the cached timestamps, the two caches select different starting turns and live branches for identical(seed, lane, trace, sample_time). End to end on the same 16-GPU GB200 nodes, image and engine flags (aiperf CLI at754356e9in both arms, only the cache directory differs), the warped cache yields 10–23 % higher mean ISL, +0.19…+3.37 pp prefix-cache hit and 5–23 % higher input throughput per GPU across four Kimi-K3 AgentX configurations; the persistent cache on the InferenceXgb200-nvcluster (run34836531846) matches the pre-deb5421csignature line for line.Change
MANIFEST_VERSION26 → 27with a# v27:note in the existing per-version comment block, so every pre-deb5421centry misses and is rebuilt once on upgrade.tests/unit/dataset/test_mmap_cache.py: update the pinned version assertion and addtest_lookup_rejects_pre_runtime_idle_cap_manifest(aversion: 26manifest must miss).No key-payload or on-disk layout change.
Operational impact
One rebuild per cache directory (≈6.3 GiB / a few minutes for the Kimi-K3 corpus). Clusters that still had a pre-
deb5421ccache will move to the unwarped timeline thatdeb5421cintended; their AgentX ISL / hit-rate / input-throughput numbers shift accordingly (see InferenceX companion PR SemiAnalysisAI/InferenceX#3729, which additionally exportsAIPERF_VERSIONso future harness bumps namespace the key automatically).Testing
Local, Linux x86_64, CPython 3.12.15,
uv pip install -e '.[test]' -e 'tests/aiperf_mock_server[dev]'+tools/generate_plugin_artifacts.py --enums/--overloads(as inrun-unit-tests.yml):pytest tests/unit/dataset/test_mmap_cache.py→ 72 passed (incl. the new test; the new test fails onmasterbecause aversion: 26manifest is still accepted there).ruff check/ruff format --check(0.14.14) andcodespellclean on both touched files.AI model disclosure
Prepared with Google Antigravity (agentic coding assistant). The runtime does not expose the exact underlying model identifier, so it could not be verified. Role: root-cause analysis of the cache-key behaviour, A/B experiment design and log analysis, patch and test drafting, and this description; an independent verification pass by a second Antigravity agent re-derived the numbers above from the raw logs. Final review by the human author.
Note
Low Risk
Version bump and unit tests only; forces cache misses and rebuilds without changing key computation or mmap layout.
Overview
Bumps the mmap dataset cache
MANIFEST_VERSIONfrom 26 to 27 so pre-upgrade warm entries are treated as a miss and rebuilt. The bump documents that--trace-idle-gap-cap-secondsis no longer applied via load-time timeline warping in the Weka loader; decodedTurn.timestamp/Turn.delayand per-conversation start/end timestamps for the same cache key differ, while the content-addressed key can stay identical whenAIPERF_VERSIONis unset.Tests pin the new version and add
test_lookup_rejects_pre_runtime_idle_cap_manifest, asserting manifests at version 26 no longer hit lookup. No on-disk layout or cache-key payload changes—only manifest gating and operational one-time rebuild per cache directory.Reviewed by Cursor Bugbot for commit a50570e. Bugbot is set up for automated code reviews on this repo. Configure here.