chore(dataset): retain only the current spatial workload release
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes-31
- README.md+7-5
- checksums.sha256+5-175
- spatial-workloads/v1/README.mdDeleted-67
- spatial-workloads/v1/cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.jsonDeleted-17
- spatial-workloads/v1/cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.binDeleted-3
- spatial-workloads/v1/cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.jsonDeleted-17
- spatial-workloads/v1/catalog.jsonDeleted-151
- spatial-workloads/v1/checksums.sha256Deleted-169
- spatial-workloads/v1/code-provenance.jsonDeleted-31
- spatial-workloads/v1/generation-spec.jsonDeleted-143
- spatial-workloads/v1/partitions/k128-seed42/assignments.u32Deleted-3
- spatial-workloads/v1/partitions/k128-seed42/centroids.fbinDeleted
- spatial-workloads/v1/partitions/k128-seed42/partition.jsonDeleted-315
- spatial-workloads/v1/partitions/k128-seed42/query_assignments.u32Deleted
- spatial-workloads/v1/partitions/k128-seed42/training_source_ids.u32Deleted-3
- spatial-workloads/v1/plan.jsonDeleted-589
- spatial-workloads/v1/requirements.txtDeleted-4
- spatial-workloads/v1/tools/cxl/derive_concurrent_manifest.pyDeleted-555
- spatial-workloads/v1/tools/cxl/materialize_concurrent_batch_update.pyDeleted-1392
- spatial-workloads/v1/tools/evaluation_runners/configs/deep100.jsonDeleted-123
- spatial-workloads/v1/tools/evaluation_runners/e1.pyDeleted-4
- spatial-workloads/v1/tools/evaluation_runners/e2.pyDeleted-4
- spatial-workloads/v1/tools/evaluation_runners/e6.pyDeleted-4
- spatial-workloads/v1/tools/evaluation_runners/prepare_spatial_config.pyDeleted-230
- spatial-workloads/v1/tools/evaluation_runners/runner.pyDeleted-2556
- spatial-workloads/v1/tools/generator/spatial_common.pyDeleted-109
- spatial-workloads/v1/tools/generator/spatial_groundtruth.pyDeleted-263
- spatial-workloads/v1/tools/generator/spatial_partition.pyDeleted-131
65 unmodified lines6667686970717273747576777879808182838485868788899091929394959697989910010110265 unmodified linesinitial/pq/pq_m24.pqcodes filter=lfs diff=lfs merge=lfs -textinitial/pq/pq_m48.pqcodes filter=lfs diff=lfs merge=lfs -textinitial/pq/pq_m96.pqcodes filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/partitions/k128-seed42/assignments.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/partitions/k128-seed42/training_source_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/delete-hot/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/delete-hot/streams/delete_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/delete-uniform/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/delete-uniform/streams/delete_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/insert-hot/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/insert-hot/streams/insert_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/insert-hot/streams/insert_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/insert-uniform/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/insert-uniform/streams/insert_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/insert-uniform/streams/insert_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-shared-hot/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-shared-hot/queries/query_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-shared-hot/streams/delete_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-shared-hot/streams/insert_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-shared-hot/streams/insert_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-uniform/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-uniform/queries/query_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-uniform/streams/delete_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-uniform/streams/insert_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-uniform/streams/insert_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-update-hot/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-update-hot/queries/query_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-update-hot/streams/delete_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-update-hot/streams/insert_ids.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/mixed-update-hot/streams/insert_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/query-hot/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/query-hot/queries/query_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/query-uniform/queries/queries.fbin filter=lfs diff=lfs merge=lfs -textspatial-workloads/v1/workloads/query-uniform/queries/query_refs.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v2/partitions/k128-seed42/assignments.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v2/partitions/k128-seed42/query_banks/uniform/query_assignments.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v2/partitions/k128-seed42/training_source_ids.u32 filter=lfs diff=lfs merge=lfs -text65 unmodified lines66676869707165 unmodified linesinitial/pq/pq_m24.pqcodes filter=lfs diff=lfs merge=lfs -textinitial/pq/pq_m48.pqcodes filter=lfs diff=lfs merge=lfs -textinitial/pq/pq_m96.pqcodes filter=lfs diff=lfs merge=lfs -textspatial-workloads/v2/partitions/k128-seed42/assignments.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v2/partitions/k128-seed42/query_banks/uniform/query_assignments.u32 filter=lfs diff=lfs merge=lfs -textspatial-workloads/v2/partitions/k128-seed42/training_source_ids.u32 filter=lfs diff=lfs merge=lfs -text
82 unmodified lines8384858687888990919282 unmodified lines## Fixed spatial hotspot workloadsSee [spatial-workloads/v1](spatial-workloads/v1/README.md) for 9 validated query/update profiles, including uniform controls and a fixed 5.39% hotspot. These workloads reuse the existing static and initial-80M indexes and vector/PQ assets. The original traces above remain available.## Current fixed spatial hotspot release: v2See [spatial-workloads/v2](spatial-workloads/v2/README.md) for 11 validated query/update profiles, including uniform controls and a fixed 12.79% hotspot. These workloads reuse the existing static and initial-80M indexes and vector/PQ assets. The original traces and previous releases remain available. There is no hotspot batch switching.In v1, `query-uniform` / `query-hot` meant queries derived from the original 10K bank. In v2 these are `query-original` / `query-original-hot`; `query-uniform` / `query-uniform-hot` use the separate heldout DEEP1B random 500K bank. v1 artifacts are preserved.82 unmodified lines83848586878889909192939482 unmodified lines## Fixed spatial hotspot workloadsThe current spatial workload release is [spatial-workloads/v2](spatial-workloads/v2/README.md), with 11 query/update profiles and one fixed 12.79% hotspot.- `query-original` / `query-original-hot`: official Original10K queries, repeated or resampled into 500K query rows.- `query-uniform` / `query-uniform-hot`: the separate heldout DEEP1B random500K query bank.- Standalone insert/delete: one batch of 1M operations.- Mixed: three batches, each with 1M inserts and 1M deletes.- Corresponding query and initial/post-batch GT, validation reports, scripts, and checksums are included.The dataset keeps one current spatial workload release. It reuses the existing static and initial-80M indexes and vector/PQ assets. The original traces above remain available.
123414 unmodified lines19202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419521 unmodified lines21721821922022122222322416 unmodified lines241242243244245246247e6302475693ade2d9c2cf69edb4d5b3986c3b901efce05bb9597607cb4178a61 README.md1c8bf71f320a52e763ba1fa1168d88dbd45f5b36ce74cf2fa71d7bdc399eba93 base_permuted.fbin0a105a680b67a49588dd9c889fcfc4f32a724d18883c88d5064e8061df232644 groundtruth/active_80m.bin5793ba574761e11c41087eb1e9e7b1e232350af3c6f17c5c18ed071b05e56031 groundtruth_manifest.json14 unmodified linescbdf00b2bb52fd734dd2fd9b72a0acfc3d5d3006a4f1d630596fa6aa84befbb5 initial_pq_manifest.jsonc33bcf46d80fbe91f66bb3f480769e39613fd3f490b528732c330e1253f79025 reordered_insert_manifest.json4a36d2c637cf2baaf733fff385f112f99af18f0f115708b5342d52eb6d08a4ec source_manifest.json0262b930cd55a42336108545b8b2b17af79cee237a173b9f124da299d508adf9 spatial-workloads/v1/README.md4725d82f9a4e4e089c1e85ad28e063c61354b840edb68cf660429da0becdf454 spatial-workloads/v1/cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.binebd2f5852533b2f1c4bc90b4d7f2f87feca2649759461260ef06c72d7e4b4025 spatial-workloads/v1/cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.jsondf4dbc6b1c2066cfecd7f688ac52715c198b9888de4fcb620489a8086e7e40a5 spatial-workloads/v1/cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.bin174f25a58aad3d57c38db71a2684133cd6bf625a6fc6feb15678f5afaafe7ead spatial-workloads/v1/cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.json0a105a680b67a49588dd9c889fcfc4f32a724d18883c88d5064e8061df232644 spatial-workloads/v1/cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.bin363192ee85853529fa016c029dd51a5ccd5e58351c286806aea37ccebcd485c6 spatial-workloads/v1/cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.jsonb3c2be4f5cda0b7c2f06603423c9f6d0b3938e5374600c7ddb3785c23b17f91a spatial-workloads/v1/cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.bindba30c20f2ec43cc854d461b74c263e3858104acd7c6e0c3879eb53c3fa3e54a spatial-workloads/v1/cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.json97afc7c866d8b3d48d1988910be52ac6aae882a089e693e6343a7772ef5323d7 spatial-workloads/v1/cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.bin0123a0ad340f7db6967a5bd0edeabc954176db8bb9fca45d1c5cf9ef1987588d spatial-workloads/v1/cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.jsonf50098b67ec5d5dfb391a8d8c3661a4ba1859b999591bed500ba6ed3cfe4910c spatial-workloads/v1/cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.bine236e49f6baf00bd5969fb21ce8ca3d4acfe27047a1034d9ceb2777c42235828 spatial-workloads/v1/cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.jsonb2964fb30a8c821af00f5c178c2ea2803b053f11ac06b1152d84ef90a9ce67f0 spatial-workloads/v1/cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.bin881532cf320ae91ee066472418f1190c418a79dcd2e7524e7485d7dbfd5105ca spatial-workloads/v1/cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.jsona79f857c8c3c26e8257fc667f34d49e49667d3454f49ceed036d6b9617dbf584 spatial-workloads/v1/cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.bin42b81b526e150aad4f6a15e5cc7ba7d277fba122988156c4e118f8faadd8785c spatial-workloads/v1/cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.json6a39225a796c68850195aa9e77b394b207e0ade14496229ff808c01c77286b8b spatial-workloads/v1/cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.bin5fdaea6e59fafd1bcecd2d72da6bdfb1645a6cb2804b6b3ff8a3aeb263983793 spatial-workloads/v1/cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.jsonbdb7bed086a6ef3d5a9a0f06c617fa4b67f2aaceae66d49467a8679815079c43 spatial-workloads/v1/cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.bin19b43e37edac283c91906df67cdd18a49238aa2ac275790917bb8be9da4c5f4a spatial-workloads/v1/cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.json0a9e87fc4ae401b7c8c761b670e9e30fb8e2e5ec4d474985580555b02b0b6e7b spatial-workloads/v1/cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.bin133fb957197800a0ed821e9a4e0bdbac535b96d1a5cd792f8a2ee4bc7f49365d spatial-workloads/v1/cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.json8b77019849de900f3d5f6425be56af48e9ebb0c6bd7d21677fd23a1e93cf721b spatial-workloads/v1/cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.bin4fe180cdcc6d14f982266432e2b1b59df17b3991bb6f5a8b53c13dcf75166f3a spatial-workloads/v1/cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.jsonaf3b7696e04c272f97c4bf13329e06da8acf3ef752779e1b990fc4b7e4165181 spatial-workloads/v1/catalog.json71230865a86cc453ac9db74b18acf5309df211c98e47937d60bf27b8a8727f29 spatial-workloads/v1/checksums.sha25629f3841ac2e651931ea64dc54667dce8ff416e58da8d234c4d3b88638b32bf9c spatial-workloads/v1/code-provenance.json2585e060c231d981f165824896ed65389c5c04c36def65f02e20532141b5063b spatial-workloads/v1/generation-spec.json3b68f5446a7d407c09514e8081f7e09411d1271cbbe415556025a640708518f6 spatial-workloads/v1/partitions/k128-seed42/assignments.u328b918c8e00600ec03e565c5e1ce9b7a324d21ebcc0d129f4e5e2075660c7d877 spatial-workloads/v1/partitions/k128-seed42/centroids.fbinabe6ef6ba3119b480f45fde41a52eab8c5b1d13631b402dc63878fab40f20543 spatial-workloads/v1/partitions/k128-seed42/partition.json49a52421492b803544f01575b7c9a96c76a7ed39271ab9353558b9b5028b606c spatial-workloads/v1/partitions/k128-seed42/query_assignments.u3273850d5d4beffa66fcb331c407a9ac64703a403b659e56887795570195b7d0fe spatial-workloads/v1/partitions/k128-seed42/training_source_ids.u325352ee47e6e0bc687f79af633bf53b61f4bcd958644cc0ee567539d5748892d6 spatial-workloads/v1/plan.jsonf5adf71ee42604d49b0eaa261b64a575b5971b4271eaefefbb9918939efe790a spatial-workloads/v1/requirements.txt81ef6ebf171e1148d6550b3d20f99b78952e65eceb327246051731cd6ee730b8 spatial-workloads/v1/tools/cxl/derive_concurrent_manifest.py284572d32ec143b7f51e6716dfe4b01669a576d99c9198e030ef5efa8e51458e spatial-workloads/v1/tools/cxl/materialize_concurrent_batch_update.py55c326ae4f71e63a402851fc744e2a287b5d031a87f246567286b4d956f2818b spatial-workloads/v1/tools/evaluation_runners/configs/deep100.json9342db9244643ca971d84e405435117579e4b0204e6a9bd875cff393965bcdca spatial-workloads/v1/tools/evaluation_runners/e1.py0b9b4e8143f608773bf687a09553a18377d11495168ae357ae62dddaf5ac7270 spatial-workloads/v1/tools/evaluation_runners/e2.pyb12e15b00f867267b357de7db578656f1c2811fc6e81e66272c8fbce0c7d2e4f spatial-workloads/v1/tools/evaluation_runners/e6.py349a77a32a74506c00cc43a4b4007706055330889395541a6dbc2c3084b8def6 spatial-workloads/v1/tools/evaluation_runners/prepare_spatial_config.py03a69485ce73254352436ff51cada5c9a78880a35a52e240ccb4aba0b9206fcb spatial-workloads/v1/tools/evaluation_runners/runner.pycbd4040c3ea1b87823805d96b49e973f761aca37584ea5189a87ddb08545f749 spatial-workloads/v1/tools/generator/spatial_common.py0693e91d18389442fd98d76a7438bd2e959200eea6a780c74077c36156a002b0 spatial-workloads/v1/tools/generator/spatial_groundtruth.pyd4763d5918ed4b0630d9f013b4269de2746e237f53a4eedbdc65aca8ce7c8b02 spatial-workloads/v1/tools/generator/spatial_partition.py86e39bd83b69ee8fa0fc10428dc48371b62e3538ec1d674686288f3ecb052f6c spatial-workloads/v1/tools/generator/spatial_workload.py4cc0af40a2ce20eb2cd0a18954d647640800301ce220e3218b200295ba9a005e spatial-workloads/v1/tools/generator/stage_release.py3c32551ce6c98009bc94b81fe287f9c94ed736d78950443de6140e156d473eff spatial-workloads/v1/tools/generator/verify_spatial_consumers.pybbf3dc57d7dcee84e239cc0c25287ee8256fc02259d7c91c60a9bbc8f945c3a3 spatial-workloads/v1/workloads/delete-hot/groundtruth/initial.bin5aeedf5eafe810a3ea6006a74d511d4a985cdbe2e95684b6522940b55e648ec8 spatial-workloads/v1/workloads/delete-hot/plan.json75bfc783f74e3322fb0d9053714566f0a9dba646a4b04a2b3f527af7970b7686 spatial-workloads/v1/workloads/delete-hot/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e spatial-workloads/v1/workloads/delete-hot/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 spatial-workloads/v1/workloads/delete-hot/queries/query_refs.u32e336b2103179c7bb9ca271b7bb53ed9b49bfc81ecdde79159f0f0a95aad23f71 spatial-workloads/v1/workloads/delete-hot/spec.jsond216f20eaffd03ca7811a30311d9b6ab379d6e128ca5f14803cce17af3c6e807 spatial-workloads/v1/workloads/delete-hot/streams/delete_ids.u32169871c7f0628e75b643de65688c4977ae010299ff840821596e74671c458f91 spatial-workloads/v1/workloads/delete-hot/traces/delete-hot/batches/batch_0001.jsona3dacd9b244e326e5dc8eb35296e849bea7dd2f36372ade5c58e5185b2aaa049 spatial-workloads/v1/workloads/delete-hot/traces/delete-hot/groundtruth/checkpoint_0001.binafea38c57bc2c61a4119cc40132b8414618bc2aaf720cd7fac59e50d6df20c1b spatial-workloads/v1/workloads/delete-hot/traces/delete-hot/trace.json754b577478eb5e75f55c5242a751fb1a8068897a1fce143bae07f4ce59781cf7 spatial-workloads/v1/workloads/delete-hot/validation.jsonb485a90d492885f7a3d5834593b38f2b91f1e661ca70f7234193a3fd6050f503 spatial-workloads/v1/workloads/delete-hot/workload.jsonbbf3dc57d7dcee84e239cc0c25287ee8256fc02259d7c91c60a9bbc8f945c3a3 spatial-workloads/v1/workloads/delete-uniform/groundtruth/initial.bin59e3d918fa91c607be57e74f083039eac2d37206ef283f1586803feb1f8ba51b spatial-workloads/v1/workloads/delete-uniform/plan.json91f7d9f1cf48b563bf441c32e7f5fa6125df273308348bbc7dd1a0eaa1d6a1bb spatial-workloads/v1/workloads/delete-uniform/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e spatial-workloads/v1/workloads/delete-uniform/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 spatial-workloads/v1/workloads/delete-uniform/queries/query_refs.u3272de57db2f053f06d5b2df1ab16967e2316e13be754cbf10a548b3ebb2b6b5c2 spatial-workloads/v1/workloads/delete-uniform/spec.json983d2da109e19a194fe7bb42670dbe4c73118c36d9e648776dca64cde16715ea spatial-workloads/v1/workloads/delete-uniform/streams/delete_ids.u323a1eb30479ca3e3759e44fc15167f9a2eaaad38fb8c5fe719565c6c5c475daff spatial-workloads/v1/workloads/delete-uniform/traces/delete-uniform/batches/batch_0001.json2eb75e23f58dd7ff1824230a736fe781f1e5aa3507746a7878b5514af1340506 spatial-workloads/v1/workloads/delete-uniform/traces/delete-uniform/groundtruth/checkpoint_0001.bin7f38ff520ca1a901573b5eb1b2e2b26649a2b2bc5f61d20903b29d8ea3840a63 spatial-workloads/v1/workloads/delete-uniform/traces/delete-uniform/trace.jsonfa22470561fa9cd25c17c5a875cd56957b3f21616dccf496d011ffb56e19c5f9 spatial-workloads/v1/workloads/delete-uniform/validation.json763f24629e91ca81cadc076dde2a968255e7c1339e6d0b084e98047436cfee10 spatial-workloads/v1/workloads/delete-uniform/workload.json2f3b96a70462a4a3324a35d31e202d6d649089022e29536473b7649352e18443 spatial-workloads/v1/workloads/insert-hot/groundtruth/initial.bin34f3f6d80fcf7ddedf7d2849647cbe130a6155e61ee5372174b38d78dc20b4f0 spatial-workloads/v1/workloads/insert-hot/plan.json1c971affa9f872b43428cb0965900ff2d64de7ad0c1b8f4102d23d6cfbdb526f spatial-workloads/v1/workloads/insert-hot/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e spatial-workloads/v1/workloads/insert-hot/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 spatial-workloads/v1/workloads/insert-hot/queries/query_refs.u32a48a6aa48ba7ee643685d3c72bf35cb51d2c75eee5952bf47d34545f9d264ca1 spatial-workloads/v1/workloads/insert-hot/spec.json2ea95525aad57a3d259ce3a225dd33d99ad46fc02e91e2decf0660b9295b5685 spatial-workloads/v1/workloads/insert-hot/streams/insert_ids.u32a3693d5fca97bc14db60e1dfef2e77554a47a081010e532c58b2d6a98829af84 spatial-workloads/v1/workloads/insert-hot/streams/insert_refs.u320225f980c33be4807c8aefd0a38ec729d987f1c29f62a270e07e605766ac533d spatial-workloads/v1/workloads/insert-hot/traces/insert-hot/batches/batch_0001.jsoneddc89c271f59f8a79a727c59942306323e9236d3e8f85ab66953e9353257d0c spatial-workloads/v1/workloads/insert-hot/traces/insert-hot/groundtruth/checkpoint_0001.bin4e3bd05a1003192d89086150eb42e1868411d4aa5aceb52ea1312c196604490b spatial-workloads/v1/workloads/insert-hot/traces/insert-hot/trace.json235bf4873efba223379135e641d05df8e9e46964428280f5d04366954d80cc67 spatial-workloads/v1/workloads/insert-hot/validation.jsonc039059ae51da1152f3538d9bc542db806c10739e9f2a7992e7a6f186dc98b2d spatial-workloads/v1/workloads/insert-hot/workload.json2f3b96a70462a4a3324a35d31e202d6d649089022e29536473b7649352e18443 spatial-workloads/v1/workloads/insert-uniform/groundtruth/initial.bin24d73319e92ebc0239a414f9fa253a7015013127cd0c3269125967f984d5c273 spatial-workloads/v1/workloads/insert-uniform/plan.jsond576ecc5e49776672e79e22d95c6204ee1f3171a9830579538b56ea4be6302c4 spatial-workloads/v1/workloads/insert-uniform/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e spatial-workloads/v1/workloads/insert-uniform/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 spatial-workloads/v1/workloads/insert-uniform/queries/query_refs.u3217b4ba59cf474c4e00b2f14cc9ec3779dad3d5ae1d4f61bfc4b8516551c4e766 spatial-workloads/v1/workloads/insert-uniform/spec.json7645185e472fdb701373f88c738d6e0c1fb76ac972c8c9f85eefc15cd6b7ad33 spatial-workloads/v1/workloads/insert-uniform/streams/insert_ids.u32eb8f64166af30085990c173b69f9ccdfea86c8356758942bf4f739f1c6b37b36 spatial-workloads/v1/workloads/insert-uniform/streams/insert_refs.u3274fe30a38252827ac5165367a2be4628b0ba5603f59804b1a6483d63ea3b9197 spatial-workloads/v1/workloads/insert-uniform/traces/insert-uniform/batches/batch_0001.jsonfe23c7f1dbf05d03611596ed201a19a5f4120e50e8207a044eb5952926d02934 spatial-workloads/v1/workloads/insert-uniform/traces/insert-uniform/groundtruth/checkpoint_0001.bin6b09d9f4c201867a385a79a089c062492a47166af281f2b9a497f3e129d7247d spatial-workloads/v1/workloads/insert-uniform/traces/insert-uniform/trace.json029db1070342882d6c2b55ff3484a92f4289eafabe53e4724265a5b1936b5d14 spatial-workloads/v1/workloads/insert-uniform/validation.jsonf20685dd093e6b0a89bc85e8bcda17434264c8d57c378a6fcfef2cd3bf57af22 spatial-workloads/v1/workloads/insert-uniform/workload.json2f7e3141edebde6835bf852f96ca843e9fbd681e7805a0d1889f1be04eb30825 spatial-workloads/v1/workloads/mixed-shared-hot/groundtruth/initial.binda4ef8337bfbe7052b9a52d937d56539ce862e7a2e0b73aca682ad3f4894d00e spatial-workloads/v1/workloads/mixed-shared-hot/plan.jsonf929c5bf261963c1ed9455ee44a4751a5abb38cdb75fd91036ae258a39d1a2ea spatial-workloads/v1/workloads/mixed-shared-hot/profile.json02faddd953193940ce5ac1891b728cb6723081c52ec469e3bc120b2dde90c267 spatial-workloads/v1/workloads/mixed-shared-hot/queries/queries.fbind2cabea8772e5d9f8c17eda6ea2347882a9d297fff8c1ce7d8f45f941929ffd6 spatial-workloads/v1/workloads/mixed-shared-hot/queries/query_refs.u324ca84a8267511fdb97f213f39a691c2ddddd68f3637bc0d18f0bb8e2402644e0 spatial-workloads/v1/workloads/mixed-shared-hot/spec.jsone100d8bde88c333332d452d54ce45fe11ffb2ebfa7ac0b9ca1927efa060f0d22 spatial-workloads/v1/workloads/mixed-shared-hot/streams/delete_ids.u32e7f9407e6db8cda2586ce8837561cdfdee3b2df59299cc75eb04dd5129481c1c spatial-workloads/v1/workloads/mixed-shared-hot/streams/insert_ids.u32524dd65d2597536409230995f0dc9db2676085cf8420649e3f820b30aef48202 spatial-workloads/v1/workloads/mixed-shared-hot/streams/insert_refs.u321c886fce94c360b3ba0c5b3ab63e0444a5650d5283971d357a9ac5136ab1ac8c spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/batches/batch_0001.json696ae063c19f51d4859f388381f5d2fb7d5938d9cf2da567adc82a6f9007ff23 spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/batches/batch_0002.jsone4eece8a7f04add213da00ce0d8aeb8a58b0b6a374434365d70d3b153cdf9810 spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/batches/batch_0003.jsond1f54f507c4e490162301c0ce835787bed836ba66a5ec94cc2f464149b3a291b spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/groundtruth/checkpoint_0001.bin42b4cf74e060cc281d57710e33b03d9de21937d7fd7291647b97a2ea7f4b5acf spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/groundtruth/checkpoint_0002.bin6b88fc4434adfd26fac1f37398ddbcacc276ac11b3367555e6b61542b79ce924 spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/groundtruth/checkpoint_0003.bincf90c4aa870695cb584a6989477aa4c85108c6124f8545cd2a0c345edf7cdd52 spatial-workloads/v1/workloads/mixed-shared-hot/traces/mixed-shared-hot/trace.json0653bdb6d7ae8b0408e0c601f57767da5b423f8242a023dfb9fa8336560fa35d spatial-workloads/v1/workloads/mixed-shared-hot/validation.json67f3bd5183f4cd69ab57c4dbe71afc58783e6459ebc0ea884f754ffff3c80052 spatial-workloads/v1/workloads/mixed-shared-hot/workload.json4cc191dc98c1926739bb4c28b43b7c72d304fd2b10069f0480f3102009ce567b spatial-workloads/v1/workloads/mixed-uniform/groundtruth/initial.bin42e02c30c8da440c972aabcc5ac2db25cfe1a83900dfac9309c5b128fded9b74 spatial-workloads/v1/workloads/mixed-uniform/plan.json1f5ccd0fcc57c38f59ee5960d71a1f4b38951566e3cff3e4e38e53814df25d4a spatial-workloads/v1/workloads/mixed-uniform/profile.jsonfcc5402274a5679f9cbbb65d9aa77e6bf5aa1b2512dccbcbcd51bcf2308cb8d3 spatial-workloads/v1/workloads/mixed-uniform/queries/queries.fbinc8b36454e30ae5167377b9723ed1eb1f8dffe6db680d66862dd10429d13a14f9 spatial-workloads/v1/workloads/mixed-uniform/queries/query_refs.u323b32b072b8fc883b4cfb7c7edd51d9533a77773176f4223dfe8f6408fa65afde spatial-workloads/v1/workloads/mixed-uniform/spec.jsona493493fda91aafab5333843afa5d4b742d6aef49ec1629c1cc5e8bcabff1c0b spatial-workloads/v1/workloads/mixed-uniform/streams/delete_ids.u32fba0903e5198441a698c07af803089d87d158a84ae5c47ba5f7b95a2c1b8ca5e spatial-workloads/v1/workloads/mixed-uniform/streams/insert_ids.u3202546a8f23a5bbf7dd0fedc5c3b19e1e3a08687c90ddd1b71e65df57bac09e09 spatial-workloads/v1/workloads/mixed-uniform/streams/insert_refs.u32cd70aa375ade4b8935448f7efb7f259c40818c25c84410bccbcffc11724b0451 spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/batches/batch_0001.jsona0b175f34b5be6a8fdf2c4a71ee5692bc4562f1b4ac93bec7140cf5997d820e3 spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/batches/batch_0002.jsonc52f3bb89beea25e7339844605049668c5f550585bc73824e942eb6280109aaf spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/batches/batch_0003.json0506231e994c847947961848fd20b417745db176662321dabb399270390bd05c spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/groundtruth/checkpoint_0001.bin3765877ed824f102d5e613f5ebcfc843a1018f98f6a46f09043f5f270f94ed8f spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/groundtruth/checkpoint_0002.bin5c43e19ae18aabf216c2da27f405345228ebc61e53af5f1fde636ce1de95f7fa spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/groundtruth/checkpoint_0003.bina8df857f8411b3f9f8f864f31c578e75ff9c8b50d835f800fec1a228e800f83f spatial-workloads/v1/workloads/mixed-uniform/traces/mixed-uniform/trace.json583fc0619a8ab7335411a9e68ae3bf397fbd3a4a9a2e174b4d47af68c2866e1a spatial-workloads/v1/workloads/mixed-uniform/validation.jsonb481dd233729c74e493bdd7494358e3cf86cd6eb2f87cb4f5ad50e7c8bd306c6 spatial-workloads/v1/workloads/mixed-uniform/workload.json4cc191dc98c1926739bb4c28b43b7c72d304fd2b10069f0480f3102009ce567b spatial-workloads/v1/workloads/mixed-update-hot/groundtruth/initial.bin62dae8c05c6fd5c080108876b5dd4909e6e5481bb0ced297f696b5ade9156770 spatial-workloads/v1/workloads/mixed-update-hot/plan.jsona1595bbeca15b20f2d450d28699745e172d7621fdde731d625dd4bb6feb77f04 spatial-workloads/v1/workloads/mixed-update-hot/profile.jsonfcc5402274a5679f9cbbb65d9aa77e6bf5aa1b2512dccbcbcd51bcf2308cb8d3 spatial-workloads/v1/workloads/mixed-update-hot/queries/queries.fbinc8b36454e30ae5167377b9723ed1eb1f8dffe6db680d66862dd10429d13a14f9 spatial-workloads/v1/workloads/mixed-update-hot/queries/query_refs.u326702d3b84f24295b58de2e2c787676a06dc4f67df394fb62b524b61edd84f088 spatial-workloads/v1/workloads/mixed-update-hot/spec.jsone100d8bde88c333332d452d54ce45fe11ffb2ebfa7ac0b9ca1927efa060f0d22 spatial-workloads/v1/workloads/mixed-update-hot/streams/delete_ids.u32e7f9407e6db8cda2586ce8837561cdfdee3b2df59299cc75eb04dd5129481c1c spatial-workloads/v1/workloads/mixed-update-hot/streams/insert_ids.u32524dd65d2597536409230995f0dc9db2676085cf8420649e3f820b30aef48202 spatial-workloads/v1/workloads/mixed-update-hot/streams/insert_refs.u32bd8fdb8db21b35923e6454d0cd1dc47679a805d46da34f810ec2f8cd65915ef6 spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/batches/batch_0001.json1b6fee9d4d78f39baf6e7970721364fe84382bdf725ba9f4bd49c68427b114cd spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/batches/batch_0002.json096dabd915fc7b222567fd1d76b003150b2e57332aaa9d0d1733e7acb54eccc7 spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/batches/batch_0003.json689d4eceee9abdb03b2ad15b0d5cb3fae619b5b1b1b13633782ef8a37bc121bd spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/groundtruth/checkpoint_0001.bin24d40d4367109eb5b1c8760518e46bc62bfc2d162b64d1df3ff240c4e73af623 spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/groundtruth/checkpoint_0002.bined74a258093ac6c8e17af6c92bed512ec728b1ae18fbf0f679a53019be9987c1 spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/groundtruth/checkpoint_0003.bin79ba8d5424a3689b5fe6bbf668a3301db70a8a3d72357b1f8037c4484478e188 spatial-workloads/v1/workloads/mixed-update-hot/traces/mixed-update-hot/trace.jsonc55ee0452c57f96078656f3a0289070fc57581014e2d0cdc6870bcf2f775de43 spatial-workloads/v1/workloads/mixed-update-hot/validation.jsonfdeaf645db887856ab9c91e9ee5283eda6451ee150a7c7ec2d1d25336c0ea48f spatial-workloads/v1/workloads/mixed-update-hot/workload.json1a851806c69474054b0c0cdc20297e686280f1606b368ed83c5870e954fc9a7f spatial-workloads/v1/workloads/query-hot/groundtruth/initial.bin341ad34db11c474b8a75889c3e0899d7cabe0f6500b1402533c9269d6dd851bc spatial-workloads/v1/workloads/query-hot/plan.jsonc7584185831d610f4a378bf0e796f071462c3abd9873c1aee1e2d5b690153dfe spatial-workloads/v1/workloads/query-hot/profile.json02faddd953193940ce5ac1891b728cb6723081c52ec469e3bc120b2dde90c267 spatial-workloads/v1/workloads/query-hot/queries/queries.fbind2cabea8772e5d9f8c17eda6ea2347882a9d297fff8c1ce7d8f45f941929ffd6 spatial-workloads/v1/workloads/query-hot/queries/query_refs.u326f9cdfbb75c1a8da8ede369006e2779b113da1be5b51f061473da56dc393aadc spatial-workloads/v1/workloads/query-hot/spec.jsonbffe9c94733e4607b21e361675ed51a04a50d31ddbe6b0d96991937c03976852 spatial-workloads/v1/workloads/query-hot/validation.json23ecf08523b50728398358055263167541a4671f46705664b6b591a364645fc3 spatial-workloads/v1/workloads/query-hot/workload.json2f2f35ca838119f8753d11216e691d885c7e4e4e385e7eb1c88b031a19f60097 spatial-workloads/v1/workloads/query-uniform/groundtruth/initial.bin13075df6e6211d8087a6ff53b3aa402883facfcd7dbfe3e3790184f3133bce61 spatial-workloads/v1/workloads/query-uniform/plan.jsone4c60a42de88de2ad8070cf50312782c717c703238c464f1c77ae81bd77144ae spatial-workloads/v1/workloads/query-uniform/profile.jsonfcc5402274a5679f9cbbb65d9aa77e6bf5aa1b2512dccbcbcd51bcf2308cb8d3 spatial-workloads/v1/workloads/query-uniform/queries/queries.fbinc8b36454e30ae5167377b9723ed1eb1f8dffe6db680d66862dd10429d13a14f9 spatial-workloads/v1/workloads/query-uniform/queries/query_refs.u32df6c4ef44152c293f4d0aa89f0c576b84a4b23d62a9a0fb662e967f2b604ee57 spatial-workloads/v1/workloads/query-uniform/spec.jsonbdd37876dca3b256834e2534e57811e298ca9a3b743d261199a23765f50ac6c7 spatial-workloads/v1/workloads/query-uniform/validation.jsonb6a5bdd4692bbf15149d700d706e5a4b5562d2133c99a0e18566313fd933ac1b spatial-workloads/v1/workloads/query-uniform/workload.json4a5b8cc43e59f4987874c91e22a9d9a08a001c7997f39141cc6c336d082cc2a2 spatial-workloads/v2/README.md5a085d3112223d5f6cdfbe301fa46313df0eb531179c6e963fcc89ff137372bc spatial-workloads/v2/cache/groundtruth/1110ca435215baa04437de490e5a0696b6f992a733397608f13f71af09d4d8e8.binba0e19c62867009580548c681cc7a3948f1d3994af63d8a8fcd98160104fa8eb spatial-workloads/v2/cache/groundtruth/1110ca435215baa04437de490e5a0696b6f992a733397608f13f71af09d4d8e8.json11dc06300369e447708f48fb7f74d1fc27cbcd883b8ec3ae39dc0717eb1b1d29 spatial-workloads/v2/cache/groundtruth/1263038ce4bc0da4f543052eae3785f01c37a17170f0d6bfbed2bd066e7b72fe.bin21 unmodified lines99cf33db5213342df68e6777e56c09ccc4f18b4c1795588b31346fa967dc5eab spatial-workloads/v2/cache/groundtruth/f1c60e62c92545242bcbda461fa59e223b49401de578ce1c85ead51b339d0f79.bin550de07f4ab1259c5827d900356cbe28dcec845d0b7c9fb556ce5fee90c30b37 spatial-workloads/v2/cache/groundtruth/f1c60e62c92545242bcbda461fa59e223b49401de578ce1c85ead51b339d0f79.json8cb99e227b429a188b598198e78b3a27996d005a643e97266d113678d41dd50c spatial-workloads/v2/catalog.jsond3b4168f6cbbfbbf46d4388c79eb15680cfd1c932b4d61555492a7597318cd2b spatial-workloads/v2/checksums.sha256db5bfec1875cd695c38ab2de4c8c1393e76014692a56bdd36cb12a7923e44f31 spatial-workloads/v2/code-provenance.json8cd57b62419783be8dc1ea0399353b68a8561f549b169df95698271b8ddd0bc4 spatial-workloads/v2/generation-spec.json3b68f5446a7d407c09514e8081f7e09411d1271cbbe415556025a640708518f6 spatial-workloads/v2/partitions/k128-seed42/assignments.u328b918c8e00600ec03e565c5e1ce9b7a324d21ebcc0d129f4e5e2075660c7d877 spatial-workloads/v2/partitions/k128-seed42/centroids.fbin16 unmodified lines0693e91d18389442fd98d76a7438bd2e959200eea6a780c74077c36156a002b0 spatial-workloads/v2/tools/generator/spatial_groundtruth.py4c81e1bf4389ec94e9667726f8dd8c58801d2c532d55786a9d6d750d2ae99a39 spatial-workloads/v2/tools/generator/spatial_partition.py063040be52c4ecdee3c272eff97629a2506cf6c5ea6ca36d7526afb9de1ad35f spatial-workloads/v2/tools/generator/spatial_workload.py079ae40ecd6ab2514c6ff600e425008e77c48079528c8ddaee5cc9779481ce48 spatial-workloads/v2/tools/generator/stage_release.py3c32551ce6c98009bc94b81fe287f9c94ed736d78950443de6140e156d473eff spatial-workloads/v2/tools/generator/verify_spatial_consumers.pybbf3dc57d7dcee84e239cc0c25287ee8256fc02259d7c91c60a9bbc8f945c3a3 spatial-workloads/v2/workloads/delete-hot/groundtruth/initial.bin462ce413370c1f5e1950c3f55783c5e9797cfc981ff679e9b7b8706c3a7c6886 spatial-workloads/v2/workloads/delete-hot/plan.json123414 unmodified lines1920212223242521 unmodified lines474849505152535416 unmodified lines71727374757677d899d27b949c6701bc36c3afb2acc525c0f6fceba64e77c811e181c7d2b94b7c README.md1c8bf71f320a52e763ba1fa1168d88dbd45f5b36ce74cf2fa71d7bdc399eba93 base_permuted.fbin0a105a680b67a49588dd9c889fcfc4f32a724d18883c88d5064e8061df232644 groundtruth/active_80m.bin5793ba574761e11c41087eb1e9e7b1e232350af3c6f17c5c18ed071b05e56031 groundtruth_manifest.json14 unmodified linescbdf00b2bb52fd734dd2fd9b72a0acfc3d5d3006a4f1d630596fa6aa84befbb5 initial_pq_manifest.jsonc33bcf46d80fbe91f66bb3f480769e39613fd3f490b528732c330e1253f79025 reordered_insert_manifest.json4a36d2c637cf2baaf733fff385f112f99af18f0f115708b5342d52eb6d08a4ec source_manifest.json541347cf90b744148590cee6010f734384c55a7af0ad5a60cd518ed63834ba25 spatial-workloads/v2/README.md5a085d3112223d5f6cdfbe301fa46313df0eb531179c6e963fcc89ff137372bc spatial-workloads/v2/cache/groundtruth/1110ca435215baa04437de490e5a0696b6f992a733397608f13f71af09d4d8e8.binba0e19c62867009580548c681cc7a3948f1d3994af63d8a8fcd98160104fa8eb spatial-workloads/v2/cache/groundtruth/1110ca435215baa04437de490e5a0696b6f992a733397608f13f71af09d4d8e8.json11dc06300369e447708f48fb7f74d1fc27cbcd883b8ec3ae39dc0717eb1b1d29 spatial-workloads/v2/cache/groundtruth/1263038ce4bc0da4f543052eae3785f01c37a17170f0d6bfbed2bd066e7b72fe.bin21 unmodified lines99cf33db5213342df68e6777e56c09ccc4f18b4c1795588b31346fa967dc5eab spatial-workloads/v2/cache/groundtruth/f1c60e62c92545242bcbda461fa59e223b49401de578ce1c85ead51b339d0f79.bin550de07f4ab1259c5827d900356cbe28dcec845d0b7c9fb556ce5fee90c30b37 spatial-workloads/v2/cache/groundtruth/f1c60e62c92545242bcbda461fa59e223b49401de578ce1c85ead51b339d0f79.json8cb99e227b429a188b598198e78b3a27996d005a643e97266d113678d41dd50c spatial-workloads/v2/catalog.jsonf9409442df40d248b0e6c587d0e9339eaeb197a54e999bac3b9477dbe0423e5e spatial-workloads/v2/checksums.sha256ce0a6cf81901d23e9a99dd8b8d52367c5d3d64dd7eb235e5ed24a3c6e80e15ae spatial-workloads/v2/code-provenance.json8cd57b62419783be8dc1ea0399353b68a8561f549b169df95698271b8ddd0bc4 spatial-workloads/v2/generation-spec.json3b68f5446a7d407c09514e8081f7e09411d1271cbbe415556025a640708518f6 spatial-workloads/v2/partitions/k128-seed42/assignments.u328b918c8e00600ec03e565c5e1ce9b7a324d21ebcc0d129f4e5e2075660c7d877 spatial-workloads/v2/partitions/k128-seed42/centroids.fbin16 unmodified lines0693e91d18389442fd98d76a7438bd2e959200eea6a780c74077c36156a002b0 spatial-workloads/v2/tools/generator/spatial_groundtruth.py4c81e1bf4389ec94e9667726f8dd8c58801d2c532d55786a9d6d750d2ae99a39 spatial-workloads/v2/tools/generator/spatial_partition.py063040be52c4ecdee3c272eff97629a2506cf6c5ea6ca36d7526afb9de1ad35f spatial-workloads/v2/tools/generator/spatial_workload.py177e1b2cf546be4a3accd996909ddcbf341ee9d866c213c0030dc2d417d5290a spatial-workloads/v2/tools/generator/stage_release.py3c32551ce6c98009bc94b81fe287f9c94ed736d78950443de6140e156d473eff spatial-workloads/v2/tools/generator/verify_spatial_consumers.pybbf3dc57d7dcee84e239cc0c25287ee8256fc02259d7c91c60a9bbc8f945c3a3 spatial-workloads/v2/workloads/delete-hot/groundtruth/initial.bin462ce413370c1f5e1950c3f55783c5e9797cfc981ff679e9b7b8706c3a7c6886 spatial-workloads/v2/workloads/delete-hot/plan.json
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667# DEEP100M fixed spatial hotspot workloads (v1)
Derived workloads for the existing DEEP100M static and initial-80M indexes. All CNs share one fixed hotspot for each complete run. Clustering controls input sampling; operations still access the shared HNSW graph.
The hotspot contains **5,388,897 vectors (5.388897%)**, **1,078,071 fresh insert candidates**, and **557 official query vectors**. Its cluster IDs are `[22, 0, 111, 59, 122, 121, 127]`.
Hot streams draw 80% of their inputs from this region and 20% from its complement. Insert/delete IDs are unique across a run. Inserts use the fresh bank; deletes use initially live vectors. Queries may repeat. Uniform controls sample eligible vectors globally.
| Profile | Initial state | Logical queries | Inserts | Deletes || --- | --- | ---: | ---: | ---: || [query-uniform](workloads/query-uniform/profile.json) | static-100m | 500,000 | 0 | 0 || [query-hot](workloads/query-hot/profile.json) | static-100m | 500,000 | 0 | 0 || [insert-uniform](workloads/insert-uniform/profile.json) | initial-80m | 500,000 (checkpoints) | 500,000 | 0 || [insert-hot](workloads/insert-hot/profile.json) | initial-80m | 500,000 (checkpoints) | 500,000 | 0 || [delete-uniform](workloads/delete-uniform/profile.json) | static-100m | 500,000 (checkpoints) | 0 | 1,000,000 || [delete-hot](workloads/delete-hot/profile.json) | static-100m | 500,000 (checkpoints) | 0 | 1,000,000 || [mixed-uniform](workloads/mixed-uniform/profile.json) | initial-80m | 21,600,000 | 600,000 | 600,000 || [mixed-update-hot](workloads/mixed-update-hot/profile.json) | initial-80m | 21,600,000 | 600,000 | 600,000 || [mixed-shared-hot](workloads/mixed-shared-hot/profile.json) | initial-80m | 21,600,000 | 600,000 | 600,000 |
Mixed profiles use 36:1:1 Q/I/D and three 200K-pair segments, with a 200K acknowledged-deletion threshold and final maintenance enabled. The two mixed hot profiles have identical updates; only their query distribution differs. Query hot quotas describe the stored 500K-row cycle; a partial final cycle can slightly change the execution fraction.
## Inputs and identity
- Static: [Odeinjul/deep-100m-static-search-eval](https://huggingface.co/datasets/Odeinjul/deep-100m-static-search-eval/tree/567847cb68fa512676e77aa84a977311593560a9) (`567847cb68fa512676e77aa84a977311593560a9`).- Update: [Odeinjul/deep-100m-batch-update-eval](https://huggingface.co/datasets/Odeinjul/deep-100m-batch-update-eval/tree/9956c8a4aa36f58f9607222fc8fc261591fe32b2) (`9956c8a4aa36f58f9607222fc8fc261591fe32b2`).
Large base/insert vectors, indexes, and PQ files are referenced, not duplicated here. `source_identities` records their trusted package hashes and sampled fingerprints. `assignments.u32` is indexed by original source ID. Insert `vector_refs` index `base_permuted.fbin` through the inverse update permutation. PQ stays aligned with the corresponding HNSW internal IDs.
## Use and reproduce
The `tools/` directory includes the generator and reviewed Python runtime adapters. `code-provenance.json` identifies these exact sources. Existing C++ binaries require no hotspot-specific change. Use the included materializer/derive adapters in your vectordb-cxl checkout; the original materializer does not separate workload and vector roots.
From this directory, with the original static/update packages installed:
```bashpython tools/generator/spatial_workload.py validate --config generation-spec.json \ --static-root /path/to/static --update-root /path/to/update --output .python tools/evaluation_runners/prepare_spatial_config.py \ --profile workloads/mixed-shared-hot/profile.json \ --base-config tools/evaluation_runners/configs/deep100.json \ --static-root /path/to/static --update-root /path/to/update \ --output /tmp/deep100-mixed-shared-hot.json```
With a configured CXL checkout and built binaries, install the two `tools/cxl/` adapters into its `scripts/datasets/general/` directory, then plan the mixed campaign with the packaged entry point:
```bashexport VECTORDB_CXL_ROOT=/path/to/vectordb-cxlpython tools/evaluation_runners/e6.py plan \ --config /tmp/deep100-mixed-shared-hot.json \ --campaign-root /tmp/deep100-spatial-campaign```
The same snapshot includes `e1.py` for query profiles and `e2.py` for insert/delete profiles (select `--workload insert` or `--workload delete`). Cluster execution uses the selected checkout's existing launcher and readiness tools.
To regenerate into another directory, run the generator's `partition`, `plan`, then `generate` commands with the same configuration and `--threads 16`. `requirements.txt` pins the generation environment.
## Validation and limits
Each workload includes `validation.json`. Validation checks every selected insert payload against its original vector, legal/unique update IDs, hot quotas, query payload order, and every checkpoint GT row. Exact GT uses the actual live set; exhausted static top-100 prefixes trigger a full exact scan for affected queries. GT is never padded.
Run `sha256sum -c checksums.sha256` here after downloading. Runtime configs and manifests are generated locally because they contain machine paths. Update counts are bound to their checkpoint GT and cannot be truncated without regeneration.
These artifacts establish spatially concentrated inputs and parser compatibility. They do not establish higher runtime conflict rates, throughput, or distributed correctness. Graph searches/repair can leave the input hotspot. Recall from hot queries is workload-weighted; it does not represent an independently executed global-query evaluation.
Original DEEP vectors are credited to Yandex under the source dataset's [CC BY 4.0 license](../../LICENSE).123version https://git-lfs.github.com/spec/v1oid sha256:4725d82f9a4e4e089c1e85ad28e063c61354b840edb68cf660429da0becdf454size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "4725d82f9a4e4e089c1e85ad28e063c61354b840edb68cf660429da0becdf454", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:df4dbc6b1c2066cfecd7f688ac52715c198b9888de4fcb620489a8086e7e40a5size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80500000, "metric": "l2", "min_live_source_candidates": 65, "path": "402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "df4dbc6b1c2066cfecd7f688ac52715c198b9888de4fcb620489a8086e7e40a5", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:0a105a680b67a49588dd9c889fcfc4f32a724d18883c88d5064e8061df232644size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "0a105a680b67a49588dd9c889fcfc4f32a724d18883c88d5064e8061df232644", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:b3c2be4f5cda0b7c2f06603423c9f6d0b3938e5374600c7ddb3785c23b17f91asize 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80500000, "metric": "l2", "min_live_source_candidates": 66, "path": "7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "b3c2be4f5cda0b7c2f06603423c9f6d0b3938e5374600c7ddb3785c23b17f91a", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:97afc7c866d8b3d48d1988910be52ac6aae882a089e693e6343a7772ef5323d7size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 99000000, "metric": "l2", "min_live_source_candidates": 76, "path": "873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "97afc7c866d8b3d48d1988910be52ac6aae882a089e693e6343a7772ef5323d7", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:f50098b67ec5d5dfb391a8d8c3661a4ba1859b999591bed500ba6ed3cfe4910csize 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "f50098b67ec5d5dfb391a8d8c3661a4ba1859b999591bed500ba6ed3cfe4910c", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:b2964fb30a8c821af00f5c178c2ea2803b053f11ac06b1152d84ef90a9ce67f0size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "b2964fb30a8c821af00f5c178c2ea2803b053f11ac06b1152d84ef90a9ce67f0", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:a79f857c8c3c26e8257fc667f34d49e49667d3454f49ceed036d6b9617dbf584size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 99000000, "metric": "l2", "min_live_source_candidates": 93, "path": "9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "a79f857c8c3c26e8257fc667f34d49e49667d3454f49ceed036d6b9617dbf584", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:6a39225a796c68850195aa9e77b394b207e0ade14496229ff808c01c77286b8bsize 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "6a39225a796c68850195aa9e77b394b207e0ade14496229ff808c01c77286b8b", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:bdb7bed086a6ef3d5a9a0f06c617fa4b67f2aaceae66d49467a8679815079c43size 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 100000000, "metric": "l2", "min_live_source_candidates": 100, "path": "c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "bdb7bed086a6ef3d5a9a0f06c617fa4b67f2aaceae66d49467a8679815079c43", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:0a9e87fc4ae401b7c8c761b670e9e30fb8e2e5ec4d474985580555b02b0b6e7bsize 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "0a9e87fc4ae401b7c8c761b670e9e30fb8e2e5ec4d474985580555b02b0b6e7b", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123version https://git-lfs.github.com/spec/v1oid sha256:8b77019849de900f3d5f6425be56af48e9ebb0c6bd7d21677fd23a1e93cf721bsize 4000081234567891011121314151617{ "fallback_distance_precision": "float64", "fallback_query_count": 0, "fallback_query_ids": [], "k": 10, "live_count": 80000000, "metric": "l2", "min_live_source_candidates": 65, "path": "fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.bin", "query_count": 10000, "schema": "spatial-checkpoint-groundtruth.v1", "sha256": "8b77019849de900f3d5f6425be56af48e9ebb0c6bd7d21677fd23a1e93cf721b", "source_filtered_query_count": 10000, "source_gt_contract": "trusted exact over full universe, same queries and metric", "source_gt_depth": 100, "tie_policy": "preserve source order; fallback distance then external ID"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151{ "dataset": "deep", "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "limitations": [ "Spatial input concentration does not guarantee graph-access conflicts.", "Queries can repeat; report unique query counts and workload-weighted recall.", "All profiles reuse existing shared HNSW/PQ artifacts; clustering only controls sampling." ], "partition": "partitions/k128-seed42/partition.json", "profiles": [ { "control": null, "id": "query-uniform", "kind": "query", "path": "workloads/query-uniform/profile.json", "validation": "passed" }, { "control": "query-uniform", "id": "query-hot", "kind": "query", "path": "workloads/query-hot/profile.json", "validation": "passed" }, { "control": null, "id": "insert-uniform", "kind": "insert", "path": "workloads/insert-uniform/profile.json", "validation": "passed" }, { "control": "insert-uniform", "id": "insert-hot", "kind": "insert", "path": "workloads/insert-hot/profile.json", "validation": "passed" }, { "control": null, "id": "delete-uniform", "kind": "delete", "path": "workloads/delete-uniform/profile.json", "validation": "passed" }, { "control": "delete-uniform", "id": "delete-hot", "kind": "delete", "path": "workloads/delete-hot/profile.json", "validation": "passed" }, { "control": null, "id": "mixed-uniform", "kind": "mixed", "path": "workloads/mixed-uniform/profile.json", "validation": "passed" }, { "control": "mixed-uniform", "id": "mixed-update-hot", "kind": "mixed", "path": "workloads/mixed-update-hot/profile.json", "validation": "passed" }, { "control": "mixed-uniform", "id": "mixed-shared-hot", "kind": "mixed", "path": "workloads/mixed-shared-hot/profile.json", "validation": "passed" } ], "schema": "spatial-workload-catalog.v1", "source": { "base": "base.fbin", "base_count": 100000000, "dtype": "float32", "groundtruth": "groundtruth.bin", "initial_count": 80000000, "insert_vector_order": "permuted", "insert_vectors": "base_permuted.fbin", "metric": "l2", "queries": "orig_query_10k.fbin", "static_hf": { "repo": "Odeinjul/deep-100m-static-search-eval", "revision": "567847cb68fa512676e77aa84a977311593560a9" }, "update_hf": { "repo": "Odeinjul/deep-100m-batch-update-eval", "revision": "9956c8a4aa36f58f9607222fc8fc261591fe32b2" }, "update_order": "update_order.u32" }, "source_identities": { "base": { "bytes": 38400000008, "file": "base.fbin", "package_sha256": "162cef480f030deead496c745b4214abc3fcbd9849c2561ab1251e84b6904ba4", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "bfb8d14cd9320dd206e9e165bf10ff5d70285beb9a6380622010a01abfee4094" }, "groundtruth": { "bytes": 8000008, "file": "groundtruth.bin", "package_sha256": "766d7e0e2ff81796f44adfc46e2cab98809c8e802b952063d7b8fa647697066f", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "5dd3bce8290ae748784916e9d62ec7bf4f0c19cfe40c652697d0ed807fcda761" }, "insert_vectors": { "bytes": 38400000008, "file": "base_permuted.fbin", "package_sha256": "1c8bf71f320a52e763ba1fa1168d88dbd45f5b36ce74cf2fa71d7bdc399eba93", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "648534790d99934dd9cbb697f299c36a698f80263c2d344180b786890305227f" }, "queries": { "bytes": 3840008, "file": "orig_query_10k.fbin", "package_sha256": "8438fc763f14e0f9741fda15b3e11215aef089ce17d1ad47d53b52a7c9fda5bb", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "a7afbec60a892eaf16eda71baca8f099e364eac84e27818a75bfe2f462e454c8" }, "update_order": { "bytes": 400000000, "file": "update_order.u32", "package_sha256": "88332fcfc0662b21c7283197570e8957baf89275e06b635b84a9647da71cdcad", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "5e8fa93c166c6c34714dc5a97d969a5d1b3895bb3fd50f8fdf66fde2190ac37f" } }}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681690262b930cd55a42336108545b8b2b17af79cee237a173b9f124da299d508adf9 README.md4725d82f9a4e4e089c1e85ad28e063c61354b840edb68cf660429da0becdf454 cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.binebd2f5852533b2f1c4bc90b4d7f2f87feca2649759461260ef06c72d7e4b4025 cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.jsondf4dbc6b1c2066cfecd7f688ac52715c198b9888de4fcb620489a8086e7e40a5 cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.bin174f25a58aad3d57c38db71a2684133cd6bf625a6fc6feb15678f5afaafe7ead cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.json0a105a680b67a49588dd9c889fcfc4f32a724d18883c88d5064e8061df232644 cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.bin363192ee85853529fa016c029dd51a5ccd5e58351c286806aea37ccebcd485c6 cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.jsonb3c2be4f5cda0b7c2f06603423c9f6d0b3938e5374600c7ddb3785c23b17f91a cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.bindba30c20f2ec43cc854d461b74c263e3858104acd7c6e0c3879eb53c3fa3e54a cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.json97afc7c866d8b3d48d1988910be52ac6aae882a089e693e6343a7772ef5323d7 cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.bin0123a0ad340f7db6967a5bd0edeabc954176db8bb9fca45d1c5cf9ef1987588d cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.jsonf50098b67ec5d5dfb391a8d8c3661a4ba1859b999591bed500ba6ed3cfe4910c cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.bine236e49f6baf00bd5969fb21ce8ca3d4acfe27047a1034d9ceb2777c42235828 cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.jsonb2964fb30a8c821af00f5c178c2ea2803b053f11ac06b1152d84ef90a9ce67f0 cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.bin881532cf320ae91ee066472418f1190c418a79dcd2e7524e7485d7dbfd5105ca cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.jsona79f857c8c3c26e8257fc667f34d49e49667d3454f49ceed036d6b9617dbf584 cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.bin42b81b526e150aad4f6a15e5cc7ba7d277fba122988156c4e118f8faadd8785c cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.json6a39225a796c68850195aa9e77b394b207e0ade14496229ff808c01c77286b8b cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.bin5fdaea6e59fafd1bcecd2d72da6bdfb1645a6cb2804b6b3ff8a3aeb263983793 cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.jsonbdb7bed086a6ef3d5a9a0f06c617fa4b67f2aaceae66d49467a8679815079c43 cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.bin19b43e37edac283c91906df67cdd18a49238aa2ac275790917bb8be9da4c5f4a cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.json0a9e87fc4ae401b7c8c761b670e9e30fb8e2e5ec4d474985580555b02b0b6e7b cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.bin133fb957197800a0ed821e9a4e0bdbac535b96d1a5cd792f8a2ee4bc7f49365d cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.json8b77019849de900f3d5f6425be56af48e9ebb0c6bd7d21677fd23a1e93cf721b cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.bin4fe180cdcc6d14f982266432e2b1b59df17b3991bb6f5a8b53c13dcf75166f3a cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.jsonaf3b7696e04c272f97c4bf13329e06da8acf3ef752779e1b990fc4b7e4165181 catalog.json29f3841ac2e651931ea64dc54667dce8ff416e58da8d234c4d3b88638b32bf9c code-provenance.json2585e060c231d981f165824896ed65389c5c04c36def65f02e20532141b5063b generation-spec.json3b68f5446a7d407c09514e8081f7e09411d1271cbbe415556025a640708518f6 partitions/k128-seed42/assignments.u328b918c8e00600ec03e565c5e1ce9b7a324d21ebcc0d129f4e5e2075660c7d877 partitions/k128-seed42/centroids.fbinabe6ef6ba3119b480f45fde41a52eab8c5b1d13631b402dc63878fab40f20543 partitions/k128-seed42/partition.json49a52421492b803544f01575b7c9a96c76a7ed39271ab9353558b9b5028b606c partitions/k128-seed42/query_assignments.u3273850d5d4beffa66fcb331c407a9ac64703a403b659e56887795570195b7d0fe partitions/k128-seed42/training_source_ids.u325352ee47e6e0bc687f79af633bf53b61f4bcd958644cc0ee567539d5748892d6 plan.jsonf5adf71ee42604d49b0eaa261b64a575b5971b4271eaefefbb9918939efe790a requirements.txt81ef6ebf171e1148d6550b3d20f99b78952e65eceb327246051731cd6ee730b8 tools/cxl/derive_concurrent_manifest.py284572d32ec143b7f51e6716dfe4b01669a576d99c9198e030ef5efa8e51458e tools/cxl/materialize_concurrent_batch_update.py55c326ae4f71e63a402851fc744e2a287b5d031a87f246567286b4d956f2818b tools/evaluation_runners/configs/deep100.json9342db9244643ca971d84e405435117579e4b0204e6a9bd875cff393965bcdca tools/evaluation_runners/e1.py0b9b4e8143f608773bf687a09553a18377d11495168ae357ae62dddaf5ac7270 tools/evaluation_runners/e2.pyb12e15b00f867267b357de7db578656f1c2811fc6e81e66272c8fbce0c7d2e4f tools/evaluation_runners/e6.py349a77a32a74506c00cc43a4b4007706055330889395541a6dbc2c3084b8def6 tools/evaluation_runners/prepare_spatial_config.py03a69485ce73254352436ff51cada5c9a78880a35a52e240ccb4aba0b9206fcb tools/evaluation_runners/runner.pycbd4040c3ea1b87823805d96b49e973f761aca37584ea5189a87ddb08545f749 tools/generator/spatial_common.py0693e91d18389442fd98d76a7438bd2e959200eea6a780c74077c36156a002b0 tools/generator/spatial_groundtruth.pyd4763d5918ed4b0630d9f013b4269de2746e237f53a4eedbdc65aca8ce7c8b02 tools/generator/spatial_partition.py86e39bd83b69ee8fa0fc10428dc48371b62e3538ec1d674686288f3ecb052f6c tools/generator/spatial_workload.py4cc0af40a2ce20eb2cd0a18954d647640800301ce220e3218b200295ba9a005e tools/generator/stage_release.py3c32551ce6c98009bc94b81fe287f9c94ed736d78950443de6140e156d473eff tools/generator/verify_spatial_consumers.pybbf3dc57d7dcee84e239cc0c25287ee8256fc02259d7c91c60a9bbc8f945c3a3 workloads/delete-hot/groundtruth/initial.bin5aeedf5eafe810a3ea6006a74d511d4a985cdbe2e95684b6522940b55e648ec8 workloads/delete-hot/plan.json75bfc783f74e3322fb0d9053714566f0a9dba646a4b04a2b3f527af7970b7686 workloads/delete-hot/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e workloads/delete-hot/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 workloads/delete-hot/queries/query_refs.u32e336b2103179c7bb9ca271b7bb53ed9b49bfc81ecdde79159f0f0a95aad23f71 workloads/delete-hot/spec.jsond216f20eaffd03ca7811a30311d9b6ab379d6e128ca5f14803cce17af3c6e807 workloads/delete-hot/streams/delete_ids.u32169871c7f0628e75b643de65688c4977ae010299ff840821596e74671c458f91 workloads/delete-hot/traces/delete-hot/batches/batch_0001.jsona3dacd9b244e326e5dc8eb35296e849bea7dd2f36372ade5c58e5185b2aaa049 workloads/delete-hot/traces/delete-hot/groundtruth/checkpoint_0001.binafea38c57bc2c61a4119cc40132b8414618bc2aaf720cd7fac59e50d6df20c1b workloads/delete-hot/traces/delete-hot/trace.json754b577478eb5e75f55c5242a751fb1a8068897a1fce143bae07f4ce59781cf7 workloads/delete-hot/validation.jsonb485a90d492885f7a3d5834593b38f2b91f1e661ca70f7234193a3fd6050f503 workloads/delete-hot/workload.jsonbbf3dc57d7dcee84e239cc0c25287ee8256fc02259d7c91c60a9bbc8f945c3a3 workloads/delete-uniform/groundtruth/initial.bin59e3d918fa91c607be57e74f083039eac2d37206ef283f1586803feb1f8ba51b workloads/delete-uniform/plan.json91f7d9f1cf48b563bf441c32e7f5fa6125df273308348bbc7dd1a0eaa1d6a1bb workloads/delete-uniform/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e workloads/delete-uniform/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 workloads/delete-uniform/queries/query_refs.u3272de57db2f053f06d5b2df1ab16967e2316e13be754cbf10a548b3ebb2b6b5c2 workloads/delete-uniform/spec.json983d2da109e19a194fe7bb42670dbe4c73118c36d9e648776dca64cde16715ea workloads/delete-uniform/streams/delete_ids.u323a1eb30479ca3e3759e44fc15167f9a2eaaad38fb8c5fe719565c6c5c475daff workloads/delete-uniform/traces/delete-uniform/batches/batch_0001.json2eb75e23f58dd7ff1824230a736fe781f1e5aa3507746a7878b5514af1340506 workloads/delete-uniform/traces/delete-uniform/groundtruth/checkpoint_0001.bin7f38ff520ca1a901573b5eb1b2e2b26649a2b2bc5f61d20903b29d8ea3840a63 workloads/delete-uniform/traces/delete-uniform/trace.jsonfa22470561fa9cd25c17c5a875cd56957b3f21616dccf496d011ffb56e19c5f9 workloads/delete-uniform/validation.json763f24629e91ca81cadc076dde2a968255e7c1339e6d0b084e98047436cfee10 workloads/delete-uniform/workload.json2f3b96a70462a4a3324a35d31e202d6d649089022e29536473b7649352e18443 workloads/insert-hot/groundtruth/initial.bin34f3f6d80fcf7ddedf7d2849647cbe130a6155e61ee5372174b38d78dc20b4f0 workloads/insert-hot/plan.json1c971affa9f872b43428cb0965900ff2d64de7ad0c1b8f4102d23d6cfbdb526f workloads/insert-hot/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e workloads/insert-hot/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 workloads/insert-hot/queries/query_refs.u32a48a6aa48ba7ee643685d3c72bf35cb51d2c75eee5952bf47d34545f9d264ca1 workloads/insert-hot/spec.json2ea95525aad57a3d259ce3a225dd33d99ad46fc02e91e2decf0660b9295b5685 workloads/insert-hot/streams/insert_ids.u32a3693d5fca97bc14db60e1dfef2e77554a47a081010e532c58b2d6a98829af84 workloads/insert-hot/streams/insert_refs.u320225f980c33be4807c8aefd0a38ec729d987f1c29f62a270e07e605766ac533d workloads/insert-hot/traces/insert-hot/batches/batch_0001.jsoneddc89c271f59f8a79a727c59942306323e9236d3e8f85ab66953e9353257d0c workloads/insert-hot/traces/insert-hot/groundtruth/checkpoint_0001.bin4e3bd05a1003192d89086150eb42e1868411d4aa5aceb52ea1312c196604490b workloads/insert-hot/traces/insert-hot/trace.json235bf4873efba223379135e641d05df8e9e46964428280f5d04366954d80cc67 workloads/insert-hot/validation.jsonc039059ae51da1152f3538d9bc542db806c10739e9f2a7992e7a6f186dc98b2d workloads/insert-hot/workload.json2f3b96a70462a4a3324a35d31e202d6d649089022e29536473b7649352e18443 workloads/insert-uniform/groundtruth/initial.bin24d73319e92ebc0239a414f9fa253a7015013127cd0c3269125967f984d5c273 workloads/insert-uniform/plan.jsond576ecc5e49776672e79e22d95c6204ee1f3171a9830579538b56ea4be6302c4 workloads/insert-uniform/profile.json08599fc542996fdab4196142d9ba2be62f92e7da97d2703e7a855959480a095e workloads/insert-uniform/queries/queries.fbinbb3ec08d099cd84d523cdc6fafc2dd7af53d14e0b8128d18bd91fefbfc50ee48 workloads/insert-uniform/queries/query_refs.u3217b4ba59cf474c4e00b2f14cc9ec3779dad3d5ae1d4f61bfc4b8516551c4e766 workloads/insert-uniform/spec.json7645185e472fdb701373f88c738d6e0c1fb76ac972c8c9f85eefc15cd6b7ad33 workloads/insert-uniform/streams/insert_ids.u32eb8f64166af30085990c173b69f9ccdfea86c8356758942bf4f739f1c6b37b36 workloads/insert-uniform/streams/insert_refs.u3274fe30a38252827ac5165367a2be4628b0ba5603f59804b1a6483d63ea3b9197 workloads/insert-uniform/traces/insert-uniform/batches/batch_0001.jsonfe23c7f1dbf05d03611596ed201a19a5f4120e50e8207a044eb5952926d02934 workloads/insert-uniform/traces/insert-uniform/groundtruth/checkpoint_0001.bin6b09d9f4c201867a385a79a089c062492a47166af281f2b9a497f3e129d7247d workloads/insert-uniform/traces/insert-uniform/trace.json029db1070342882d6c2b55ff3484a92f4289eafabe53e4724265a5b1936b5d14 workloads/insert-uniform/validation.jsonf20685dd093e6b0a89bc85e8bcda17434264c8d57c378a6fcfef2cd3bf57af22 workloads/insert-uniform/workload.json2f7e3141edebde6835bf852f96ca843e9fbd681e7805a0d1889f1be04eb30825 workloads/mixed-shared-hot/groundtruth/initial.binda4ef8337bfbe7052b9a52d937d56539ce862e7a2e0b73aca682ad3f4894d00e workloads/mixed-shared-hot/plan.jsonf929c5bf261963c1ed9455ee44a4751a5abb38cdb75fd91036ae258a39d1a2ea workloads/mixed-shared-hot/profile.json02faddd953193940ce5ac1891b728cb6723081c52ec469e3bc120b2dde90c267 workloads/mixed-shared-hot/queries/queries.fbind2cabea8772e5d9f8c17eda6ea2347882a9d297fff8c1ce7d8f45f941929ffd6 workloads/mixed-shared-hot/queries/query_refs.u324ca84a8267511fdb97f213f39a691c2ddddd68f3637bc0d18f0bb8e2402644e0 workloads/mixed-shared-hot/spec.jsone100d8bde88c333332d452d54ce45fe11ffb2ebfa7ac0b9ca1927efa060f0d22 workloads/mixed-shared-hot/streams/delete_ids.u32e7f9407e6db8cda2586ce8837561cdfdee3b2df59299cc75eb04dd5129481c1c workloads/mixed-shared-hot/streams/insert_ids.u32524dd65d2597536409230995f0dc9db2676085cf8420649e3f820b30aef48202 workloads/mixed-shared-hot/streams/insert_refs.u321c886fce94c360b3ba0c5b3ab63e0444a5650d5283971d357a9ac5136ab1ac8c workloads/mixed-shared-hot/traces/mixed-shared-hot/batches/batch_0001.json696ae063c19f51d4859f388381f5d2fb7d5938d9cf2da567adc82a6f9007ff23 workloads/mixed-shared-hot/traces/mixed-shared-hot/batches/batch_0002.jsone4eece8a7f04add213da00ce0d8aeb8a58b0b6a374434365d70d3b153cdf9810 workloads/mixed-shared-hot/traces/mixed-shared-hot/batches/batch_0003.jsond1f54f507c4e490162301c0ce835787bed836ba66a5ec94cc2f464149b3a291b workloads/mixed-shared-hot/traces/mixed-shared-hot/groundtruth/checkpoint_0001.bin42b4cf74e060cc281d57710e33b03d9de21937d7fd7291647b97a2ea7f4b5acf workloads/mixed-shared-hot/traces/mixed-shared-hot/groundtruth/checkpoint_0002.bin6b88fc4434adfd26fac1f37398ddbcacc276ac11b3367555e6b61542b79ce924 workloads/mixed-shared-hot/traces/mixed-shared-hot/groundtruth/checkpoint_0003.bincf90c4aa870695cb584a6989477aa4c85108c6124f8545cd2a0c345edf7cdd52 workloads/mixed-shared-hot/traces/mixed-shared-hot/trace.json0653bdb6d7ae8b0408e0c601f57767da5b423f8242a023dfb9fa8336560fa35d workloads/mixed-shared-hot/validation.json67f3bd5183f4cd69ab57c4dbe71afc58783e6459ebc0ea884f754ffff3c80052 workloads/mixed-shared-hot/workload.json4cc191dc98c1926739bb4c28b43b7c72d304fd2b10069f0480f3102009ce567b workloads/mixed-uniform/groundtruth/initial.bin42e02c30c8da440c972aabcc5ac2db25cfe1a83900dfac9309c5b128fded9b74 workloads/mixed-uniform/plan.json1f5ccd0fcc57c38f59ee5960d71a1f4b38951566e3cff3e4e38e53814df25d4a workloads/mixed-uniform/profile.jsonfcc5402274a5679f9cbbb65d9aa77e6bf5aa1b2512dccbcbcd51bcf2308cb8d3 workloads/mixed-uniform/queries/queries.fbinc8b36454e30ae5167377b9723ed1eb1f8dffe6db680d66862dd10429d13a14f9 workloads/mixed-uniform/queries/query_refs.u323b32b072b8fc883b4cfb7c7edd51d9533a77773176f4223dfe8f6408fa65afde workloads/mixed-uniform/spec.jsona493493fda91aafab5333843afa5d4b742d6aef49ec1629c1cc5e8bcabff1c0b workloads/mixed-uniform/streams/delete_ids.u32fba0903e5198441a698c07af803089d87d158a84ae5c47ba5f7b95a2c1b8ca5e workloads/mixed-uniform/streams/insert_ids.u3202546a8f23a5bbf7dd0fedc5c3b19e1e3a08687c90ddd1b71e65df57bac09e09 workloads/mixed-uniform/streams/insert_refs.u32cd70aa375ade4b8935448f7efb7f259c40818c25c84410bccbcffc11724b0451 workloads/mixed-uniform/traces/mixed-uniform/batches/batch_0001.jsona0b175f34b5be6a8fdf2c4a71ee5692bc4562f1b4ac93bec7140cf5997d820e3 workloads/mixed-uniform/traces/mixed-uniform/batches/batch_0002.jsonc52f3bb89beea25e7339844605049668c5f550585bc73824e942eb6280109aaf workloads/mixed-uniform/traces/mixed-uniform/batches/batch_0003.json0506231e994c847947961848fd20b417745db176662321dabb399270390bd05c workloads/mixed-uniform/traces/mixed-uniform/groundtruth/checkpoint_0001.bin3765877ed824f102d5e613f5ebcfc843a1018f98f6a46f09043f5f270f94ed8f workloads/mixed-uniform/traces/mixed-uniform/groundtruth/checkpoint_0002.bin5c43e19ae18aabf216c2da27f405345228ebc61e53af5f1fde636ce1de95f7fa workloads/mixed-uniform/traces/mixed-uniform/groundtruth/checkpoint_0003.bina8df857f8411b3f9f8f864f31c578e75ff9c8b50d835f800fec1a228e800f83f workloads/mixed-uniform/traces/mixed-uniform/trace.json583fc0619a8ab7335411a9e68ae3bf397fbd3a4a9a2e174b4d47af68c2866e1a workloads/mixed-uniform/validation.jsonb481dd233729c74e493bdd7494358e3cf86cd6eb2f87cb4f5ad50e7c8bd306c6 workloads/mixed-uniform/workload.json4cc191dc98c1926739bb4c28b43b7c72d304fd2b10069f0480f3102009ce567b workloads/mixed-update-hot/groundtruth/initial.bin62dae8c05c6fd5c080108876b5dd4909e6e5481bb0ced297f696b5ade9156770 workloads/mixed-update-hot/plan.jsona1595bbeca15b20f2d450d28699745e172d7621fdde731d625dd4bb6feb77f04 workloads/mixed-update-hot/profile.jsonfcc5402274a5679f9cbbb65d9aa77e6bf5aa1b2512dccbcbcd51bcf2308cb8d3 workloads/mixed-update-hot/queries/queries.fbinc8b36454e30ae5167377b9723ed1eb1f8dffe6db680d66862dd10429d13a14f9 workloads/mixed-update-hot/queries/query_refs.u326702d3b84f24295b58de2e2c787676a06dc4f67df394fb62b524b61edd84f088 workloads/mixed-update-hot/spec.jsone100d8bde88c333332d452d54ce45fe11ffb2ebfa7ac0b9ca1927efa060f0d22 workloads/mixed-update-hot/streams/delete_ids.u32e7f9407e6db8cda2586ce8837561cdfdee3b2df59299cc75eb04dd5129481c1c workloads/mixed-update-hot/streams/insert_ids.u32524dd65d2597536409230995f0dc9db2676085cf8420649e3f820b30aef48202 workloads/mixed-update-hot/streams/insert_refs.u32bd8fdb8db21b35923e6454d0cd1dc47679a805d46da34f810ec2f8cd65915ef6 workloads/mixed-update-hot/traces/mixed-update-hot/batches/batch_0001.json1b6fee9d4d78f39baf6e7970721364fe84382bdf725ba9f4bd49c68427b114cd workloads/mixed-update-hot/traces/mixed-update-hot/batches/batch_0002.json096dabd915fc7b222567fd1d76b003150b2e57332aaa9d0d1733e7acb54eccc7 workloads/mixed-update-hot/traces/mixed-update-hot/batches/batch_0003.json689d4eceee9abdb03b2ad15b0d5cb3fae619b5b1b1b13633782ef8a37bc121bd workloads/mixed-update-hot/traces/mixed-update-hot/groundtruth/checkpoint_0001.bin24d40d4367109eb5b1c8760518e46bc62bfc2d162b64d1df3ff240c4e73af623 workloads/mixed-update-hot/traces/mixed-update-hot/groundtruth/checkpoint_0002.bined74a258093ac6c8e17af6c92bed512ec728b1ae18fbf0f679a53019be9987c1 workloads/mixed-update-hot/traces/mixed-update-hot/groundtruth/checkpoint_0003.bin79ba8d5424a3689b5fe6bbf668a3301db70a8a3d72357b1f8037c4484478e188 workloads/mixed-update-hot/traces/mixed-update-hot/trace.jsonc55ee0452c57f96078656f3a0289070fc57581014e2d0cdc6870bcf2f775de43 workloads/mixed-update-hot/validation.jsonfdeaf645db887856ab9c91e9ee5283eda6451ee150a7c7ec2d1d25336c0ea48f workloads/mixed-update-hot/workload.json1a851806c69474054b0c0cdc20297e686280f1606b368ed83c5870e954fc9a7f workloads/query-hot/groundtruth/initial.bin341ad34db11c474b8a75889c3e0899d7cabe0f6500b1402533c9269d6dd851bc workloads/query-hot/plan.jsonc7584185831d610f4a378bf0e796f071462c3abd9873c1aee1e2d5b690153dfe workloads/query-hot/profile.json02faddd953193940ce5ac1891b728cb6723081c52ec469e3bc120b2dde90c267 workloads/query-hot/queries/queries.fbind2cabea8772e5d9f8c17eda6ea2347882a9d297fff8c1ce7d8f45f941929ffd6 workloads/query-hot/queries/query_refs.u326f9cdfbb75c1a8da8ede369006e2779b113da1be5b51f061473da56dc393aadc workloads/query-hot/spec.jsonbffe9c94733e4607b21e361675ed51a04a50d31ddbe6b0d96991937c03976852 workloads/query-hot/validation.json23ecf08523b50728398358055263167541a4671f46705664b6b591a364645fc3 workloads/query-hot/workload.json2f2f35ca838119f8753d11216e691d885c7e4e4e385e7eb1c88b031a19f60097 workloads/query-uniform/groundtruth/initial.bin13075df6e6211d8087a6ff53b3aa402883facfcd7dbfe3e3790184f3133bce61 workloads/query-uniform/plan.jsone4c60a42de88de2ad8070cf50312782c717c703238c464f1c77ae81bd77144ae workloads/query-uniform/profile.jsonfcc5402274a5679f9cbbb65d9aa77e6bf5aa1b2512dccbcbcd51bcf2308cb8d3 workloads/query-uniform/queries/queries.fbinc8b36454e30ae5167377b9723ed1eb1f8dffe6db680d66862dd10429d13a14f9 workloads/query-uniform/queries/query_refs.u32df6c4ef44152c293f4d0aa89f0c576b84a4b23d62a9a0fb662e967f2b604ee57 workloads/query-uniform/spec.jsonbdd37876dca3b256834e2534e57811e298ca9a3b743d261199a23765f50ac6c7 workloads/query-uniform/validation.jsonb6a5bdd4692bbf15149d700d706e5a4b5562d2133c99a0e18566313fd933ac1b workloads/query-uniform/workload.json12345678910111213141516171819202122232425262728293031{ "files": { "requirements.txt": "f5adf71ee42604d49b0eaa261b64a575b5971b4271eaefefbb9918939efe790a", "tools/cxl/derive_concurrent_manifest.py": "81ef6ebf171e1148d6550b3d20f99b78952e65eceb327246051731cd6ee730b8", "tools/cxl/materialize_concurrent_batch_update.py": "284572d32ec143b7f51e6716dfe4b01669a576d99c9198e030ef5efa8e51458e", "tools/evaluation_runners/configs/deep100.json": "55c326ae4f71e63a402851fc744e2a287b5d031a87f246567286b4d956f2818b", "tools/evaluation_runners/e1.py": "9342db9244643ca971d84e405435117579e4b0204e6a9bd875cff393965bcdca", "tools/evaluation_runners/e2.py": "0b9b4e8143f608773bf687a09553a18377d11495168ae357ae62dddaf5ac7270", "tools/evaluation_runners/e6.py": "b12e15b00f867267b357de7db578656f1c2811fc6e81e66272c8fbce0c7d2e4f", "tools/evaluation_runners/prepare_spatial_config.py": "349a77a32a74506c00cc43a4b4007706055330889395541a6dbc2c3084b8def6", "tools/evaluation_runners/runner.py": "03a69485ce73254352436ff51cada5c9a78880a35a52e240ccb4aba0b9206fcb", "tools/generator/spatial_common.py": "cbd4040c3ea1b87823805d96b49e973f761aca37584ea5189a87ddb08545f749", "tools/generator/spatial_groundtruth.py": "0693e91d18389442fd98d76a7438bd2e959200eea6a780c74077c36156a002b0", "tools/generator/spatial_partition.py": "d4763d5918ed4b0630d9f013b4269de2746e237f53a4eedbdc65aca8ce7c8b02", "tools/generator/spatial_workload.py": "86e39bd83b69ee8fa0fc10428dc48371b62e3538ec1d674686288f3ecb052f6c", "tools/generator/stage_release.py": "4cc0af40a2ce20eb2cd0a18954d647640800301ce220e3218b200295ba9a005e", "tools/generator/verify_spatial_consumers.py": "3c32551ce6c98009bc94b81fe287f9c94ed736d78950443de6140e156d473eff" }, "repositories": { "vectordb-cxl": { "baseline": "6cfd5a0de9b79aac38a6a4afa796e91fe2b297f4", "branch": "feat/static-hotspot-workloads" }, "vectordb-eval": { "baseline": "bcab614ecf90514ccba696312c01408a06d3e1e4", "branch": "feat/static-hotspot-workloads" } }, "schema": "spatial-code-provenance.v1", "source_state": "reviewed feature worktree snapshot"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143{ "dataset": "deep", "hotspot": { "seed": 42, "target_mass": 0.05 }, "partition": { "clusters": 128, "iterations": 20, "metric": "l2", "seed": 42, "training_rows": 262144 }, "profiles": [ { "deletes": 0, "id": "query-uniform", "initial_state": "static-100m", "inserts": 0, "kind": "query", "queries": 500000, "query_rows": 500000 }, { "control": "query-uniform", "deletes": 0, "id": "query-hot", "initial_state": "static-100m", "inserts": 0, "kind": "query", "queries": 500000, "query_hot_fraction": 0.8, "query_rows": 500000 }, { "batch_size": 500000, "deletes": 0, "id": "insert-uniform", "initial_state": "initial-80m", "inserts": 500000, "kind": "insert", "queries": 500000, "query_rows": 10000 }, { "batch_size": 500000, "control": "insert-uniform", "deletes": 0, "id": "insert-hot", "initial_state": "initial-80m", "insert_hot_fraction": 0.8, "inserts": 500000, "kind": "insert", "queries": 500000, "query_rows": 10000 }, { "batch_size": 1000000, "deletes": 1000000, "id": "delete-uniform", "initial_state": "static-100m", "inserts": 0, "kind": "delete", "queries": 500000, "query_rows": 10000 }, { "batch_size": 1000000, "control": "delete-uniform", "delete_hot_fraction": 0.8, "deletes": 1000000, "id": "delete-hot", "initial_state": "static-100m", "inserts": 0, "kind": "delete", "queries": 500000, "query_rows": 10000 }, { "batch_size": 200000, "deletes": 600000, "id": "mixed-uniform", "initial_state": "initial-80m", "inserts": 600000, "kind": "mixed", "queries": 21600000, "query_rows": 500000, "update_stream": "mixed-uniform" }, { "batch_size": 200000, "control": "mixed-uniform", "delete_hot_fraction": 0.8, "deletes": 600000, "id": "mixed-update-hot", "initial_state": "initial-80m", "insert_hot_fraction": 0.8, "inserts": 600000, "kind": "mixed", "queries": 21600000, "query_rows": 500000, "update_stream": "mixed-hot" }, { "batch_size": 200000, "control": "mixed-uniform", "delete_hot_fraction": 0.8, "deletes": 600000, "id": "mixed-shared-hot", "initial_state": "initial-80m", "insert_hot_fraction": 0.8, "inserts": 600000, "kind": "mixed", "queries": 21600000, "query_hot_fraction": 0.8, "query_rows": 500000, "update_stream": "mixed-hot" } ], "sampling_seed": 20261001, "schema": "spatial-workload-spec.v1", "source": { "base": "base.fbin", "base_count": 100000000, "dtype": "float32", "groundtruth": "groundtruth.bin", "initial_count": 80000000, "insert_vector_order": "permuted", "insert_vectors": "base_permuted.fbin", "metric": "l2", "queries": "orig_query_10k.fbin", "static_hf": { "repo": "Odeinjul/deep-100m-static-search-eval", "revision": "567847cb68fa512676e77aa84a977311593560a9" }, "update_hf": { "repo": "Odeinjul/deep-100m-batch-update-eval", "revision": "9956c8a4aa36f58f9607222fc8fc261591fe32b2" }, "update_order": "update_order.u32" }, "top_k": 10}123version https://git-lfs.github.com/spec/v1oid sha256:3b68f5446a7d407c09514e8081f7e09411d1271cbbe415556025a640708518f6size 400000000123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315{ "assignment_order": "original source vector ID; not HNSW internal ID or update_order row", "counts": [ 1324263, 517046, 691524, 882738, 444113, 947564, 626518, 473321, 1963984, 889554, 755082, 472499, 865262, 921513, 841876, 1187506, 997698, 290217, 648656, 757617, 1042960, 543354, 933054, 903705, 661841, 850115, 403632, 745813, 644752, 803814, 589949, 465493, 1040583, 855269, 728156, 451711, 629170, 637292, 533185, 637181, 816864, 1126588, 538625, 453188, 828798, 946818, 891839, 793412, 863527, 705164, 717673, 957005, 702061, 1056973, 587031, 505741, 676903, 688886, 650943, 742777, 641521, 746534, 908990, 790635, 605461, 701390, 516954, 1084129, 561293, 727610, 866969, 763664, 1201926, 586091, 982296, 1052665, 760859, 710634, 810397, 550894, 562967, 630497, 623958, 1000811, 909607, 847262, 922736, 579122, 726866, 637125, 888092, 695013, 1039939, 893423, 692661, 628537, 1208071, 1022288, 868183, 915985, 869514, 845619, 937462, 961121, 672204, 642625, 636483, 732944, 510099, 793751, 569509, 593971, 1338957, 967123, 645606, 852451, 1261371, 552425, 752667, 976949, 695018, 632044, 640696, 906746, 1072280, 919201, 784621, 522092 ], "dimension": 96, "elapsed_seconds": 253.89, "files": { "assignments.u32": { "bytes": 400000000, "sha256": "3b68f5446a7d407c09514e8081f7e09411d1271cbbe415556025a640708518f6" }, "centroids.fbin": { "bytes": 49160, "sha256": "8b918c8e00600ec03e565c5e1ce9b7a324d21ebcc0d129f4e5e2075660c7d877" }, "query_assignments.u32": { "bytes": 40000, "sha256": "49a52421492b803544f01575b7c9a96c76a7ed39271ab9353558b9b5028b606c" }, "training_source_ids.u32": { "bytes": 1048576, "sha256": "73850d5d4beffa66fcb331c407a9ac64703a403b659e56887795570195b7d0fe" } }, "parameters": { "clusters": 128, "iterations": 20, "metric": "l2", "seed": 42, "training_rows": 262144 }, "query_counts": [ 149, 41, 69, 95, 37, 87, 56, 51, 194, 98, 71, 54, 98, 92, 94, 122, 99, 23, 67, 66, 86, 48, 98, 87, 86, 88, 38, 75, 61, 75, 51, 39, 112, 79, 81, 51, 64, 55, 57, 56, 78, 154, 47, 58, 90, 82, 72, 84, 86, 68, 82, 102, 79, 105, 47, 53, 82, 61, 61, 69, 74, 72, 109, 79, 58, 71, 55, 101, 54, 70, 87, 95, 109, 51, 93, 113, 79, 94, 76, 48, 60, 59, 70, 93, 92, 78, 91, 64, 78, 67, 85, 56, 108, 68, 65, 60, 137, 119, 61, 106, 82, 79, 106, 87, 52, 65, 70, 68, 54, 58, 44, 61, 144, 90, 74, 83, 123, 71, 66, 116, 75, 65, 65, 83, 110, 71, 73, 50 ], "query_rows": 10000, "schema": "spatial-partition.v1", "signature": "d50c5b5fb5f26e04b333ac70b3c2443167b17f1c7bd11198b8496aa5751063b0", "software": { "faiss": "1.15.1", "numpy": "2.2.6", "threads": 16 }, "source": { "base": { "bytes": 38400000008, "file": "base.fbin", "package_sha256": "162cef480f030deead496c745b4214abc3fcbd9849c2561ab1251e84b6904ba4", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "bfb8d14cd9320dd206e9e165bf10ff5d70285beb9a6380622010a01abfee4094" }, "queries": { "bytes": 3840008, "file": "orig_query_10k.fbin", "package_sha256": "8438fc763f14e0f9741fda15b3e11215aef089ce17d1ad47d53b52a7c9fda5bb", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "a7afbec60a892eaf16eda71baca8f099e364eac84e27818a75bfe2f462e454c8" } }, "source_rows": 100000000}123version https://git-lfs.github.com/spec/v1oid sha256:73850d5d4beffa66fcb331c407a9ac64703a403b659e56887795570195b7d0fesize 1048576123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589{ "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "partition_signature": "d50c5b5fb5f26e04b333ac70b3c2443167b17f1c7bd11198b8496aa5751063b0", "profiles": [ { "batch_count": 0, "capacities": { "delete": { "cold_eligible": 94611103, "eligible": 100000000, "hot_eligible": 5388897, "hot_quota": null, "requested": 0 }, "insert": { "cold_eligible": 0, "eligible": 0, "hot_eligible": 0, "hot_quota": null, "requested": 0 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 500000 } }, "final_live_count": 100000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 100000000, "profile": { "deletes": 0, "id": "query-uniform", "initial_state": "static-100m", "inserts": 0, "kind": "query", "queries": 500000, "query_rows": 500000 } }, { "batch_count": 0, "capacities": { "delete": { "cold_eligible": 94611103, "eligible": 100000000, "hot_eligible": 5388897, "hot_quota": null, "requested": 0 }, "insert": { "cold_eligible": 0, "eligible": 0, "hot_eligible": 0, "hot_quota": null, "requested": 0 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": 400000, "requested": 500000 } }, "final_live_count": 100000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 100000000, "profile": { "control": "query-uniform", "deletes": 0, "id": "query-hot", "initial_state": "static-100m", "inserts": 0, "kind": "query", "queries": 500000, "query_hot_fraction": 0.8, "query_rows": 500000 } }, { "batch_count": 1, "capacities": { "delete": { "cold_eligible": 75689174, "eligible": 80000000, "hot_eligible": 4310826, "hot_quota": null, "requested": 0 }, "insert": { "cold_eligible": 18921929, "eligible": 20000000, "hot_eligible": 1078071, "hot_quota": null, "requested": 500000 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 10000 } }, "final_live_count": 80500000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 80000000, "profile": { "batch_size": 500000, "deletes": 0, "id": "insert-uniform", "initial_state": "initial-80m", "inserts": 500000, "kind": "insert", "queries": 500000, "query_rows": 10000 } }, { "batch_count": 1, "capacities": { "delete": { "cold_eligible": 75689174, "eligible": 80000000, "hot_eligible": 4310826, "hot_quota": null, "requested": 0 }, "insert": { "cold_eligible": 18921929, "eligible": 20000000, "hot_eligible": 1078071, "hot_quota": 400000, "requested": 500000 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 10000 } }, "final_live_count": 80500000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 80000000, "profile": { "batch_size": 500000, "control": "insert-uniform", "deletes": 0, "id": "insert-hot", "initial_state": "initial-80m", "insert_hot_fraction": 0.8, "inserts": 500000, "kind": "insert", "queries": 500000, "query_rows": 10000 } }, { "batch_count": 1, "capacities": { "delete": { "cold_eligible": 94611103, "eligible": 100000000, "hot_eligible": 5388897, "hot_quota": null, "requested": 1000000 }, "insert": { "cold_eligible": 0, "eligible": 0, "hot_eligible": 0, "hot_quota": null, "requested": 0 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 10000 } }, "final_live_count": 99000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 100000000, "profile": { "batch_size": 1000000, "deletes": 1000000, "id": "delete-uniform", "initial_state": "static-100m", "inserts": 0, "kind": "delete", "queries": 500000, "query_rows": 10000 } }, { "batch_count": 1, "capacities": { "delete": { "cold_eligible": 94611103, "eligible": 100000000, "hot_eligible": 5388897, "hot_quota": 800000, "requested": 1000000 }, "insert": { "cold_eligible": 0, "eligible": 0, "hot_eligible": 0, "hot_quota": null, "requested": 0 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 10000 } }, "final_live_count": 99000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 100000000, "profile": { "batch_size": 1000000, "control": "delete-uniform", "delete_hot_fraction": 0.8, "deletes": 1000000, "id": "delete-hot", "initial_state": "static-100m", "inserts": 0, "kind": "delete", "queries": 500000, "query_rows": 10000 } }, { "batch_count": 3, "capacities": { "delete": { "cold_eligible": 75689174, "eligible": 80000000, "hot_eligible": 4310826, "hot_quota": null, "requested": 600000 }, "insert": { "cold_eligible": 18921929, "eligible": 20000000, "hot_eligible": 1078071, "hot_quota": null, "requested": 600000 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 500000 } }, "final_live_count": 80000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 80000000, "profile": { "batch_size": 200000, "deletes": 600000, "id": "mixed-uniform", "initial_state": "initial-80m", "inserts": 600000, "kind": "mixed", "queries": 21600000, "query_rows": 500000, "update_stream": "mixed-uniform" } }, { "batch_count": 3, "capacities": { "delete": { "cold_eligible": 75689174, "eligible": 80000000, "hot_eligible": 4310826, "hot_quota": 480000, "requested": 600000 }, "insert": { "cold_eligible": 18921929, "eligible": 20000000, "hot_eligible": 1078071, "hot_quota": 480000, "requested": 600000 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": null, "requested": 500000 } }, "final_live_count": 80000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 80000000, "profile": { "batch_size": 200000, "control": "mixed-uniform", "delete_hot_fraction": 0.8, "deletes": 600000, "id": "mixed-update-hot", "initial_state": "initial-80m", "insert_hot_fraction": 0.8, "inserts": 600000, "kind": "mixed", "queries": 21600000, "query_rows": 500000, "update_stream": "mixed-hot" } }, { "batch_count": 3, "capacities": { "delete": { "cold_eligible": 75689174, "eligible": 80000000, "hot_eligible": 4310826, "hot_quota": 480000, "requested": 600000 }, "insert": { "cold_eligible": 18921929, "eligible": 20000000, "hot_eligible": 1078071, "hot_quota": 480000, "requested": 600000 }, "query": { "cold_eligible": 9443, "eligible": 10000, "hot_eligible": 557, "hot_quota": 400000, "requested": 500000 } }, "final_live_count": 80000000, "hotspot": { "actual_mass": 0.05388897, "clusters": [ 22, 0, 111, 59, 122, 121, 127 ], "fresh_vectors": 1078071, "initial_live_vectors": 4310826, "query_vectors": 557, "root_cluster": 22, "scope": "one fixed hotspot for the entire run, shared by all CNs", "source_vectors": 5388897, "target_mass": 0.05 }, "initial_live_count": 80000000, "profile": { "batch_size": 200000, "control": "mixed-uniform", "delete_hot_fraction": 0.8, "deletes": 600000, "id": "mixed-shared-hot", "initial_state": "initial-80m", "insert_hot_fraction": 0.8, "inserts": 600000, "kind": "mixed", "queries": 21600000, "query_hot_fraction": 0.8, "query_rows": 500000, "update_stream": "mixed-hot" } } ], "schema": "spatial-workload-plan.v1", "source_identities": { "base": { "bytes": 38400000008, "file": "base.fbin", "package_sha256": "162cef480f030deead496c745b4214abc3fcbd9849c2561ab1251e84b6904ba4", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "bfb8d14cd9320dd206e9e165bf10ff5d70285beb9a6380622010a01abfee4094" }, "groundtruth": { "bytes": 8000008, "file": "groundtruth.bin", "package_sha256": "766d7e0e2ff81796f44adfc46e2cab98809c8e802b952063d7b8fa647697066f", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "5dd3bce8290ae748784916e9d62ec7bf4f0c19cfe40c652697d0ed807fcda761" }, "insert_vectors": { "bytes": 38400000008, "file": "base_permuted.fbin", "package_sha256": "1c8bf71f320a52e763ba1fa1168d88dbd45f5b36ce74cf2fa71d7bdc399eba93", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "648534790d99934dd9cbb697f299c36a698f80263c2d344180b786890305227f" }, "queries": { "bytes": 3840008, "file": "orig_query_10k.fbin", "package_sha256": "8438fc763f14e0f9741fda15b3e11215aef089ce17d1ad47d53b52a7c9fda5bb", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "a7afbec60a892eaf16eda71baca8f099e364eac84e27818a75bfe2f462e454c8" }, "update_order": { "bytes": 400000000, "file": "update_order.u32", "package_sha256": "88332fcfc0662b21c7283197570e8957baf89275e06b635b84a9647da71cdcad", "package_sha256_status": "trusted source record; not rehashed", "sample_sha256": "5e8fa93c166c6c34714dc5a97d969a5d1b3895bb3fd50f8fdf66fde2190ac37f" } }}1234# Versions used to generate and validate the DEEP100M v1 release.numpy==2.2.6faiss-cpu==1.15.1threadpoolctl==3.7.0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555#!/usr/bin/env python3
from __future__ import annotations
import argparseimport copyimport jsonimport tempfilefrom pathlib import Path
DEFAULT_MIXED_STEADY_SEARCH_THREADS = 26DEFAULT_MIXED_STEADY_INSERT_THREADS = 4DEFAULT_MIXED_STEADY_MARK_DELETE_THREADS = 1DEFAULT_MIXED_STEADY_MERGE_DELETE_THREADS = 0
def nonnegative_int(value: str) -> int: parsed = int(value) if parsed < 0: raise argparse.ArgumentTypeError("value must be non-negative") return parsed
def nonnegative_float(value: str) -> float: parsed = float(value) if parsed < 0.0: raise argparse.ArgumentTypeError("value must be non-negative") return parsed
def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser( description=( "Derive a concurrent benchmark manifest from an existing " "materialized manifest without copying query, ground-truth, or id " "streams." ) ) parser.add_argument("--base-manifest", type=Path) parser.add_argument("--output-manifest", type=Path) parser.add_argument("--workload-id", default="") parser.add_argument( "--workload-mode", choices=["final_full_overlap", "continuous_uniform", "decomposition", "smoke", "debug"], default=None, help="Defaults to the base mode for exact-count checkpoints, otherwise decomposition.", ) parser.add_argument("--target-query-count", type=nonnegative_int) parser.add_argument("--target-insert-count", type=nonnegative_int) parser.add_argument("--target-mark-delete-count", type=nonnegative_int) parser.add_argument("--duration-seconds", type=nonnegative_float) parser.add_argument("--query-rate-qps", type=nonnegative_float) parser.add_argument("--insert-rate-ops", type=nonnegative_float) parser.add_argument("--mark-delete-rate-ops", type=nonnegative_float) for prefix in ("search", "insert", "mark-delete"): parser.add_argument( f"--{prefix}-arrival-mode", choices=["fixed-rate", "saturating-backlog"], ) parser.add_argument(f"--{prefix}-low-watermark", type=nonnegative_int) parser.add_argument(f"--{prefix}-high-watermark", type=nonnegative_int) parser.add_argument(f"--{prefix}-poll-interval-us", type=nonnegative_int) parser.add_argument("--search-threads", type=nonnegative_int) parser.add_argument("--insert-threads", type=nonnegative_int) parser.add_argument("--mark-delete-threads", type=nonnegative_int) parser.add_argument("--merge-delete-threads", type=nonnegative_int) parser.add_argument( "--overflow-policy", choices=["reject_new", "wait_for_capacity"], ) parser.add_argument( "--keep-merge-delete", action="store_true", help=( "Preserve base merge-delete schedules. By default decomposition, " "smoke, and debug derivatives clear merge-delete schedules." ), ) parser.add_argument("--self-test", action="store_true") return parser.parse_args()
def require_args(args: argparse.Namespace) -> None: missing = [] if args.base_manifest is None: missing.append("--base-manifest") if args.output_manifest is None: missing.append("--output-manifest") if missing: raise ValueError("missing required arguments: " + ", ".join(missing)) if args.duration_seconds is not None and args.duration_seconds <= 0.0: raise ValueError("--duration-seconds must be greater than zero") if args.base_manifest.resolve() == args.output_manifest.resolve(): raise ValueError("--output-manifest must be separate from --base-manifest")
def derived_rate(explicit: float | None, count: int, duration: float) -> float: if explicit is not None: return explicit if count == 0: return 0.0 return count / duration
def maybe_set(window: dict, field: str, value: object | None) -> object: if value is None: return window[field] window[field] = value return value
def apply_arrival_override(window: dict, prefix: str, args: argparse.Namespace) -> None: mode = getattr(args, f"{prefix}_arrival_mode") low = getattr(args, f"{prefix}_low_watermark") high = getattr(args, f"{prefix}_high_watermark") poll = getattr(args, f"{prefix}_poll_interval_us") if mode is None and low is None and high is None and poll is None: return field = f"{prefix}_arrival" control = dict( window.get( field, { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, ) ) if mode is not None: control["mode"] = mode if low is not None: control["low_watermark"] = low if high is not None: control["high_watermark"] = high if poll is not None: if poll <= 0: raise ValueError(f"--{prefix.replace('_', '-')}-poll-interval-us must be positive") control["poll_interval_us"] = poll window[field] = control
def should_clear_merge_delete(args: argparse.Namespace) -> bool: return not args.keep_merge_delete and args.workload_mode not in ( "final_full_overlap", "continuous_uniform" )
def should_apply_default_mixed_steady_threads( args: argparse.Namespace, clear_merge_delete: bool, query_count: int, insert_count: int, mark_count: int,) -> bool: return ( clear_merge_delete and query_count > 0 and insert_count > 0 and mark_count > 0 and args.search_threads is None and args.insert_threads is None and args.mark_delete_threads is None and args.merge_delete_threads is None )
def derive_manifest(base: dict, args: argparse.Namespace) -> dict: manifest = copy.deepcopy(base) checkpoint_contract = manifest.get("checkpoint_contract") if checkpoint_contract not in (None, "exact-update-counts.v1"): raise ValueError(f"unsupported checkpoint contract: {checkpoint_contract!r}") args = argparse.Namespace(**vars(args)) args.workload_mode = args.workload_mode or ( manifest["workload_mode"] if checkpoint_contract else "decomposition" ) if checkpoint_contract and ( (args.workload_mode == "continuous_uniform") != (manifest.get("window_lifecycle") == "continuous_logical_windows") ): raise ValueError("exact-count checkpoint derivatives must preserve the window lifecycle") manifest["workload_mode"] = args.workload_mode if args.workload_id: manifest["workload_id"] = args.workload_id
clear_merge_delete = should_clear_merge_delete(args) for window in manifest.get("windows", []): duration = float(maybe_set(window, "duration_seconds", args.duration_seconds)) if duration <= 0.0: raise ValueError("duration_seconds must be greater than zero")
query_count = int(maybe_set(window, "target_query_count", args.target_query_count)) insert_count = int(maybe_set(window, "target_insert_count", args.target_insert_count)) mark_count = int(maybe_set(window, "target_mark_delete_count", args.target_mark_delete_count)) if query_count < 0 or insert_count < 0 or mark_count < 0: raise ValueError("target counts must be non-negative") if checkpoint_contract: bound = window.get("checkpoint_update_counts") if not isinstance(bound, dict) or ( bound.get("insert") != insert_count or bound.get("mark_delete") != mark_count ): raise ValueError( "exact-update-counts.v1 forbids changing update counts while " "retaining checkpoint ground truth; generate a new workload" )
window["query_rate_qps"] = derived_rate( args.query_rate_qps, query_count, duration, ) window["insert_rate_ops"] = derived_rate( args.insert_rate_ops, insert_count, duration, ) window["mark_delete_rate_ops"] = derived_rate( args.mark_delete_rate_ops, mark_count, duration, ) apply_arrival_override(window, "search", args) apply_arrival_override(window, "insert", args) apply_arrival_override(window, "mark_delete", args) if args.overflow_policy is not None: window["overflow_policy"] = args.overflow_policy
if should_apply_default_mixed_steady_threads( args, clear_merge_delete, query_count, insert_count, mark_count, ): window["search_threads"] = DEFAULT_MIXED_STEADY_SEARCH_THREADS window["insert_threads"] = DEFAULT_MIXED_STEADY_INSERT_THREADS window["mark_delete_threads"] = DEFAULT_MIXED_STEADY_MARK_DELETE_THREADS else: maybe_set(window, "search_threads", args.search_threads) maybe_set(window, "insert_threads", args.insert_threads) maybe_set(window, "mark_delete_threads", args.mark_delete_threads) maybe_set(window, "merge_delete_threads", args.merge_delete_threads)
if clear_merge_delete: window["merge_delete_mode"] = "disabled" window["merge_delete_schedule"] = [] if args.merge_delete_threads is None: window["merge_delete_threads"] = DEFAULT_MIXED_STEADY_MERGE_DELETE_THREADS
return manifest
def load_manifest(path: Path) -> dict: with path.open("r", encoding="utf-8") as inp: return json.load(inp)
def write_manifest(path: Path, manifest: dict) -> None: path.parent.mkdir(parents=True, exist_ok=True) path.write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8")
def run_self_test() -> None: base = { "version": 1, "workload_id": "base", "workload_mode": "final_full_overlap", "window_lifecycle": "one_active_window", "windows": [ { "window_id": 1, "query_path": "/remote/query.fbin", "pre_update_checkpoint_groundtruth_path": "/remote/gt.bin", "insert_ids_path": "/remote/insert.u32", "mark_delete_ids_path": "/remote/delete.u32", "target_query_count": 900000, "target_insert_count": 50000, "target_mark_delete_count": 50000, "duration_seconds": 60.0, "query_rate_qps": 15000.0, "insert_rate_ops": 833.333333, "mark_delete_rate_ops": 833.333333, "search_arrival": { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, "insert_arrival": { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, "mark_delete_arrival": { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, "warmup_seconds": 0.0, "stop_policy": "drain_after_duration", "allocation_scope": "uniform_all_cns", "search_threads": 5, "insert_threads": 1, "mark_delete_threads": 1, "merge_delete_threads": 1, "merge_delete_mode": "concurrent", "merge_delete_trigger": { "kind": "deleted_node_fraction", "threshold": 0.05, "semantics": "offline_generator_emits_deterministic_schedule", }, "merge_delete_schedule": [ { "task_class": "merge_delete_repair", "start_after_seconds": 60.0, "repeat_interval_seconds": 0, "max_runs": 1, } ], "max_queue_depth": { "search": 10000, "insert": 5000, "mark_delete": 5000, "merge_delete_repair": 1000, "merge_delete_gc": 1000, }, "max_inflight": { "search": 10000, "insert": 5000, "mark_delete": 5000, "merge_delete_repair": 1000, "merge_delete_gc": 1000, }, "overflow_policy": "reject_new", "source": { "kind": "converted_batch", "batch_workload_root": "/remote/source", "batch_index": 1, "batch_json_path": "/remote/source/batches/batch_0001.json", "query_path": "/remote/source/queries/q.fbin", "pre_update_checkpoint_groundtruth_path": "/remote/source/groundtruth/g.bin", "insert_count": 100000, "delete_count": 100000, "active_begin": 0, "active_end_exclusive": 8000000, "active_count": 8000000, }, } ], }
with tempfile.TemporaryDirectory(prefix="vectordb_derive_manifest_") as tmp: root = Path(tmp) base_path = root / "base.json" out_path = root / "search_only.json" write_manifest(base_path, base) args = argparse.Namespace( base_manifest=base_path, output_manifest=out_path, workload_id="search-only", workload_mode="decomposition", target_query_count=100, target_insert_count=0, target_mark_delete_count=0, duration_seconds=10.0, query_rate_qps=None, insert_rate_ops=None, mark_delete_rate_ops=None, search_arrival_mode=None, search_low_watermark=None, search_high_watermark=None, search_poll_interval_us=None, insert_arrival_mode=None, insert_low_watermark=None, insert_high_watermark=None, insert_poll_interval_us=None, mark_delete_arrival_mode=None, mark_delete_low_watermark=None, mark_delete_high_watermark=None, mark_delete_poll_interval_us=None, search_threads=3, insert_threads=0, mark_delete_threads=0, merge_delete_threads=None, overflow_policy=None, keep_merge_delete=False, self_test=False, ) same_path_args = argparse.Namespace(**vars(args)) same_path_args.output_manifest = base_path try: require_args(same_path_args) except ValueError as exc: if "separate from --base-manifest" not in str(exc): raise else: raise AssertionError("derive should reject in-place manifest output")
derived = derive_manifest(load_manifest(base_path), args) write_manifest(out_path, derived) reread = load_manifest(out_path) window = reread["windows"][0] if reread["workload_id"] != "search-only": raise AssertionError("workload id was not updated") if window["target_query_count"] != 100 or window["query_rate_qps"] != 10.0: raise AssertionError("query count/rate derivation failed") if window["target_insert_count"] != 0 or window["insert_rate_ops"] != 0.0: raise AssertionError("insert stream was not disabled") if window["target_mark_delete_count"] != 0 or window["mark_delete_rate_ops"] != 0.0: raise AssertionError("mark-delete stream was not disabled") if ( window["search_threads"] != 3 or window["insert_threads"] != 0 or window["mark_delete_threads"] != 0 or window["merge_delete_threads"] != 0 ): raise AssertionError("thread override failed") if window["merge_delete_mode"] != "disabled" or window["merge_delete_schedule"]: raise AssertionError("decomposition should clear merge-delete by default") if window["query_path"] != "/remote/query.fbin": raise AssertionError("derived manifest should reuse materialized paths") if window["source"]["insert_count"] != 100000: raise AssertionError("source metadata should preserve original batch counts") if window["search_arrival"]["mode"] != "fixed-rate": raise AssertionError("derive should preserve arrival controls by default")
mixed_path = root / "mixed_default.json" mixed_args = argparse.Namespace(**vars(args)) mixed_args.output_manifest = mixed_path mixed_args.workload_id = "mixed-default" mixed_args.target_query_count = None mixed_args.target_insert_count = None mixed_args.target_mark_delete_count = None mixed_args.search_threads = None mixed_args.insert_threads = None mixed_args.mark_delete_threads = None mixed_args.merge_delete_threads = None mixed = derive_manifest(load_manifest(base_path), mixed_args) mixed_window = mixed["windows"][0] if ( mixed_window["search_threads"] != DEFAULT_MIXED_STEADY_SEARCH_THREADS or mixed_window["insert_threads"] != DEFAULT_MIXED_STEADY_INSERT_THREADS or mixed_window["mark_delete_threads"] != DEFAULT_MIXED_STEADY_MARK_DELETE_THREADS or mixed_window["merge_delete_threads"] != DEFAULT_MIXED_STEADY_MERGE_DELETE_THREADS ): raise AssertionError("mixed decomposition should default to 26/4/1/0")
keep_args = argparse.Namespace(**vars(args)) keep_args.workload_mode = "final_full_overlap" keep_args.keep_merge_delete = True keep_args.merge_delete_threads = 1 kept = derive_manifest(load_manifest(base_path), keep_args) kept_window = kept["windows"][0] if kept_window["merge_delete_mode"] != "concurrent" or not kept_window["merge_delete_schedule"]: raise AssertionError("keep-merge-delete should preserve schedules")
arrival_args = argparse.Namespace(**vars(args)) arrival_args.insert_arrival_mode = "saturating-backlog" arrival_args.insert_low_watermark = 100 arrival_args.insert_high_watermark = 500 arrival_args.insert_poll_interval_us = 25 arrival = derive_manifest(load_manifest(base_path), arrival_args) insert_arrival = arrival["windows"][0]["insert_arrival"] if insert_arrival["mode"] != "saturating-backlog": raise AssertionError("arrival mode override failed") if insert_arrival["low_watermark"] != 100 or insert_arrival["high_watermark"] != 500: raise AssertionError("arrival watermark override failed") wait_args = argparse.Namespace(**vars(args)) wait_args.overflow_policy = "wait_for_capacity" wait = derive_manifest(load_manifest(base_path), wait_args) if wait["windows"][0]["overflow_policy"] != "wait_for_capacity": raise AssertionError("overflow policy override failed")
exact_base = copy.deepcopy(base) exact_base["checkpoint_contract"] = "exact-update-counts.v1" exact_base["workload_mode"] = "continuous_uniform" exact_base["window_lifecycle"] = "continuous_logical_windows" exact_base["windows"][0]["checkpoint_update_counts"] = { "insert": 50000, "mark_delete": 50000, } exact_args = argparse.Namespace( **{ **vars(mixed_args), "workload_mode": None, "duration_seconds": 30.0, } ) exact = derive_manifest(exact_base, exact_args) if exact["workload_mode"] != "continuous_uniform": raise AssertionError("exact checkpoint default should preserve the runtime mode") if exact["windows"][0]["merge_delete_mode"] != "concurrent": raise AssertionError("continuous derivatives must preserve the merge trigger") if exact["windows"][0]["checkpoint_update_counts"] != ( exact_base["windows"][0]["checkpoint_update_counts"] ): raise AssertionError("exact checkpoint binding was not preserved") if exact["windows"][0]["duration_seconds"] != 30.0: raise AssertionError("exact checkpoint should allow duration changes") for field in ("target_insert_count", "target_mark_delete_count"): changed_args = argparse.Namespace(**{**vars(exact_args), field: 0}) try: derive_manifest(exact_base, changed_args) except ValueError as exc: if "forbids changing update counts" not in str(exc): raise else: raise AssertionError(f"exact checkpoint accepted changed {field}") missing_binding = copy.deepcopy(exact_base) del missing_binding["windows"][0]["checkpoint_update_counts"] try: derive_manifest(missing_binding, exact_args) except ValueError as exc: if "forbids changing update counts" not in str(exc): raise else: raise AssertionError("exact checkpoint accepted a missing count binding") changed_mode_args = argparse.Namespace( **{**vars(exact_args), "workload_mode": "decomposition"} ) try: derive_manifest(exact_base, changed_mode_args) except ValueError as exc: if "preserve the window lifecycle" not in str(exc): raise else: raise AssertionError("exact checkpoint accepted an incompatible lifecycle") legacy_default = derive_manifest(base, exact_args) if legacy_default["workload_mode"] != "decomposition": raise AssertionError("legacy default must remain decomposition")
print("self-test: OK")
def main() -> int: args = parse_args() if args.self_test: run_self_test() return 0 require_args(args) manifest = derive_manifest(load_manifest(args.base_manifest), args) write_manifest(args.output_manifest, manifest) print(args.output_manifest) return 0
if __name__ == "__main__": raise SystemExit(main())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392#!/usr/bin/env python3
from __future__ import annotations
import argparseimport jsonimport structimport sysimport tempfilefrom array import arrayfrom pathlib import Path
UINT32_SPACE = 1 << 32DEFAULT_UNIFORM_DATA_WORKERS = 7DEFAULT_UNIFORM_MERGE_WORKERS = 2DEFAULT_UNIFORM_QUERY_RATIO = 18DEFAULT_UNIFORM_INSERT_RATIO = 1DEFAULT_UNIFORM_MARK_DELETE_RATIO = 1DEFAULT_UNIFORM_RATIO_WINDOW_MULTIPLIER = 20
def positive_int(value: str) -> int: parsed = int(value) if parsed <= 0: raise argparse.ArgumentTypeError("value must be positive") return parsed
def positive_float(value: str) -> float: parsed = float(value) if parsed <= 0.0: raise argparse.ArgumentTypeError("value must be positive") return parsed
def nonnegative_float(value: str) -> float: parsed = float(value) if parsed < 0.0: raise argparse.ArgumentTypeError("value must be non-negative") return parsed
def fraction(value: str) -> float: parsed = float(value) if not 0.0 < parsed <= 1.0: raise argparse.ArgumentTypeError("value must be in (0, 1]") return parsed
def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser( description=( "Materialize compact batch-update-eval descriptors as paired " "concurrent ID/vector-ref streams without copying vectors." ), formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument("--batch-workload-root", type=Path) parser.add_argument( "--insert-vector-source-root", type=Path, help="Existing shared base_permuted vector directory; defaults to the workload root.", ) parser.add_argument( "--runtime-insert-vector-source-root", type=Path, help=( "Cluster directory for shared vectors; defaults to an explicit local " "source root, otherwise the runtime workload root." ), ) parser.add_argument("--trace-id", default="mixed-replace-100") parser.add_argument("--output-dir", type=Path) parser.add_argument( "--query-path", type=Path, help="Existing query matrix referenced by every generated window.", ) parser.add_argument( "--initial-groundtruth-path", type=Path, help=( "Override the first pre-update checkpoint ground truth. Required " "when the selected initial-state object has no local path." ), ) parser.add_argument( "--runtime-output-dir", type=Path, help="Cluster path for generated files; defaults to --output-dir.", ) parser.add_argument( "--runtime-batch-workload-root", type=Path, help="Cluster path for the canonical package; defaults to its local path.", ) parser.add_argument( "--runtime-query-path", type=Path, help="Cluster path for --query-path; defaults to its local path.", ) parser.add_argument( "--runtime-initial-groundtruth-path", type=Path, help="Cluster path for an explicit initial ground-truth override.", ) parser.add_argument("--start-batch-index", type=positive_int, default=1) parser.add_argument("--window-count", type=positive_int, default=1) parser.add_argument( "--target-query-count", type=positive_int, help=( "Defaults to the row count in --query-path, or the configured " "uniform ratio with --uniform-e6." ), ) parser.add_argument( "--target-insert-count", type=positive_int, help="Defaults to each source batch's full insert count.", ) parser.add_argument( "--target-mark-delete-count", type=positive_int, help="Defaults to each source batch's full delete count.", ) parser.add_argument("--duration-seconds", type=positive_float, default=60.0) parser.add_argument("--warmup-seconds", type=nonnegative_float, default=0.0) parser.add_argument( "--query-rate-qps", type=nonnegative_float, default=0.0, help="Zero derives target_query_count / duration_seconds.", ) parser.add_argument( "--insert-rate-ops", type=nonnegative_float, default=0.0, help="Zero derives target_insert_count / duration_seconds.", ) parser.add_argument( "--mark-delete-rate-ops", type=nonnegative_float, default=0.0, help="Zero derives target_mark_delete_count / duration_seconds.", ) parser.add_argument("--search-threads", type=positive_int) parser.add_argument("--insert-threads", type=positive_int) parser.add_argument("--mark-delete-threads", type=positive_int) parser.add_argument( "--merge-delete-threads", type=positive_int, help="Legacy manifest hint; incompatible with --uniform-e6.", ) parser.add_argument("--search-max-queue-depth", type=positive_int, default=10000) parser.add_argument("--insert-max-queue-depth", type=positive_int, default=5000) parser.add_argument( "--mark-delete-max-queue-depth", type=positive_int, default=5000 ) parser.add_argument( "--merge-delete-max-queue-depth", type=positive_int, default=1000 ) parser.add_argument("--search-max-inflight", type=positive_int, default=10000) parser.add_argument("--insert-max-inflight", type=positive_int, default=5000) parser.add_argument( "--mark-delete-max-inflight", type=positive_int, default=5000 ) parser.add_argument("--merge-delete-max-inflight", type=positive_int, default=1000) parser.add_argument( "--overflow-policy", choices=("reject_new", "wait_for_capacity"), default="wait_for_capacity", ) parser.add_argument("--workload-id", default="batch-update-concurrent") parser.add_argument( "--uniform-e6", action="store_true", help=( "Emit one continuous cyclic ratio-controlled E6 workload. Source " "windows remain logical input/progress segments only: they do not " "drain or synchronize the runtime. MergeDelete epochs are sealed " "at successful all-CN MarkDelete ACK thresholds." ), ) parser.add_argument( "--uniform-skip-final-merge-delete", action="store_true", help=( "With --uniform-e6, keep the final source segment's foreground mix " "active but disable its MergeDelete trigger. Tombstones accumulated " "since the preceding frozen epoch remain unmerged; that group may " "span multiple source segments." ), ) parser.add_argument( "--uniform-data-workers", type=positive_int, default=DEFAULT_UNIFORM_DATA_WORKERS, ) parser.add_argument( "--uniform-merge-workers", type=positive_int, default=DEFAULT_UNIFORM_MERGE_WORKERS, ) parser.add_argument( "--uniform-query-ratio", type=positive_int, default=DEFAULT_UNIFORM_QUERY_RATIO, ) parser.add_argument( "--uniform-insert-ratio", type=positive_int, default=DEFAULT_UNIFORM_INSERT_RATIO, ) parser.add_argument( "--uniform-mark-delete-ratio", type=positive_int, default=DEFAULT_UNIFORM_MARK_DELETE_RATIO, ) parser.add_argument( "--uniform-ratio-window-multiplier", type=positive_int, default=DEFAULT_UNIFORM_RATIO_WINDOW_MULTIPLIER, help=( "Per-CN admission-window multiplier W; each full local window " "admits QW/IW/DW tickets." ), ) parser.add_argument( "--acknowledged-tombstone-fraction", type=fraction, default=0.05, help="Active-set fraction of successful all-CN ACKs per repair epoch.", ) parser.add_argument( "--workload-mode", choices=("decomposition", "smoke", "debug"), default="decomposition", help=( "Used for legacy materialization. --uniform-e6 emits " "continuous_uniform." ), ) parser.add_argument( "--source-snapshot", default="", help="Optional dataset snapshot/commit recorded in metadata.json.", ) parser.add_argument("--self-test", action="store_true") return parser.parse_args()
def require_path(value: Path | None, flag: str) -> Path: if value is None: raise ValueError(f"{flag} is required") return value
def checked_child(raw: str, base: Path, root: Path, name: str) -> Path: if not raw: raise ValueError(f"{name} path must not be empty") relative = Path(raw) if relative.is_absolute(): raise ValueError(f"{name} path must be relative: {relative}") try: resolved = (base / relative).resolve(strict=True) except FileNotFoundError as exc: raise FileNotFoundError(f"missing {name}: {base / relative}") from exc try: resolved.relative_to(root) except ValueError as exc: raise ValueError(f"{name} escapes workload package: {relative}") from exc return resolved
def runtime_path(local_path: Path, local_root: Path, runtime_root: Path) -> Path: return runtime_root / local_path.relative_to(local_root)
def load_json(path: Path) -> dict: try: loaded = json.loads(path.read_text(encoding="utf-8")) except FileNotFoundError as exc: raise FileNotFoundError(f"missing JSON file: {path}") from exc if not isinstance(loaded, dict): raise ValueError(f"expected JSON object: {path}") return loaded
def matrix_rows(path: Path, name: str) -> int: with path.open("rb") as inp: header = inp.read(8) if len(header) != 8: raise ValueError(f"missing {name} matrix header: {path}") rows, columns = struct.unpack("<II", header) if rows == 0 or columns == 0: raise ValueError(f"invalid {name} matrix header: {path}") return rows
def read_u32(path: Path, offset: int, count: int) -> array: if sys.byteorder != "little": raise RuntimeError("u32 descriptors require a little-endian host") with path.open("rb") as inp: inp.seek(offset * 4) raw = inp.read(count * 4) if len(raw) != count * 4: raise ValueError(f"truncated u32 sequence file: {path}") values = array("I") values.frombytes(raw) return values
def decode_sequence(descriptor: object, batch_path: Path, package_root: Path) -> array: if not isinstance(descriptor, dict): raise ValueError(f"expected sequence descriptor in {batch_path}") encoding = descriptor.get("encoding") count = int(descriptor.get("count", -1)) if count < 0: raise ValueError(f"invalid sequence count in {batch_path}") if encoding == "range": begin = int(descriptor.get("begin", -1)) if begin < 0 or begin > UINT32_SPACE or count > UINT32_SPACE - begin: raise ValueError(f"range sequence exceeds uint32 space in {batch_path}") return array("I", range(begin, begin + count)) if encoding not in ("u32_slice", "u32_cyclic_slice"): raise ValueError(f"unsupported sequence encoding {encoding!r} in {batch_path}")
sequence_path = checked_child( str(descriptor.get("path", "")), batch_path.parent, package_root, "sequence descriptor", ) file_bytes = sequence_path.stat().st_size if file_bytes % 4: raise ValueError(f"unaligned u32 sequence file: {sequence_path}") file_items = file_bytes // 4 offset = int(descriptor.get("offset_items", -1)) if offset < 0: raise ValueError(f"invalid sequence offset in {batch_path}") if encoding == "u32_slice": if offset > file_items or count > file_items - offset: raise ValueError(f"u32_slice exceeds sequence file: {sequence_path}") return read_u32(sequence_path, offset, count)
wrap = int(descriptor.get("wrap_at_items", 0)) if wrap <= 0 or wrap > file_items: raise ValueError(f"invalid cyclic wrap in {batch_path}") values = array("I") cursor = offset % wrap remaining = count while remaining: chunk_count = min(remaining, wrap - cursor) values.extend(read_u32(sequence_path, cursor, chunk_count)) remaining -= chunk_count cursor = 0 return values
def validate_unique(values: array, name: str) -> None: if len(set(values)) != len(values): raise ValueError(f"duplicate values in {name}")
def resolve_batch( batch_path: Path, package_root: Path, trace_id: str, vector_count: int) -> tuple[array, array, array, dict]: batch = load_json(batch_path) if batch.get("schema") != "batch-update-eval-batch.v1": raise ValueError(f"unsupported batch schema: {batch_path}") if batch.get("trace_id") != trace_id: raise ValueError(f"batch trace ID mismatch: {batch_path}") expected_index = int(batch_path.stem.removeprefix("batch_")) if int(batch.get("batch_index", -1)) != expected_index: raise ValueError(f"batch index mismatch: {batch_path}")
insert_ids = None insert_refs = None delete_ids = None operations = batch.get("operations") if not isinstance(operations, list): raise ValueError(f"missing batch operations: {batch_path}") for operation in operations: if not isinstance(operation, dict): raise ValueError(f"invalid batch operation: {batch_path}") operation_type = operation.get("type") ids = decode_sequence(operation.get("external_ids"), batch_path, package_root) if len(ids) != int(operation.get("count", -1)): raise ValueError(f"operation count mismatch: {batch_path}") validate_unique(ids, f"{operation_type}.external_ids") if operation_type == "insert": if insert_ids is not None: raise ValueError(f"multiple insert operations: {batch_path}") refs = decode_sequence(operation.get("vector_refs"), batch_path, package_root) if len(refs) != len(ids): raise ValueError(f"insert ID/vector-ref count mismatch: {batch_path}") validate_unique(refs, "insert.vector_refs") if any(ref >= vector_count for ref in refs): raise ValueError(f"insert vector ref exceeds source count: {batch_path}") insert_ids, insert_refs = ids, refs elif operation_type == "delete": if delete_ids is not None: raise ValueError(f"multiple delete operations: {batch_path}") delete_ids = ids else: raise ValueError(f"unsupported operation type {operation_type!r}: {batch_path}") if insert_ids is None or insert_refs is None or delete_ids is None: raise ValueError(f"concurrent materialization requires insert and delete: {batch_path}") return insert_ids, insert_refs, delete_ids, batch
def write_u32(path: Path, values: array) -> None: if sys.byteorder != "little": raise RuntimeError("u32 streams require a little-endian host") with path.open("xb") as out: values.tofile(out)
def write_json(path: Path, value: dict) -> None: with path.open("x", encoding="utf-8") as out: json.dump(value, out, indent=2) out.write("\n")
def resolve_package(args: argparse.Namespace) -> tuple[Path, dict, Path, dict]: root = require_path(args.batch_workload_root, "--batch-workload-root").resolve( strict=True ) workload = load_json(root / "workload.json") if workload.get("schema") != "batch-update-eval-workload.v1": raise ValueError(f"unsupported workload schema: {root / 'workload.json'}") trace_entry = next( ( item for item in workload.get("traces", []) if isinstance(item, dict) and item.get("id") == args.trace_id ), None, ) if trace_entry is None: raise ValueError(f"unknown trace {args.trace_id!r}") batch_dir = checked_child( str(trace_entry.get("batches", "")), root, root, "trace batch directory" ) trace = load_json(batch_dir.parent / "trace.json") if trace.get("schema") != "batch-update-eval-trace.v1": raise ValueError(f"unsupported trace schema: {batch_dir.parent / 'trace.json'}") if trace.get("trace_id") != args.trace_id: raise ValueError(f"trace ID mismatch: {batch_dir.parent / 'trace.json'}") last_batch = args.start_batch_index + args.window_count - 1 if last_batch > int(trace.get("batch_count", 0)): raise ValueError("requested windows exceed trace batch_count") return root, workload, batch_dir, trace
def pre_update_groundtruth( *, args: argparse.Namespace, root: Path, runtime_root: Path, initial_state: dict, batch_dir: Path, batch_index: int,) -> tuple[Path, Path, int]: if batch_index == 1: if args.initial_groundtruth_path is not None: local = args.initial_groundtruth_path.resolve(strict=True) runtime = ( args.runtime_initial_groundtruth_path or args.initial_groundtruth_path.resolve() ) else: raw_groundtruth = initial_state.get("groundtruth") if not raw_groundtruth: raise ValueError( "trace needs --initial-groundtruth-path because its initial " "state has no local groundtruth path" ) local = checked_child( str(raw_groundtruth), root, root, "initial ground truth" ) runtime = runtime_path(local, root, runtime_root) live_count = int(initial_state.get("live_count", 0)) else: previous_path = batch_dir / f"batch_{batch_index - 1:04d}.json" previous = load_json(previous_path) checkpoint = previous.get("checkpoint") if not isinstance(checkpoint, dict): raise ValueError(f"missing checkpoint: {previous_path}") local = checked_child( str(checkpoint.get("groundtruth", checkpoint.get("groundtruth_path", ""))), batch_dir.parent, root, "checkpoint ground truth", ) runtime = runtime_path(local, root, runtime_root) live_count = int(checkpoint.get("live_count", checkpoint.get("active_count", 0))) if live_count <= 0 or live_count >= UINT32_SPACE: raise ValueError(f"invalid pre-update live count for batch {batch_index}") return local, Path(runtime), live_count
def materialize(args: argparse.Namespace) -> Path: if args.uniform_skip_final_merge_delete and not args.uniform_e6: raise ValueError( "--uniform-skip-final-merge-delete requires --uniform-e6" ) if args.uniform_e6: if any( value is not None for value in ( args.search_threads, args.insert_threads, args.mark_delete_threads, args.merge_delete_threads, ) ): raise ValueError( "--uniform-e6 cannot be combined with legacy per-class thread hints" ) if args.uniform_merge_workers > args.uniform_data_workers: raise ValueError( "--uniform-merge-workers must not exceed --uniform-data-workers" ) if args.overflow_policy != "wait_for_capacity": raise ValueError( "--uniform-e6 requires --overflow-policy=wait_for_capacity" ) root, workload, batch_dir, trace = resolve_package(args) checkpoint_contract = workload.get("checkpoint_contract") if checkpoint_contract not in (None, "exact-update-counts.v1"): raise ValueError(f"unsupported checkpoint contract: {checkpoint_contract!r}") if checkpoint_contract and args.start_batch_index != 1: raise ValueError( "exact-update-counts.v1 requires --start-batch-index=1; " "later batches need a separately generated initial-state package" ) output = require_path(args.output_dir, "--output-dir").resolve() try: output.relative_to(root) except ValueError: pass else: raise ValueError("--output-dir must not be inside --batch-workload-root") output.mkdir(parents=True, exist_ok=True) if any(output.iterdir()): raise ValueError(f"--output-dir must be empty: {output}")
query = require_path(args.query_path, "--query-path").resolve(strict=True) runtime_output = (args.runtime_output_dir or output).resolve() runtime_root = (args.runtime_batch_workload_root or root).resolve() runtime_query = Path(args.runtime_query_path or query) query_rows = matrix_rows(query, "query")
vector_source = workload.get("insert_vector_source") if not isinstance(vector_source, dict): raise ValueError("workload is missing insert_vector_source") vector_count = int(vector_source.get("row_count", workload.get("base_count", 0))) explicit_vector_root = getattr(args, "insert_vector_source_root", None) explicit_runtime_vector_root = getattr(args, "runtime_insert_vector_source_root", None) local_vector_root = ( Path(explicit_vector_root).resolve(strict=True) if explicit_vector_root else root ) runtime_vector_root = Path(explicit_runtime_vector_root or runtime_root).resolve() if explicit_vector_root and not explicit_runtime_vector_root: runtime_vector_root = local_vector_root if explicit_vector_root or explicit_runtime_vector_root: if vector_source.get("path") not in ( "base_permuted.fbin", "base_permuted.u8bin", "base_permuted.i8bin" ): raise ValueError( "shared insert vector source must use the runtime filename " "base_permuted.fbin, base_permuted.u8bin, or base_permuted.i8bin" ) local_vector_path = checked_child( str(vector_source.get("path", "")), local_vector_root, local_vector_root, "insert vector source", ) runtime_vector_path = runtime_path(local_vector_path, local_vector_root, runtime_vector_root) initial_state_id = trace.get("initial_state") initial_state = workload.get("initial", {}) if initial_state_id: initial_state = next( ( value for value in workload.values() if isinstance(value, dict) and value.get("state_id") == initial_state_id ), {}, ) if not isinstance(initial_state, dict) or not initial_state: raise ValueError(f"missing initial-state metadata for trace {args.trace_id!r}")
windows = [] generated = [] for window_offset in range(args.window_count): batch_index = args.start_batch_index + window_offset batch_path = batch_dir / f"batch_{batch_index:04d}.json" insert_ids, insert_refs, delete_ids, batch = resolve_batch( batch_path, root, args.trace_id, vector_count ) source_insert_count = len(insert_ids) source_delete_count = len(delete_ids) if checkpoint_contract and ( args.target_insert_count not in (None, source_insert_count) or args.target_mark_delete_count not in (None, source_delete_count) ): raise ValueError( "exact-update-counts.v1 forbids changing update counts while " "retaining checkpoint ground truth; generate a new workload" ) insert_count = args.target_insert_count or len(insert_ids) delete_count = args.target_mark_delete_count or len(delete_ids) if insert_count > len(insert_ids) or delete_count > len(delete_ids): raise ValueError(f"target operation count exceeds source batch {batch_index}") insert_ids = insert_ids[:insert_count] insert_refs = insert_refs[:insert_count] delete_ids = delete_ids[:delete_count] ratio_units = 0 if args.uniform_e6: if ( insert_count == 0 or insert_count % args.uniform_insert_ratio != 0 or delete_count % args.uniform_mark_delete_ratio != 0 or insert_count // args.uniform_insert_ratio != delete_count // args.uniform_mark_delete_ratio ): raise ValueError( "--uniform-e6 update counts must match the configured " "insert:mark-delete ratio" ) ratio_units = insert_count // args.uniform_insert_ratio e6_target_queries = args.uniform_query_ratio * ratio_units if ( args.uniform_e6 and args.target_query_count is not None and args.target_query_count != e6_target_queries ): raise ValueError( "--uniform-e6 target_query_count does not match the configured ratio" ) target_queries = ( e6_target_queries if args.uniform_e6 else (args.target_query_count or query_rows) ) if not args.uniform_e6 and target_queries > query_rows: raise ValueError( "--target-query-count exceeds --query-path rows; use " "--uniform-e6 for cyclic canonical queries" )
window_id = window_offset + 1 insert_name = f"window_{window_id:04d}_insert_external_ids.u32" refs_name = f"window_{window_id:04d}_insert_vector_refs.u32" delete_name = f"window_{window_id:04d}_mark_delete_external_ids.u32" write_u32(output / insert_name, insert_ids) write_u32(output / refs_name, insert_refs) write_u32(output / delete_name, delete_ids)
local_gt, runtime_gt, live_count = pre_update_groundtruth( args=args, root=root, runtime_root=runtime_root, initial_state=initial_state, batch_dir=batch_dir, batch_index=batch_index, ) post_update_runtime_gt = None checkpoint = batch.get("checkpoint") if isinstance(checkpoint, dict): checkpoint_path = checkpoint.get( "groundtruth", checkpoint.get("groundtruth_path", "") ) if checkpoint_path: post_update_local_gt = checked_child( str(checkpoint_path), batch_dir.parent, root, "post-update checkpoint ground truth", ) post_update_runtime_gt = runtime_path( post_update_local_gt, root, runtime_root ) if ( args.uniform_e6 and matrix_rows(post_update_local_gt, "ground-truth") != query_rows ): raise ValueError( "--uniform-e6 requires query and post-update checkpoint " "ground-truth row counts to match" ) if args.uniform_e6 and post_update_runtime_gt is None: raise ValueError( "--uniform-e6 requires post-update checkpoint ground truth" ) if not args.uniform_e6 and target_queries > matrix_rows( local_gt, "ground-truth" ): raise ValueError( f"target query count exceeds pre-update ground-truth rows: {local_gt}" ) if args.uniform_e6 and matrix_rows(local_gt, "ground-truth") != query_rows: raise ValueError( "--uniform-e6 requires query and checkpoint ground-truth row " f"counts to match: query={query_rows} groundtruth={local_gt}" ) query_rate = args.query_rate_qps or target_queries / args.duration_seconds insert_rate = args.insert_rate_ops or insert_count / args.duration_seconds delete_rate = ( args.mark_delete_rate_ops or delete_count / args.duration_seconds ) legacy_thread_hints = { "search": args.search_threads or 26, "insert": args.insert_threads or 4, "mark_delete": args.mark_delete_threads or 1, "merge_delete": args.merge_delete_threads or 0, } skip_merge_delete = ( args.uniform_e6 and args.uniform_skip_final_merge_delete and window_offset + 1 == args.window_count ) merge_delete_mode = "disabled" merge_delete_schedule: list[dict] = [] merge_delete_trigger = None if args.uniform_e6: legacy_thread_hints = { "search": 1, "insert": 1, "mark_delete": 1, "merge_delete": 1, } if not skip_merge_delete: merge_delete_mode = "concurrent" merge_delete_trigger = { "kind": "acknowledged_tombstone_fraction", "threshold": args.acknowledged_tombstone_fraction, "semantics": ( "successful_all_cn_acks_since_previous_frozen_epoch" ), "reference_node_count": vector_count, }
windows.append( { "window_id": window_id, "query_path": str(runtime_query), "pre_update_checkpoint_groundtruth_path": str(runtime_gt), "insert_ids_path": str(runtime_output / insert_name), "insert_vector_refs_path": str(runtime_output / refs_name), "mark_delete_ids_path": str(runtime_output / delete_name), "target_query_count": target_queries, "target_insert_count": insert_count, "target_mark_delete_count": delete_count, "duration_seconds": args.duration_seconds, "query_rate_qps": query_rate, "insert_rate_ops": insert_rate, "mark_delete_rate_ops": delete_rate, "search_arrival": { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, "insert_arrival": { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, "mark_delete_arrival": { "mode": "fixed-rate", "low_watermark": 0, "high_watermark": 0, "poll_interval_us": 100, }, "warmup_seconds": args.warmup_seconds, "stop_policy": "drain_after_duration", "allocation_scope": "uniform_all_cns", "search_threads": legacy_thread_hints["search"], "insert_threads": legacy_thread_hints["insert"], "mark_delete_threads": legacy_thread_hints["mark_delete"], "merge_delete_threads": legacy_thread_hints["merge_delete"], "merge_delete_mode": merge_delete_mode, "merge_delete_schedule": merge_delete_schedule, "max_queue_depth": { "search": args.search_max_queue_depth, "insert": args.insert_max_queue_depth, "mark_delete": args.mark_delete_max_queue_depth, "merge_delete_repair": ( args.merge_delete_max_queue_depth if args.uniform_e6 else 1 ), "merge_delete_gc": ( args.merge_delete_max_queue_depth if args.uniform_e6 else 1 ), }, "max_inflight": { "search": args.search_max_inflight, "insert": args.insert_max_inflight, "mark_delete": args.mark_delete_max_inflight, "merge_delete_repair": ( args.merge_delete_max_inflight if args.uniform_e6 else 1 ), "merge_delete_gc": ( args.merge_delete_max_inflight if args.uniform_e6 else 1 ), }, "overflow_policy": args.overflow_policy, "source": { "kind": "converted_batch", "batch_workload_root": str(runtime_vector_root), "batch_index": batch_index, "batch_json_path": str( runtime_path(batch_path, root, runtime_root) ), "query_path": str(runtime_query), "pre_update_checkpoint_groundtruth_path": str(runtime_gt), "insert_count": source_insert_count, "delete_count": source_delete_count, "active_begin": 0, "active_end_exclusive": live_count, "active_count": live_count, }, } ) if checkpoint_contract: windows[-1]["checkpoint_update_counts"] = { "insert": source_insert_count, "mark_delete": source_delete_count, } if args.uniform_e6: windows[-1]["query_repetition"] = "cyclic" if merge_delete_trigger is not None: windows[-1]["merge_delete_trigger"] = merge_delete_trigger if post_update_runtime_gt is not None and ( not args.uniform_e6 or window_offset + 1 == args.window_count ): windows[-1]["post_update_checkpoint_groundtruth_path"] = str( post_update_runtime_gt ) generated.append( { "window_id": window_id, "batch_index": batch_index, "source_batch_json": str(batch_path), "insert_external_ids": insert_name, "insert_vector_refs": refs_name, "mark_delete_external_ids": delete_name, "insert_count": insert_count, "mark_delete_count": delete_count, "checkpoint": batch.get("checkpoint"), } )
manifest = { "version": 1, "workload_id": args.workload_id, "workload_mode": "continuous_uniform" if args.uniform_e6 else args.workload_mode, "window_lifecycle": ( "continuous_logical_windows" if args.uniform_e6 else "one_active_window" ), "windows": windows, } metadata = { "schema": "concurrent-batch-materialization.v1", "source_snapshot": args.source_snapshot or None, "source_workload_root": str(root), "runtime_batch_workload_root": str(runtime_root), "trace_id": args.trace_id, "insert_vector_source": { "local_root": str(local_vector_root), "runtime_root": str(runtime_vector_root), "local_path": str(local_vector_path), "runtime_path": str(runtime_vector_path), "row_count": vector_count, "copied": False, }, "query": { "local_path": str(query), "runtime_path": str(runtime_query), "copied": False, }, "generated": generated, } if checkpoint_contract: manifest["checkpoint_contract"] = checkpoint_contract metadata["checkpoint_contract"] = checkpoint_contract if args.uniform_e6: metadata["runtime_contract"] = { "task_runtime": "uniform", "execution_model": "continuous_total_admission", "legacy_thread_fields": "schema_validation_only", "query_repetition": "cyclic", "merge_trigger": "successful_all_cn_delete_ack_threshold", "repair_partition": "striped_by_sorted_tombstone_index", "final_window_merge_delete": ( "disabled" if args.uniform_skip_final_merge_delete else "trigger_enabled" ), "uniform_profile": { "total_threads": args.uniform_data_workers + 1, "control_workers": 1, "data_workers": args.uniform_data_workers, "merge_workers": args.uniform_merge_workers, "admission_ratio": { "query": args.uniform_query_ratio, "insert": args.uniform_insert_ratio, "mark_delete": args.uniform_mark_delete_ratio, }, "ratio_window_multiplier": args.uniform_ratio_window_multiplier, "ratio_window_scope": "per_cn", "logical_windows": "input_and_progress_only", "merge_trigger": "successful_all_cn_delete_ack_threshold", "repair_partition": "striped_by_sorted_tombstone_index", }, "final_safepoint": "query_insert_quiescence_recorded", } write_json(output / "metadata.json", metadata) manifest_path = output / "manifest.json" write_json(manifest_path, manifest) return manifest_path
def write_matrix_header(path: Path, rows: int, columns: int) -> None: path.parent.mkdir(parents=True, exist_ok=True) path.write_bytes(struct.pack("<II", rows, columns))
def write_test_batch( path: Path, index: int, operations: list[dict], *, include_checkpoint: bool = True,) -> None: path.parent.mkdir(parents=True, exist_ok=True) payload = { "schema": "batch-update-eval-batch.v1", "trace_id": "mixed", "batch_index": index, "operations": operations, } if include_checkpoint: payload["checkpoint"] = { "index": index, "groundtruth": f"groundtruth/checkpoint_{index:04d}.bin", "live_count": 8, } write_json(path, payload)
def run_self_test() -> None: with tempfile.TemporaryDirectory(prefix="vectordb_concurrent_batch_") as tmp: temp_root = Path(tmp) root = temp_root / "package" output = temp_root / "output" trace_root = root / "traces/mixed" batch_dir = trace_root / "batches" batch_dir.mkdir(parents=True) write_json( root / "workload.json", { "schema": "batch-update-eval-workload.v1", "base_count": 8, "initial_count": 8, "initial": { "state_id": "initial-8", "groundtruth": "groundtruth/initial.bin", "live_count": 8, }, "insert_vector_source": { "path": "base_permuted.fbin", "row_count": 8, }, "traces": [ { "id": "mixed", "batches": "traces/mixed/batches", "batch_count": 6, } ], }, ) write_json( trace_root / "trace.json", { "schema": "batch-update-eval-trace.v1", "trace_id": "mixed", "batch_count": 6, }, ) write_matrix_header(root / "groundtruth/initial.bin", 4, 10) for checkpoint_index in range(1, 7): write_matrix_header( trace_root / f"groundtruth/checkpoint_{checkpoint_index:04d}.bin", 4, 10, ) write_matrix_header(root / "query.fbin", 4, 2) write_matrix_header(root / "base_permuted.fbin", 8, 2) order = array("I", [7, 2, 6, 1, 5, 0, 4, 3]) write_u32(root / "update_order.u32", order) write_test_batch( batch_dir / "batch_0001.json", 1, [ { "type": "delete", "count": 2, "external_ids": { "encoding": "u32_cyclic_slice", "path": "../../../update_order.u32", "offset_items": 7, "count": 2, "wrap_at_items": 8, }, }, { "type": "insert", "count": 2, "external_ids": { "encoding": "u32_slice", "path": "../../../update_order.u32", "offset_items": 2, "count": 2, }, "vector_refs": { "encoding": "range", "begin": 4, "count": 2, }, }, ], ) for batch_index in range(2, 7): write_test_batch( batch_dir / f"batch_{batch_index:04d}.json", batch_index, load_json(batch_dir / "batch_0001.json")["operations"], ) args = argparse.Namespace( batch_workload_root=root, trace_id="mixed", output_dir=output, query_path=root / "query.fbin", initial_groundtruth_path=None, runtime_output_dir=Path("/runtime/output"), runtime_batch_workload_root=Path("/runtime/package"), runtime_query_path=Path("/runtime/query.fbin"), runtime_initial_groundtruth_path=None, start_batch_index=1, window_count=1, target_query_count=4, target_insert_count=None, target_mark_delete_count=None, duration_seconds=2.0, warmup_seconds=0.0, query_rate_qps=0.0, insert_rate_ops=0.0, mark_delete_rate_ops=0.0, search_threads=26, insert_threads=4, mark_delete_threads=1, merge_delete_threads=8, search_max_queue_depth=100, insert_max_queue_depth=20, mark_delete_max_queue_depth=20, merge_delete_max_queue_depth=10, search_max_inflight=100, insert_max_inflight=20, mark_delete_max_inflight=20, merge_delete_max_inflight=10, overflow_policy="wait_for_capacity", workload_id="self-test", uniform_e6=False, uniform_skip_final_merge_delete=False, uniform_data_workers=7, uniform_merge_workers=2, uniform_query_ratio=18, uniform_insert_ratio=1, uniform_mark_delete_ratio=1, uniform_ratio_window_multiplier=20, acknowledged_tombstone_fraction=0.05, workload_mode="smoke", source_snapshot="test-snapshot", self_test=False, ) manifest_path = materialize(args) manifest = load_json(manifest_path) metadata = load_json(output / "metadata.json") window = manifest["windows"][0] if list(read_u32(output / "window_0001_insert_external_ids.u32", 0, 2)) != [6, 1]: raise AssertionError("u32_slice external IDs were not materialized") if list(read_u32(output / "window_0001_insert_vector_refs.u32", 0, 2)) != [4, 5]: raise AssertionError("range vector refs were not materialized") if list(read_u32(output / "window_0001_mark_delete_external_ids.u32", 0, 2)) != [3, 7]: raise AssertionError("cyclic delete IDs were not materialized") expected_refs_path = "/runtime/output/window_0001_insert_vector_refs.u32" if window["insert_vector_refs_path"] != expected_refs_path: raise AssertionError("runtime vector-ref path was not emitted") if "query_repetition" in window or window["merge_delete_mode"] != "disabled": raise AssertionError("legacy output should remain single-pass and repair-free") if window["merge_delete_threads"] != 8: raise AssertionError("legacy MergeDelete thread hint was not preserved") if metadata["insert_vector_source"]["copied"] is not False: raise AssertionError("vector source should only be referenced") if (output / "base_permuted.fbin").exists(): raise AssertionError("materializer copied the vector source")
e6_output = temp_root / "e6-output" e6_args = argparse.Namespace( **{ **vars(args), "output_dir": e6_output, "window_count": 6, "target_query_count": None, "uniform_e6": True, "uniform_skip_final_merge_delete": True, "search_threads": None, "insert_threads": None, "mark_delete_threads": None, "merge_delete_threads": None, "uniform_data_workers": 7, "uniform_merge_workers": 2, "uniform_query_ratio": 3, "uniform_ratio_window_multiplier": 20, } ) e6_manifest = load_json(materialize(e6_args)) e6_metadata = load_json(e6_output / "metadata.json") e6_window = e6_manifest["windows"][0] e6_final_window = e6_manifest["windows"][-1] if ( e6_manifest["workload_mode"] != "continuous_uniform" or e6_manifest["window_lifecycle"] != "continuous_logical_windows" or e6_window["target_query_count"] != 6 or e6_window["target_insert_count"] != 2 or e6_window["target_mark_delete_count"] != 2 or e6_window["query_repetition"] != "cyclic" or e6_window["merge_delete_mode"] != "concurrent" or e6_window["merge_delete_schedule"] ): raise AssertionError("uniform E6 counts and modes were not emitted") if e6_window["merge_delete_trigger"] != { "kind": "acknowledged_tombstone_fraction", "threshold": 0.05, "semantics": "successful_all_cn_acks_since_previous_frozen_epoch", "reference_node_count": 8, }: raise AssertionError("uniform E6 ACK trigger was not emitted") if any( "post_update_checkpoint_groundtruth_path" in window for window in e6_manifest["windows"][:-1] ): raise AssertionError( "uniform E6 must not drain for a checkpoint before window 6" ) if e6_final_window["post_update_checkpoint_groundtruth_path"] != ( "/runtime/package/traces/mixed/groundtruth/checkpoint_0006.bin" ): raise AssertionError( "uniform E6 final post-update checkpoint was not emitted" ) if ( e6_final_window["merge_delete_mode"] != "disabled" or "merge_delete_trigger" in e6_final_window or any( window["merge_delete_mode"] != "concurrent" or "merge_delete_trigger" not in window for window in e6_manifest["windows"][:-1] ) ): raise AssertionError( "uniform E6 final-no-merge policy was not emitted" ) if [ e6_window["search_threads"], e6_window["insert_threads"], e6_window["mark_delete_threads"], e6_window["merge_delete_threads"], ] != [1, 1, 1, 1]: raise AssertionError("uniform E6 compatibility thread hints are invalid") if e6_metadata["runtime_contract"] != { "task_runtime": "uniform", "execution_model": "continuous_total_admission", "legacy_thread_fields": "schema_validation_only", "query_repetition": "cyclic", "merge_trigger": "successful_all_cn_delete_ack_threshold", "repair_partition": "striped_by_sorted_tombstone_index", "final_window_merge_delete": "disabled", "uniform_profile": { "total_threads": 8, "control_workers": 1, "data_workers": 7, "merge_workers": 2, "admission_ratio": { "query": 3, "insert": 1, "mark_delete": 1, }, "ratio_window_multiplier": 20, "ratio_window_scope": "per_cn", "logical_windows": "input_and_progress_only", "merge_trigger": "successful_all_cn_delete_ack_threshold", "repair_partition": "striped_by_sorted_tombstone_index", }, "final_safepoint": "query_insert_quiescence_recorded", }: raise AssertionError("uniform E6 runtime contract is ambiguous")
missing_gt_output = temp_root / "missing-gt-output" (trace_root / "groundtruth/checkpoint_0002.bin").rename( temp_root / "checkpoint_0002.missing" ) missing_gt_args = argparse.Namespace( **{ **vars(e6_args), "output_dir": missing_gt_output, "start_batch_index": 2, "window_count": 1, } ) try: materialize(missing_gt_args) except (FileNotFoundError, ValueError) as exc: if "post-update checkpoint ground truth" not in str(exc): raise else: raise AssertionError( "uniform E6 should require post-update checkpoint ground truth" )
mismatched_output = temp_root / "mismatched-output" mismatched_args = argparse.Namespace( **{ **vars(e6_args), "output_dir": mismatched_output, "target_mark_delete_count": 1, } ) try: materialize(mismatched_args) except ValueError as exc: if "configured insert:mark-delete ratio" not in str(exc): raise else: raise AssertionError("uniform E6 should reject unpaired mixed counts")
legacy_hint_output = temp_root / "legacy-hint-output" legacy_hint_args = argparse.Namespace( **{ **vars(e6_args), "output_dir": legacy_hint_output, "search_threads": 1, } ) try: materialize(legacy_hint_args) except ValueError as exc: if "legacy per-class thread hints" not in str(exc): raise else: raise AssertionError("uniform E6 should reject legacy thread hints")
escaped = temp_root / "outside.u32" write_u32(escaped, array("I", [1])) try: decode_sequence( { "encoding": "u32_slice", "path": "../../../../outside.u32", "offset_items": 0, "count": 1, }, batch_dir / "batch_0001.json", root.resolve(), ) except ValueError as exc: if "escapes workload package" not in str(exc): raise else: raise AssertionError("descriptor path escape should fail")
shared_root = temp_root / "shared-vectors" shared_root.mkdir() (root / "base_permuted.fbin").rename(shared_root / "base_permuted.fbin") exact_workload = load_json(root / "workload.json") exact_workload["checkpoint_contract"] = "exact-update-counts.v1" (root / "workload.json").write_text(json.dumps(exact_workload), encoding="utf-8") write_u32(root / "selected_refs.u32", array("I", [7, 4])) exact_batch = load_json(batch_dir / "batch_0001.json") exact_batch["operations"][1]["vector_refs"] = { "encoding": "u32_slice", "path": "../../../selected_refs.u32", "offset_items": 0, "count": 2, } (batch_dir / "batch_0001.json").write_text(json.dumps(exact_batch), encoding="utf-8") exact_args = argparse.Namespace( **{ **vars(e6_args), "output_dir": temp_root / "shared-output", "window_count": 1, "uniform_skip_final_merge_delete": False, "insert_vector_source_root": shared_root, "runtime_insert_vector_source_root": Path("/runtime/shared-vectors"), "target_insert_count": 2, "target_mark_delete_count": 2, } ) exact_manifest = load_json(materialize(exact_args)) exact_window = exact_manifest["windows"][0] if exact_manifest.get("checkpoint_contract") != "exact-update-counts.v1": raise AssertionError("checkpoint count contract was not preserved") if exact_window["checkpoint_update_counts"] != {"insert": 2, "mark_delete": 2}: raise AssertionError("checkpoint update counts were not bound") if list(read_u32(exact_args.output_dir / "window_0001_insert_vector_refs.u32", 0, 2)) != [7, 4]: raise AssertionError("arbitrary selected vector refs were not preserved") if exact_window["source"]["batch_workload_root"] != "/runtime/shared-vectors": raise AssertionError("runtime did not receive the shared vector root") if exact_window["source"]["batch_json_path"] != ( "/runtime/package/traces/mixed/batches/batch_0001.json" ): raise AssertionError("shared vectors changed the workload artifact root") exact_metadata = load_json(exact_args.output_dir / "metadata.json") if exact_metadata["insert_vector_source"]["runtime_path"] != ( "/runtime/shared-vectors/base_permuted.fbin" ): raise AssertionError("shared vector metadata does not match runtime source") if (exact_args.output_dir / "base_permuted.fbin").exists(): raise AssertionError("shared vector source was copied")
for field, value, message in ( ("target_insert_count", 1, "forbids changing update counts"), ("target_mark_delete_count", 1, "forbids changing update counts"), ("start_batch_index", 2, "requires --start-batch-index=1"), ): rejected_args = argparse.Namespace( **{**vars(exact_args), field: value, "output_dir": temp_root / field} ) try: materialize(rejected_args) except ValueError as exc: if message not in str(exc): raise else: raise AssertionError(f"exact checkpoint accepted invalid {field}")
linked_root = temp_root / "escaped-vectors" linked_root.mkdir() (linked_root / "base_permuted.fbin").symlink_to(shared_root / "base_permuted.fbin") escaped_args = argparse.Namespace( **{ **vars(exact_args), "insert_vector_source_root": linked_root, "output_dir": temp_root / "escaped-vector-output", } ) try: materialize(escaped_args) except ValueError as exc: if "escapes workload package" not in str(exc): raise else: raise AssertionError("shared vector source escaped its explicit root") print("self-test: OK")
def main() -> int: args = parse_args() if args.self_test: run_self_test() return 0 manifest_path = materialize(args) print(manifest_path) return 0
if __name__ == "__main__": raise SystemExit(main())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123{ "schema_version": 1, "dataset_id": "deep100", "dataset_label": "DEEP-100M", "path_variables": { "data_root": "/data/vectordb-cxl/data", "dataset_prefix": "deep-100m" }, "source_snapshot": "", "dtype": "float32", "distance": "l2", "dimension": 96, "k": 10, "topology": { "compute_nodes": ["node-0", "node-1", "node-2", "node-3", "node-4"], "storage_nodes": ["node-5", "node-6", "node-7"], "num_cns": 5, "num_mns": 3, "workers_per_cn": 31, "memory_bytes_per_mn": 42949672960, "storage_max_node_capacity": 100000000, "hash_directory_load_factor": 0.5, "cache_capacity_bytes_per_cn": 20000000000 }, "query": { "path": "{data_root}/{dataset_prefix}-static-search-eval/orig_query_10k.fbin", "source_count": 10000, "logical_count": 500000, "checkpoint_count": 10000, "ef_search": 100, "ef_sweep": [75, 120, 150, 225, 300, 500, 800], "worker_sweep": [1, 4, 8, 16, 24, 31], "cn_sweep": [1, 3, 5] }, "pq": { "meta": "{data_root}/{dataset_prefix}-static-search-eval/pq_m48.pqmeta", "codebook": "{data_root}/{dataset_prefix}-static-search-eval/pq_m48.pqcodebook" }, "static_snapshot": { "index": "{data_root}/{dataset_prefix}-static-search-eval/index_m_32_ef_500", "groundtruth": "{data_root}/{dataset_prefix}-static-search-eval/groundtruth.bin", "pq_codes": "{data_root}/{dataset_prefix}-static-search-eval/pq_m48.pqcodes", "sidecar": "{data_root}/{dataset_prefix}-static-search-eval/layout-sidecar/index_m_32_ef_500.layout.json" }, "initial_snapshot": { "index": "{data_root}/{dataset_prefix}-batch-update-eval/initial/index_80m_m32_efc500", "groundtruth": "{data_root}/{dataset_prefix}-batch-update-eval/groundtruth/active_80m.bin", "pq_codes": "{data_root}/{dataset_prefix}-batch-update-eval/initial/pq/pq_m48.pqcodes", "sidecar": "{data_root}/{dataset_prefix}-batch-update-eval/initial/layout-sidecar/index_80m_m32_efc500.layout.json" }, "batch": { "root": "{data_root}/{dataset_prefix}-batch-update-eval", "insert_vector_path": "{data_root}/{dataset_prefix}-batch-update-eval/base_permuted.fbin", "insert_trace": "insert-20", "delete_trace": "delete-20", "replacement_trace": "mixed-replace-100", "start_index": 1, "batch_count": 1, "e6_window_count": 4, "e6_source_segments_per_window": 3, "e6_source_segment_update_count": 1000000, "e6_skip_final_merge_delete": true, "e8_batch_count": 50, "e8_merge_every_batches": 5 }, "runtime": { "runtime_id_mode": "internal-array", "record_concurrency_control": "relaxed-snapshot", "coroutines_per_thread": 1, "reranking_factor": 20, "rerank_parallelism": 1, "l0_beam_width": 1, "l0_pipe_width": 32, "l0_pipe_initial_width": 4, "l0_pipe_max_waste_ratio": 0.1, "query_idle_timeout_seconds": 1800, "update_idle_timeout_seconds": 21600 }, "repair": { "algorithm": "ipdiskann-alg5", "driver": "tombstone-driven", "prune_mode": "ipdiskann-pq", "alpha": 1.2, "l": 128, "search_k": 75, "c": 3, "per_deleted_expansion": 3, "pq_window_l0": 64, "pq_window_upper": 32, "chunk_buckets": 64 }, "uniform": { "execution_model": "continuous_total_admission", "merge_trigger": "successful_all_cn_delete_ack_threshold", "repair_partition": "striped_by_sorted_tombstone_index", "final_safepoint": "query_insert_quiescence_recorded", "merge_workers": 8, "query_ratio": 36, "insert_ratio": 1, "mark_delete_ratio": 1, "ratio_window_multiplier": 20, "acknowledged_tombstone_fraction": 0.03, "search_queue_depth": 10000, "insert_queue_depth": 5000, "mark_delete_queue_depth": 5000, "merge_delete_queue_depth": 1000, "search_max_inflight": 10000, "insert_max_inflight": 5000, "mark_delete_max_inflight": 5000, "merge_delete_max_inflight": 1000 }, "repetitions": { "E1": 3, "E2": 3, "E3": 3, "E4": 3, "E5": 3, "E6": 3, "E7": 3, "E8": 1, "E9": 1 }}1234#!/usr/bin/env python3from runner import main
raise SystemExit(main("E1"))1234#!/usr/bin/env python3from runner import main
raise SystemExit(main("E2"))1234#!/usr/bin/env python3from runner import main
raise SystemExit(main("E6"))123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230#!/usr/bin/env python3"""Bind one portable spatial workload profile to installed dataset snapshots."""
from __future__ import annotations
import argparsefrom copy import deepcopyimport jsonfrom pathlib import Pathimport reimport struct
if __package__: from .runner import ( DEFAULT_CONFIG, batch_payload_paths, file_sha256, load_config, read_json, require_mapping, validate_profile_status, write_json, )else: from runner import ( DEFAULT_CONFIG, batch_payload_paths, file_sha256, load_config, read_json, require_mapping, validate_profile_status, write_json, )
def matrix_shape(path: Path) -> tuple[int, int]: with path.open("rb") as handle: header = handle.read(8) if len(header) != 8: raise ValueError(f"truncated matrix header: {path}") return struct.unpack("<II", header)
def profile_path(root: Path, value: object) -> Path: if not isinstance(value, str) or not value or Path(value).is_absolute(): raise ValueError(f"profile paths must be nonempty relative paths: {value!r}") result = (root / value).resolve() if not result.is_relative_to(root.resolve()): raise ValueError(f"profile artifact escapes its instance: {value}") if not result.exists(): raise FileNotFoundError(result) return result
def relocate(value: object, old_root: Path, new_root: Path) -> str: try: relative = Path(str(value)).relative_to(old_root) except ValueError as exc: raise ValueError( f"base config asset {value!r} is outside its dataset root {old_root}" ) from exc return str(new_root / relative)
def derive( profile_path_value: Path, base_config: Path, static_root: Path, update_root: Path,) -> dict[str, object]: profile_file = profile_path_value.resolve() profile = read_json(profile_file) validate_profile_status(profile_file) bindings = require_mapping(profile, "runner_bindings") kind = str(bindings["kind"]) if kind not in {"query", "insert", "delete", "mixed"}: raise ValueError("profile kind must be query, insert, delete, or mixed") config = deepcopy(load_config(base_config)) old_static = Path(str(require_mapping(config, "static_snapshot")["index"])).parent old_update = Path(str(require_mapping(config, "initial_snapshot")["index"])).parent.parent static_root, update_root = static_root.resolve(), update_root.resolve() for name, old, new in ( ("static_snapshot", old_static, static_root), ("initial_snapshot", old_update, update_root), ): selected = require_mapping(config, name) for key in ("index", "groundtruth", "pq_codes", "sidecar", "compute_pq_codes", "storage_pq_codes"): if selected.get(key): selected[key] = relocate(selected[key], old, new) pq = require_mapping(config, "pq") for key in ("meta", "codebook"): pq[key] = relocate(pq[key], old_static, static_root)
root = profile_file.parent query_file = profile_path(root, bindings["query_path"]) initial_gt = profile_path(root, bindings["initial_groundtruth"]) query_rows, query_dim = matrix_shape(query_file) if query_rows != int(bindings["query_source_count"]) or query_dim != int(config["dimension"]): raise ValueError("profile query header does not match its binding or base config") if matrix_shape(initial_gt)[0] != query_rows: raise ValueError("profile initial GT rows must match query rows") initial_state = str(bindings["initial_state"]) if not initial_state.startswith(("static-", "initial-")): raise ValueError("profile initial_state must identify a static or initial snapshot") expected_state = "static-" if kind in {"query", "delete"} else "initial-" if not initial_state.startswith(expected_state): raise ValueError(f"{kind} profile has an incompatible initial state") selected_snapshot = require_mapping( config, "static_snapshot" if initial_state.startswith("static-") else "initial_snapshot" ) selected_snapshot["groundtruth"] = str(initial_gt) counts_raw = require_mapping(bindings, "operation_counts") counts = {name: int(counts_raw[name]) for name in ("query", "insert", "delete")} if any(value < 0 for value in counts.values()): raise ValueError("profile operation counts must be nonnegative") update_kinds = {name for name in ("insert", "delete") if counts[name] > 0} expected_updates = { "query": set(), "insert": {"insert"}, "delete": {"delete"}, "mixed": {"insert", "delete"}, }[kind] if update_kinds != expected_updates or (kind in {"query", "mixed"} and counts["query"] <= 0): raise ValueError("profile operation counts do not match its kind") query = require_mapping(config, "query") logical_queries = int(bindings["query_logical_count"]) if logical_queries <= 0: raise ValueError("query_logical_count must be positive") query.update({ "path": str(query_file), "source_count": query_rows, "logical_count": logical_queries, "checkpoint_count": logical_queries if kind in {"insert", "delete"} else query_rows, "manifest": str(profile_file), }) if kind == "query" and int(query["logical_count"]) != counts["query"]: raise ValueError("query logical count must match profile operation counts")
batch = require_mapping(config, "batch") # Query-only profiles still retain a valid shared vector binding in the full config. vector_path = Path(str(batch["insert_vector_path"])) source_old, source_new = ( (old_update, update_root) if vector_path.is_relative_to(old_update) else (old_static, static_root) ) batch["insert_vector_path"] = relocate(vector_path, source_old, source_new) batch_count = int(bindings.get("batch_count", 0)) trace_id = str(bindings.get("trace_id", "")) if kind != "query": if batch_count <= 0 or re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*", trace_id) is None: raise ValueError("update profiles need a positive batch_count and one-component trace_id") workload_root = profile_path(root, bindings.get("workload_root", ".")) workload = read_json(workload_root / "workload.json") if workload.get("checkpoint_contract") != "exact-update-counts.v1": raise ValueError("prepared update package must bind exact checkpoint update counts") trace_root = workload_root / "traces" / trace_id trace = read_json(trace_root / "trace.json") if trace.get("initial_state") != initial_state: raise ValueError("trace initial state differs from profile binding") totals = {"insert": 0, "delete": 0} segment_counts = [] for index in range(1, batch_count + 1): batch_file = trace_root / "batches" / f"batch_{index:04d}.json" document = read_json(batch_file) current = {"insert": 0, "delete": 0} for operation in document["operations"]: operation_kind = str(operation["type"]) if operation_kind not in totals: raise ValueError(f"unsupported prepared operation: {operation_kind}") count = int(operation["count"]) if count < 0: raise ValueError("negative prepared operation count") for field in ("external_ids", "vector_refs"): descriptor = operation.get(field) if descriptor is not None and int(descriptor["count"]) != count: raise ValueError("prepared descriptor count differs from operation count") current[operation_kind] += count totals[operation_kind] += count dependencies = batch_payload_paths(workload_root, batch_file) for dependency in dependencies: if not Path(dependency).is_file(): raise FileNotFoundError(dependency) if matrix_shape(Path(dependencies[-1]))[0] != query_rows: raise ValueError("prepared checkpoint GT rows must match query rows") segment_counts.append(current) if totals != {name: counts[name] for name in totals}: raise ValueError("prepared batch operations differ from profile counts") batch.update({ "root": str(workload_root), "start_index": 1, "batch_count": batch_count, {"insert": "insert_trace", "delete": "delete_trace", "mixed": "replacement_trace"}[kind]: trace_id, }) if kind == "mixed": segment_count = int(bindings["source_segment_update_count"]) if segment_count <= 0 or any( segment != {"insert": segment_count, "delete": segment_count} for segment in segment_counts ): raise ValueError("mixed profile must have equal declared update counts per segment") uniform = require_mapping(config, "uniform") pair_count = counts["insert"] ratio, remainder = divmod(counts["query"], pair_count) if remainder or ratio <= 0: raise ValueError("mixed query count must be a positive integer multiple of pairs") uniform.update({ "query_ratio": ratio, "insert_ratio": 1, "mark_delete_ratio": 1, "acknowledged_tombstone_fraction": segment_count / int(require_mapping(config, "topology")["storage_max_node_capacity"]), }) batch.update({ "e6_window_count": batch_count, "e6_source_segments_per_window": 1, "e6_source_segment_update_count": segment_count, "e6_skip_final_merge_delete": bool(bindings.get("skip_final_merge_delete", False)), }) config["prepared_workload"] = { "profile": str(profile_file), "profile_sha256": file_sha256(profile_file), "kind": kind, "initial_state": initial_state, "batch_count": batch_count, "trace_id": trace_id, "operation_counts": counts, "query_source_count": query_rows, "query_role": profile.get("query_role", "foreground" if kind in {"query", "mixed"} else "recall checkpoints"), } config["source_snapshot"] = str(profile.get("workload_id", profile.get("profile_id", profile_file.parent.name))) return config
def main() -> int: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--profile", type=Path, required=True) parser.add_argument("--base-config", type=Path, default=DEFAULT_CONFIG) parser.add_argument("--static-root", type=Path, required=True) parser.add_argument("--update-root", type=Path, required=True) parser.add_argument("--output", type=Path, required=True) args = parser.parse_args() if args.output.exists(): parser.error(f"refusing to overwrite {args.output}") try: config = derive(args.profile, args.base_config, args.static_root, args.update_root) write_json(args.output, config) except (KeyError, ValueError, OSError) as exc: parser.error(str(exc)) print(json.dumps({"config": str(args.output.resolve()), "kind": config["prepared_workload"]["kind"]})) return 0
if __name__ == "__main__": raise SystemExit(main())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556#!/usr/bin/env python3"""Plan and run compact E1-E9 evaluation campaigns."""
from __future__ import annotations
import argparsefrom dataclasses import asdict, dataclass, replacefrom datetime import datetime, timezoneimport hashlibimport jsonimport osfrom pathlib import Pathimport reimport shleximport subprocessimport sysimport threadingimport timefrom typing import Callable, Iterable
try: from tqdm import tqdmexcept ImportError: # pragma: no cover - the runner retains a text fallback. tqdm = None
EVAL_ROOT = Path(__file__).resolve().parents[1]CXL_ROOT = Path( os.environ.get("VECTORDB_CXL_ROOT", EVAL_ROOT.parent / "vectordb-cxl")).resolve()DEFAULT_CONFIG = Path(__file__).resolve().parent / "configs/deep100.json"PYTHON = CXL_ROOT / "venv/bin/python"LAUNCHER = CXL_ROOT / "scripts/e2e/run_compute_search.py"READINESS = CXL_ROOT / "scripts/e2e/check_readiness.py"KILL_ALL = CXL_ROOT / "scripts/e2e/kill_all.py"MATERIALIZER = ( CXL_ROOT / "scripts/datasets/general/materialize_concurrent_batch_update.py")M1_PREPARER = Path(__file__).resolve().parent / "prepare_m1.py"REMOTE_COMPUTE_BINARY = "/data/vectordb-cxl/build/src/compute/vectordb_compute_node"REMOTE_STORAGE_BINARY = "/data/vectordb-cxl/build/src/storage/vectordb_storage_node"DEFAULT_RECORD_MODES = ("strict-mcas", "relaxed-reread", "relaxed-snapshot")RECORD_MODES = ( "read-rmw-atomic", "read-write-atomic", "relaxed", "mn-linearizable", *DEFAULT_RECORD_MODES,)ATOMIC_RECORD_MODES = ("read-rmw-atomic", "read-write-atomic", "strict-mcas")RMW_ATOMIC_RECORD_MODES = ("read-rmw-atomic", "strict-mcas")E9_CACHE_VARIANTS = ("no-cache", "pq", "upper-only", "both")E6_RUNTIME_CONTRACT = { "execution_model": "continuous_total_admission", "merge_trigger": "successful_all_cn_delete_ack_threshold", "repair_partition": "striped_by_sorted_tombstone_index", "final_safepoint": "query_insert_quiescence_recorded",}
@dataclass(frozen=True)class RunSpec: run_id: str experiment: str repetition: int kind: str workload: str snapshot: str num_cns: int num_mns: int workers_per_cn: int ef_search: int reranking_factor: float record_mode: str query_limit: int mutation_snapshot: bool | None = None merge_workers: int = 0 batch_count: int = 0 merge_every_batches: int = 0 sweep_axis: str = "" checkpoint_phase: str = "" cache_variant: str = ""
def utc_now() -> str: return datetime.now(timezone.utc).isoformat()
def read_json(path: Path) -> dict[str, object]: document = json.loads(path.read_text(encoding="utf-8")) if not isinstance(document, dict): raise ValueError(f"JSON root must be an object: {path}") return document
def write_json(path: Path, value: object) -> None: path.parent.mkdir(parents=True, exist_ok=True) path.write_text(json.dumps(value, indent=2, sort_keys=True) + "\n")
def file_sha256(path: Path) -> str: digest = hashlib.sha256() with path.open("rb") as handle: for block in iter(lambda: handle.read(1024 * 1024), b""): digest.update(block) return digest.hexdigest()
def binary_sha( explicit: str | None, relative_path: str, label: str) -> str: if explicit: if len(explicit) != 64 or any(char not in "0123456789abcdef" for char in explicit): raise ValueError(f"--{label}-sha256 must be 64 lowercase hex characters") return explicit path = CXL_ROOT / relative_path if not path.is_file(): raise ValueError( f"{label} binary is missing at {path}; build it or pass " f"--{label}-sha256" ) return file_sha256(path)
def require_mapping(document: dict[str, object], key: str) -> dict[str, object]: value = document.get(key) if not isinstance(value, dict): raise ValueError(f"configuration field {key!r} must be an object") return value
def expand_templates(value: object, variables: dict[str, str]) -> object: if isinstance(value, str): try: return value.format_map(variables) except KeyError as exc: raise ValueError( f"unknown path variable {exc.args[0]!r} in {value!r}" ) from exc if isinstance(value, list): return [expand_templates(item, variables) for item in value] if isinstance(value, dict): return { key: expand_templates(item, variables) for key, item in value.items() } return value
def dataset_id(prefix: str) -> str: return re.sub(r"[^a-z0-9]+", "-", prefix.lower()).strip("-")
def load_config( path: Path, *, data_root: Path | None = None, dataset_prefix: str | None = None, selected_dataset_id: str | None = None, dataset_label: str | None = None,) -> dict[str, object]: config = read_json(path) if config.get("schema_version") != 1: raise ValueError("configuration schema_version must be 1") configured_variables = require_mapping(config, "path_variables") variables = { key: str(value) for key, value in configured_variables.items() } if data_root is not None: variables["data_root"] = str(data_root) if dataset_prefix is not None: if not dataset_prefix or "/" in dataset_prefix: raise ValueError("--dataset-prefix must be one non-empty path component") variables["dataset_prefix"] = dataset_prefix config["dataset_id"] = selected_dataset_id or dataset_id(dataset_prefix) config["dataset_label"] = dataset_label or dataset_prefix.upper() elif selected_dataset_id is not None: config["dataset_id"] = selected_dataset_id if dataset_label is not None: config["dataset_label"] = dataset_label if not Path(variables.get("data_root", "")).is_absolute(): raise ValueError("path variable data_root must be absolute") if not variables.get("dataset_prefix"): raise ValueError("path variable dataset_prefix must be non-empty") if re.fullmatch(r"[A-Za-z0-9._-]+", str(config.get("dataset_id", ""))) is None: raise ValueError("dataset_id must use only letters, digits, '.', '_', or '-'") if not config.get("dataset_label"): raise ValueError("dataset_label must be non-empty") config["path_variables"] = variables config = expand_templates(config, variables) for key in ( "topology", "query", "pq", "static_snapshot", "initial_snapshot", "batch", "runtime", "repair", "uniform", "repetitions", ): require_mapping(config, key) return config
def values(override: list[int] | None, configured: object) -> list[int]: selected = override if override is not None else list(configured) if not selected or any(value <= 0 for value in selected): raise ValueError("sweep values must be positive") return list(dict.fromkeys(selected))
def nonnegative_float(value: str) -> float: parsed = float(value) if parsed < 0.0: raise argparse.ArgumentTypeError("value must be non-negative") return parsed
def fixed_value(override: list[int] | None, configured: object, name: str) -> int: selected = values(override, [int(configured)]) if len(selected) != 1: raise ValueError(f"{name} accepts one value for this experiment") return selected[0]
def selected_workloads( requested: list[str] | None, allowed: tuple[str, ...]) -> tuple[str, ...]: if requested is None: return allowed invalid = sorted(set(requested) - set(allowed)) if invalid: raise ValueError(f"unsupported workload(s): {','.join(invalid)}") return tuple(item for item in allowed if item in requested)
def effective_mutation_snapshot( mode: str, requested: str | None) -> bool | None: if mode not in RECORD_MODES: raise ValueError(f"unsupported record mode: {mode}") if requested not in (None, "true", "false"): raise ValueError("--mutation-snapshot must be true or false") if mode in {"read-rmw-atomic", "strict-mcas", "mn-linearizable"}: if requested is not None: raise ValueError( "--mutation-snapshot requires relaxed or read-write-atomic" ) return None alias_snapshot = { "relaxed-snapshot": True, "relaxed-reread": False, }.get(mode) if alias_snapshot is not None: if requested is not None and (requested == "true") != alias_snapshot: raise ValueError( "--mutation-snapshot conflicts with the selected relaxed alias" ) return alias_snapshot return requested != "false"
def build_specs( experiment: str, config: dict[str, object], args: argparse.Namespace) -> list[RunSpec]: topology = require_mapping(config, "topology") query = require_mapping(config, "query") batch = require_mapping(config, "batch") runtime = require_mapping(config, "runtime") uniform = require_mapping(config, "uniform") repetitions_config = require_mapping(config, "repetitions") repetitions = ( args.repetitions if args.repetitions is not None else int(repetitions_config[experiment]) ) if repetitions <= 0: raise ValueError("--repetitions must be positive") if experiment == "E9" and repetitions != 1: raise ValueError("E9 requires exactly one repetition") if args.cache_variant and experiment not in {"E7", "E9"}: raise ValueError("--cache-variant is only supported by E7 and E9") if args.repetition_start <= 0: raise ValueError("--repetition-start must be positive") fixed_cns = ( int(topology["num_cns"]) if experiment in {"E4", "E5"} else fixed_value(args.num_cns, topology["num_cns"], "--num-cns") ) fixed_workers = fixed_value( args.workers_per_cn, topology["workers_per_cn"], "--workers-per-cn", ) num_mns = ( args.num_mns if args.num_mns is not None else int(topology["num_mns"]) ) if num_mns <= 0: raise ValueError("--num-mns must be positive") selected_ef = ( int(query["ef_search"]) if experiment in {"E1", "EX1"} else fixed_value(args.ef_search, query["ef_search"], "--ef-search") ) query_limit = ( args.query_limit if args.query_limit is not None else int(query["logical_count"]) ) checkpoint_limit = ( args.checkpoint_query_limit if args.checkpoint_query_limit is not None else int(query["checkpoint_count"]) ) if query_limit <= 0 or checkpoint_limit <= 0: raise ValueError("query limits must be positive") batch_count = ( args.batch_count if args.batch_count is not None else int(batch["batch_count"]) ) if batch_count <= 0: raise ValueError("--batch-count must be positive") if experiment != "E7" and args.record_mode and len(args.record_mode) != 1: raise ValueError("--record-mode accepts one value outside E7") record_mode = ( args.record_mode[0] if experiment != "E7" and args.record_mode else str(runtime["record_concurrency_control"]) ) workloads = selected_workloads( args.workload, { "E1": ("query",), "EX1": ("query",), "M1": ("replacement",), "E2": ("insert", "delete"), "E3": ("replacement",), "E4": ("query",), "E5": ("insert", "delete"), "E6": ("replacement",), "E7": ("query", "insert", "delete"), "E8": ("replacement",), "E9": ("query", "insert", "delete"), }[experiment], ) if args.merge_workers is not None and experiment not in {"E6", "M1"}: raise ValueError("--merge-workers applies only to E6 and M1") if args.merge_every_batches is not None and experiment in {"E1", "EX1", "E4", "E6", "M1"}: raise ValueError( "--merge-every-batches applies only to batch update experiments" ) if args.merge_every_batches is not None and not any( workload in {"delete", "replacement"} for workload in workloads ): raise ValueError( "--merge-every-batches requires a delete or replacement workload" ) specs: list[RunSpec] = []
def merge_interval(batches: int, *, default: int | None = None) -> int: interval = batches if default is None else default if args.merge_every_batches is not None: interval = args.merge_every_batches if not 0 <= interval <= batches: raise ValueError( "--merge-every-batches must be between zero and --batch-count" ) return interval
def add( repetition: int, *, kind: str, workload: str, snapshot: str, num_cns: int = fixed_cns, workers: int = fixed_workers, ef_search: int = selected_ef, reranking_factor: float | None = None, mode: str = record_mode, queries: int = checkpoint_limit, merge_workers: int = 0, batches: int = 0, merge_every_batches: int = 0, sweep_axis: str = "", checkpoint_phase: str = "", cache_variant: str = "", ) -> None: mutation_snapshot = effective_mutation_snapshot(mode, args.mutation_snapshot) selected_reranking_factor = ( float(runtime["reranking_factor"]) if reranking_factor is None else reranking_factor ) if selected_reranking_factor <= 0: raise ValueError("reranking factor must be positive") reranking_suffix = ( f"-rr{selected_reranking_factor:g}" if "reranking_factor_divisor" in query else "" ) snapshot_suffix = ( f"-ms-{str(mutation_snapshot).lower()}" if mutation_snapshot is not None else "" ) suffix = ( f"{workload}-ef{ef_search}-cn{num_cns}-mn{num_mns}-w{workers}" f"{reranking_suffix}" f"{f'-cache-{cache_variant}' if cache_variant else ''}" f"{snapshot_suffix}" f"-cc-{mode}-r{repetition}" ) specs.append( RunSpec( run_id=f"{experiment.lower()}-{config['dataset_id']}-{suffix}", experiment=experiment, repetition=repetition, kind=kind, workload=workload, snapshot=snapshot, num_cns=num_cns, num_mns=num_mns, workers_per_cn=workers, ef_search=ef_search, reranking_factor=selected_reranking_factor, record_mode=mode, query_limit=queries, mutation_snapshot=mutation_snapshot, merge_workers=merge_workers, batch_count=batches, merge_every_batches=merge_every_batches, sweep_axis=sweep_axis, checkpoint_phase=checkpoint_phase, cache_variant=cache_variant, ) )
for repetition in range( args.repetition_start, args.repetition_start + repetitions ): if experiment in {"E1", "EX1"}: reranking_divisor = query.get("reranking_factor_divisor") if reranking_divisor is not None and ( isinstance(reranking_divisor, bool) or not isinstance(reranking_divisor, (int, float)) or reranking_divisor <= 0 ): raise ValueError("query.reranking_factor_divisor must be positive") for ef_search in values(args.ef_search, query["ef_sweep"]): add( repetition, kind="query", workload="query", snapshot="static", ef_search=ef_search, reranking_factor=( ef_search / float(reranking_divisor) if reranking_divisor is not None else None ), queries=query_limit, sweep_axis="ef_search", ) elif experiment == "E2": for workload in workloads: add( repetition, kind="batch", workload=workload, snapshot="initial" if workload == "insert" else "static", batches=batch_count, merge_every_batches=( 0 if workload == "insert" else merge_interval(batch_count) ), ) elif experiment == "E3": add( repetition, kind="batch", workload="replacement", snapshot="initial", batches=batch_count, merge_every_batches=merge_interval(batch_count), ) elif experiment == "E4": for num_cns in values(args.num_cns, query["cn_sweep"]): add( repetition, kind="query", workload="query", snapshot="static", num_cns=num_cns, queries=query_limit, sweep_axis="num_cns", ) elif experiment == "E5": for num_cns in values(args.num_cns, query["cn_sweep"]): for workload in workloads: add( repetition, kind="batch", workload=workload, snapshot="initial" if workload == "insert" else "static", num_cns=num_cns, batches=batch_count, merge_every_batches=( 0 if workload == "insert" else merge_interval(batch_count) ), sweep_axis="num_cns", ) elif experiment == "E6": selected_merge_workers = ( args.merge_workers if args.merge_workers is not None else int(uniform["merge_workers"]) ) if not 1 <= selected_merge_workers <= fixed_workers: raise ValueError( "E6 requires 1 <= --merge-workers <= --workers-per-cn" ) add( repetition, kind="concurrent", workload="replacement", snapshot="initial", merge_workers=selected_merge_workers, batches=( args.batch_count if args.batch_count is not None else int(batch["e6_window_count"]) ), ) elif experiment == "M1": selected_merge_workers = ( args.merge_workers if args.merge_workers is not None else int(uniform["merge_workers"]) ) if not 1 <= selected_merge_workers < fixed_workers: raise ValueError( "M1 requires 1 <= --merge-workers < --workers-per-cn" ) add( repetition, kind="concurrent", workload="replacement", snapshot="initial", merge_workers=selected_merge_workers, batches=int(batch["m1_measurement_batches"]), mode="strict-mcas", ) elif experiment == "E7": modes = args.record_mode or list(DEFAULT_RECORD_MODES) cache_variants = args.cache_variant or (None,) for mode in modes: if mode not in RECORD_MODES: raise ValueError(f"unsupported record mode: {mode}") for cache_variant in cache_variants: for workload in workloads: add( repetition, kind="query" if workload == "query" else "batch", workload=workload, snapshot=( "initial" if workload == "insert" else "static" ), mode=mode, queries=query_limit if workload == "query" else checkpoint_limit, batches=0 if workload == "query" else batch_count, merge_every_batches=( 0 if workload in {"query", "insert"} else merge_interval(batch_count) ), cache_variant=cache_variant, ) elif experiment == "E8": e8_batches = ( args.batch_count if args.batch_count is not None else int(batch["e8_batch_count"]) ) if e8_batches <= 0: raise ValueError("E8 --batch-count must be positive") add( repetition, kind="query", workload="query", snapshot="initial", queries=checkpoint_limit, checkpoint_phase="pre_update", ) add( repetition, kind="batch", workload="replacement", snapshot="initial", batches=e8_batches, merge_every_batches=merge_interval( e8_batches, default=int(batch["e8_merge_every_batches"]), ), ) elif experiment == "E9": if config["dataset_id"] != "bigann100": raise ValueError("E9 supports BIGANN-100M only") e9 = require_mapping(config, "e9") cache_variants = ( E9_CACHE_VARIANTS if args.cache_variant is None else tuple( variant for variant in E9_CACHE_VARIANTS if variant in args.cache_variant ) ) for cache_variant in cache_variants: for workload in workloads: add( repetition, kind="query" if workload == "query" else "batch", workload=workload, snapshot=( "initial" if workload == "insert" else "static" ), ef_search=int(e9["ef_search"]), reranking_factor=float(e9["reranking_factor"]), queries=( query_limit if workload == "query" else checkpoint_limit ), batches=0 if workload == "query" else batch_count, merge_every_batches=( 0 if workload in {"query", "insert"} else merge_interval(batch_count) ), cache_variant=cache_variant, ) else: raise ValueError(f"unsupported experiment: {experiment}")
unique: dict[str, RunSpec] = {} for spec in specs: existing = unique.get(spec.run_id) if existing is None: unique[spec.run_id] = spec elif existing.sweep_axis != spec.sweep_axis: unique[spec.run_id] = replace(existing, sweep_axis="shared") compute_nodes = topology.get("compute_nodes") storage_nodes = topology.get("storage_nodes") if not isinstance(compute_nodes, list) or not isinstance(storage_nodes, list): raise ValueError("topology node lists must be arrays") for spec in unique.values(): validate_prepared_workload(config, spec) if spec.num_cns > len(compute_nodes): raise ValueError( f"{spec.run_id} needs {spec.num_cns} CNs, " f"but only {len(compute_nodes)} are configured" ) if spec.num_mns > len(storage_nodes): raise ValueError( f"{spec.run_id} needs {spec.num_mns} MNs, " f"but only {len(storage_nodes)} are configured" ) return list(unique.values())
def validate_prepared_workload( config: dict[str, object], spec: RunSpec) -> None: """Keep generated traces and their exact checkpoint ground truth together.""" prepared = config.get("prepared_workload") if prepared is None: return if not isinstance(prepared, dict): raise ValueError("prepared_workload must be an object") profile_file = Path(str(prepared["profile"])) if file_sha256(profile_file) != prepared["profile_sha256"]: raise ValueError("prepared profile changed after config generation") validate_profile_status(profile_file) kind = str(prepared["kind"]) workload = "replacement" if kind == "mixed" else kind if spec.workload != workload: raise ValueError( f"prepared {kind} profile requires --workload {workload}; " f"got {spec.workload}" ) expected_snapshot = ( "static" if str(prepared["initial_state"]).startswith("static-") else "initial" ) if spec.snapshot != expected_snapshot: raise ValueError("prepared workload initial state does not match this run") counts = require_mapping(prepared, "operation_counts") if kind == "query": if spec.query_limit != int(counts["query"]): raise ValueError("prepared query count cannot be overridden") return batch = require_mapping(config, "batch") if int(batch["start_index"]) != 1: raise ValueError("prepared exact checkpoints require batch start index 1") if kind == "mixed": if spec.experiment != "E6": raise ValueError("prepared mixed profiles require the E6 runner") contract = e6_materialization_contract(config, spec) actual = { "query": contract["total_query_count"], "insert": contract["total_insert_count"], "delete": contract["total_mark_delete_count"], } if actual != counts: raise ValueError("prepared mixed operation counts cannot be overridden") elif spec.batch_count != int(prepared["batch_count"]): raise ValueError("prepared checkpoint batch count cannot be overridden") expected_checkpoint_queries = ( int(prepared["query_source_count"]) if kind == "mixed" else int(counts["query"]) ) if expected_checkpoint_queries > 0 and spec.query_limit != expected_checkpoint_queries: raise ValueError("prepared checkpoint query count cannot be overridden")
def validate_profile_status(profile_file: Path) -> Path | None: validation_file = profile_file.parent / "validation.json" if validation_file.exists(): result = read_json(validation_file) if result.get("status") != "passed": raise ValueError( "prepared profile validation must be passed; " f"got {result.get('status')!r} in {validation_file}" ) return validation_file return None
def sidecar_files(path: str) -> list[str]: suffix = ".layout.json" if not path.endswith(suffix): raise ValueError(f"sidecar manifest must end with {suffix}: {path}") prefix = path[: -len(suffix)] return [path, prefix + ".levels.u16", prefix + ".id_mapping.u32"]
def snapshot(config: dict[str, object], name: str) -> dict[str, object]: return require_mapping( config, "static_snapshot" if name == "static" else "initial_snapshot" )
def snapshot_pq_codes( selected_snapshot: dict[str, object], role: str) -> str: role_key = f"{role}_pq_codes" return str( selected_snapshot.get(role_key, selected_snapshot["pq_codes"]) )
def common_command( config: dict[str, object], spec: RunSpec, port: int) -> list[str]: topology = require_mapping(config, "topology") query = require_mapping(config, "query") pq = require_mapping(config, "pq") runtime = require_mapping(config, "runtime") selected_snapshot = snapshot(config, spec.snapshot) read_qp_pool_size = int( topology.get("read_qp_pool_size", spec.workers_per_cn) ) if read_qp_pool_size <= 0: raise ValueError("topology.read_qp_pool_size must be positive") memory_bytes = ",".join( [str(topology["memory_bytes_per_mn"])] * spec.num_mns ) command = [ str(PYTHON), str(LAUNCHER), "--num-cns", str(spec.num_cns), "--num-sns", str(spec.num_mns), "--port", str(port), "--ib-port", "1", "--max-poll-cqes", "16", "--max-send-wrs", "1024", "--max-receive-wrs", "1024", "--server-wait-seconds", "5", "--storage-exit-timeout-seconds", "300", "--idle-timeout-seconds", str( runtime[ "query_idle_timeout_seconds" if spec.kind == "query" else "update_idle_timeout_seconds" ] ), "--storage-max-node-capacity", str(topology["storage_max_node_capacity"]), "--storage-hash-directory-load-factor", str(topology["hash_directory_load_factor"]), "--cluster-memory-node-bytes", memory_bytes, "--num-threads", str(spec.workers_per_cn + 1), "--read-qp-pool-size", str(read_qp_pool_size), "--coroutines-per-thread", str(runtime["coroutines_per_thread"]), "--k", str(config["k"]), "--ef-search", str(spec.ef_search), "--distance", str(config["distance"]), "--query-limit", str(spec.query_limit), "--progress-interval", "1000", "--storage-index-path", str(selected_snapshot["index"]), "--hnsw-layout-sidecar-manifest-path", str(selected_snapshot["sidecar"]), "--storage-data-type", str(config["dtype"]), "--compute-query-data-type", str(config["dtype"]), "--compute-query-path", str(query["path"]), "--compute-groundtruth-path", str(selected_snapshot["groundtruth"]), "--use-pq", "--storage-pq-codes-path", snapshot_pq_codes(selected_snapshot, "storage"), "--storage-pq-meta-path", str(pq["meta"]), "--compute-pq-meta-path", str(pq["meta"]), "--compute-pq-codebook-path", str(pq["codebook"]), "--runtime-id-mode", str(runtime["runtime_id_mode"]), "--record-concurrency-control", spec.record_mode, "--compute-pq-cache-mode", "uniform-paged", "--compute-cache-capacity-bytes", str(topology["cache_capacity_bytes_per_cn"]), "--reranking-factor", str(spec.reranking_factor), "--rerank-parallelism", str(runtime["rerank_parallelism"]), "--l0-beam-width", str(runtime["l0_beam_width"]), "--l0-pipe-width", str(runtime["l0_pipe_width"]), "--l0-pipe-initial-width", str(runtime["l0_pipe_initial_width"]), "--l0-pipe-max-waste-ratio", str(runtime["l0_pipe_max_waste_ratio"]), ] if not (spec.experiment == "E6" and spec.record_mode in RMW_ATOMIC_RECORD_MODES): command.extend(["--l0-pipe-search", "--l0-pipe-adaptive"]) if spec.mutation_snapshot is not None: command.extend( ["--mutation-snapshot", str(spec.mutation_snapshot).lower()] ) if spec.cache_variant in {"no-cache", "upper-only"}: command.extend( ["--compute-pq-residency", "mn"] ) if spec.cache_variant == "no-cache": command.append("--disable-upper-cache") elif spec.cache_variant in {"pq", "both"}: command.extend( [ "--compute-pq-residency", "cn", "--compute-pq-codes-path", snapshot_pq_codes(selected_snapshot, "compute"), ] ) if spec.cache_variant == "pq": command.append("--disable-upper-cache") else: command.extend( [ "--compute-pq-codes-path", snapshot_pq_codes(selected_snapshot, "compute"), ] ) if topology.get("storage_low_memory_bootstrap", False): command.append("--storage-low-memory-bootstrap") if topology.get("storage_skip_initial_pq_codes", False): command.append("--storage-skip-initial-pq-codes") if ( spec.kind == "query" or spec.query_limit > int(query["source_count"]) ): command.append("--repeat-queries") return command
def repair_arguments(config: dict[str, object]) -> list[str]: repair = require_mapping(config, "repair") return [ "--batchdelete-chunk-buckets", str(repair["chunk_buckets"]), "--batchdelete-repair-algorithm", str(repair["algorithm"]), "--batchdelete-alpha", str(repair["alpha"]), "--batchdelete-repair-driver", str(repair["driver"]), "--batchdelete-repair-prune-mode", str(repair["prune_mode"]), "--batchdelete-per-deleted-expansion", str(repair["per_deleted_expansion"]), "--batchdelete-pq-window-l0", str(repair["pq_window_l0"]), "--batchdelete-pq-window-upper", str(repair["pq_window_upper"]), "--batchdelete-delete-search-l", str(repair["l"]), "--batchdelete-delete-search-k", str(repair["search_k"]), "--batchdelete-delete-repair-c", str(repair["c"]), "--batchdelete-delete-search-full-rerank-window", "0", ]
def batch_command( config: dict[str, object], spec: RunSpec, port: int) -> list[str]: batch = require_mapping(config, "batch") trace = { "insert": batch["insert_trace"], "delete": batch["delete_trace"], "replacement": batch["replacement_trace"], }[spec.workload] command = common_command(config, spec, port) command.extend( [ "--insert-search-ef", str(spec.ef_search), "--batch-workload-root", str(batch["root"]), "--batch-workload-trace", str(trace), "--batch-start-index", str(batch["start_index"]), "--batch-count", str(spec.batch_count), "--batchdelete-every-batches", str(spec.merge_every_batches), "--insert-vector-data-type", str(config["dtype"]), "--insert-vector-path", str(batch["insert_vector_path"]), "--insert-l0-pipe-search", "--insert-l0-pipe-adaptive", "--insert-l0-pipe-width", "32", "--insert-l0-pipe-initial-width", "4", "--insert-l0-pipe-max-waste-ratio", "0.1", *repair_arguments(config), ] ) if spec.experiment == "E8": command.append("--batch-read-before-merge-delete") return command
def e6_prepare_command( config: dict[str, object], spec: RunSpec, output: Path) -> list[str]: batch = require_mapping(config, "batch") query = require_mapping(config, "query") uniform = require_mapping(config, "uniform") e6_runtime_contract(config) materialization_contract = e6_materialization_contract(config, spec) initial = snapshot(config, "initial") command = [ str(PYTHON), str(MATERIALIZER), "--batch-workload-root", str(batch["root"]), "--trace-id", str(batch["replacement_trace"]), "--output-dir", str(output), "--runtime-output-dir", str(output), "--runtime-batch-workload-root", str(batch["root"]), "--query-path", str(query["path"]), "--runtime-query-path", str(query["path"]), "--initial-groundtruth-path", str(initial["groundtruth"]), "--runtime-initial-groundtruth-path", str(initial["groundtruth"]), "--start-batch-index", str(batch["start_index"]), "--window-count", str(materialization_contract["source_segment_count"]), "--uniform-e6", "--uniform-data-workers", str(spec.workers_per_cn), "--uniform-merge-workers", str(spec.merge_workers), "--uniform-query-ratio", str(uniform["query_ratio"]), "--uniform-insert-ratio", str(uniform["insert_ratio"]), "--uniform-mark-delete-ratio", str(uniform["mark_delete_ratio"]), "--uniform-ratio-window-multiplier", str(uniform["ratio_window_multiplier"]), "--acknowledged-tombstone-fraction", str(uniform["acknowledged_tombstone_fraction"]), "--search-max-queue-depth", str(uniform["search_queue_depth"]), "--insert-max-queue-depth", str(uniform["insert_queue_depth"]), "--mark-delete-max-queue-depth", str(uniform["mark_delete_queue_depth"]), "--merge-delete-max-queue-depth", str(uniform["merge_delete_queue_depth"]), "--search-max-inflight", str(uniform["search_max_inflight"]), "--insert-max-inflight", str(uniform["insert_max_inflight"]), "--mark-delete-max-inflight", str(uniform["mark_delete_max_inflight"]), "--merge-delete-max-inflight", str(uniform["merge_delete_max_inflight"]), "--overflow-policy", "wait_for_capacity", "--workload-id", spec.run_id, "--source-snapshot", str(config.get("source_snapshot", "")), ] vector_root = Path(str(batch["insert_vector_path"])).parent if config.get("prepared_workload") or vector_root.resolve() != Path(str(batch["root"])).resolve(): command.extend([ "--insert-vector-source-root", str(vector_root), "--runtime-insert-vector-source-root", str(vector_root), ]) if bool(batch.get("e6_skip_final_merge_delete", False)): command.append("--uniform-skip-final-merge-delete") return command
def m1_prepare_command( config: dict[str, object], spec: RunSpec, output: Path) -> list[str]: batch = require_mapping(config, "batch") query = require_mapping(config, "query") uniform = require_mapping(config, "uniform") topology = require_mapping(config, "topology") initial = snapshot(config, "initial") return [ str(PYTHON), str(M1_PREPARER), "--batch-workload-root", str(batch["root"]), "--trace-id", str(batch["replacement_trace"]), "--output-dir", str(output), "--runtime-output-dir", str(output), "--query-path", str(query["path"]), "--initial-groundtruth-path", str(initial["groundtruth"]), "--start-batch-index", str(batch["start_index"]), "--prepare-batches", str(batch["m1_prepare_batches"]), "--measurement-batches", str(batch["m1_measurement_batches"]), "--reference-node-count", str(topology["storage_max_node_capacity"]), "--acknowledged-tombstone-fraction", str(uniform["acknowledged_tombstone_fraction"]), "--uniform-data-workers", str(spec.workers_per_cn), "--uniform-merge-workers", str(spec.merge_workers), "--ratio-window-multiplier", str(uniform["ratio_window_multiplier"]), "--search-max-queue-depth", str(uniform["search_queue_depth"]), "--insert-max-queue-depth", str(uniform["insert_queue_depth"]), "--mark-delete-max-queue-depth", str(uniform["mark_delete_queue_depth"]), "--merge-delete-max-queue-depth", str(uniform["merge_delete_queue_depth"]), "--search-max-inflight", str(uniform["search_max_inflight"]), "--insert-max-inflight", str(uniform["insert_max_inflight"]), "--mark-delete-max-inflight", str(uniform["mark_delete_max_inflight"]), "--merge-delete-max-inflight", str(uniform["merge_delete_max_inflight"]), "--workload-id", spec.run_id, "--source-snapshot", str(config.get("source_snapshot", "")), ]
def validate_m1_materialization(materialized: Path) -> None: manifest = read_json(materialized / "manifest.json") metadata = read_json(materialized / "metadata.json") if ( manifest.get("workload_mode") != "m1_access_overlap" or manifest.get("window_lifecycle") != "continuous_logical_windows" ): raise ValueError("M1 manifest has the wrong runtime mode") windows = manifest.get("windows") if not isinstance(windows, list) or len(windows) != 2: raise ValueError("M1 manifest must contain setup and measurement windows") setup, measurement = windows if ( setup.get("target_mark_delete_count", 0) <= 0 or setup.get("target_query_count") != 0 or setup.get("target_insert_count") != 0 or setup.get("merge_delete_mode") != "concurrent" or "merge_delete_trigger" not in setup ): raise ValueError( "M1 setup window must be MarkDelete-only and trigger repair" ) if ( measurement.get("target_mark_delete_count") != 0 or measurement.get("target_query_count") != measurement.get("target_insert_count") or measurement.get("duration_seconds") != 60.0 or measurement.get("merge_delete_mode") != "disabled" ): raise ValueError("M1 measurement window must be 60-second Query/Insert 1:1") if not isinstance(metadata.get("m1"), dict): raise ValueError("M1 metadata is missing its experiment contract")
def e6_runtime_contract(config: dict[str, object]) -> dict[str, str]: uniform = require_mapping(config, "uniform") expected = dict(E6_RUNTIME_CONTRACT) for field, value in expected.items(): if uniform.get(field) != value: raise ValueError( f"E6 uniform.{field} must be {value!r}, " f"got {uniform.get(field)!r}" ) return expected
def e6_materialization_contract( config: dict[str, object], spec: RunSpec) -> dict[str, int | bool]: batch = require_mapping(config, "batch") topology = require_mapping(config, "topology") uniform = require_mapping(config, "uniform") evaluation_windows = spec.batch_count source_segments_per_window = int( batch.get("e6_source_segments_per_window", 1) ) source_insert_count = int( batch.get("e6_source_segment_update_count", 0) ) if evaluation_windows <= 0: raise ValueError("E6 evaluation window count must be positive") if source_segments_per_window <= 0: raise ValueError("E6 source segments per window must be positive") if source_insert_count <= 0: raise ValueError("E6 source segment update count must be positive")
query_ratio = int(uniform["query_ratio"]) insert_ratio = int(uniform["insert_ratio"]) mark_delete_ratio = int(uniform["mark_delete_ratio"]) if min(query_ratio, insert_ratio, mark_delete_ratio) <= 0: raise ValueError("E6 operation ratios must be positive") ratio_units, remainder = divmod(source_insert_count, insert_ratio) if remainder: raise ValueError( "E6 source segment update count must be divisible by insert ratio" ) source_query_count = ratio_units * query_ratio source_mark_delete_count = ratio_units * mark_delete_ratio evaluation_insert_count = ( source_insert_count * source_segments_per_window ) evaluation_query_count = ( source_query_count * source_segments_per_window ) evaluation_mark_delete_count = ( source_mark_delete_count * source_segments_per_window )
reference_count = int(topology["storage_max_node_capacity"]) threshold_fraction = float( uniform["acknowledged_tombstone_fraction"] ) threshold_value = threshold_fraction * reference_count threshold_count = round(threshold_value) if abs(threshold_value - threshold_count) > 1e-6: raise ValueError( "E6 acknowledged tombstone fraction must produce an integer count" ) if threshold_count != evaluation_mark_delete_count: raise ValueError( "E6 acknowledged tombstone threshold must equal one evaluation " f"window: threshold={threshold_count} " f"window_mark_deletes={evaluation_mark_delete_count}" )
source_segment_count = ( evaluation_windows * source_segments_per_window ) skip_final_merge = bool( batch.get("e6_skip_final_merge_delete", False) ) return { "evaluation_window_count": evaluation_windows, "source_segments_per_evaluation_window": ( source_segments_per_window ), "source_segment_count": source_segment_count, "source_query_count": source_query_count, "source_insert_count": source_insert_count, "source_mark_delete_count": source_mark_delete_count, "evaluation_window_query_count": evaluation_query_count, "evaluation_window_insert_count": evaluation_insert_count, "evaluation_window_mark_delete_count": ( evaluation_mark_delete_count ), "total_query_count": evaluation_query_count * evaluation_windows, "total_insert_count": evaluation_insert_count * evaluation_windows, "total_mark_delete_count": ( evaluation_mark_delete_count * evaluation_windows ), "merge_threshold_mark_delete_count": threshold_count, "expected_merge_epoch_count": ( evaluation_windows - int(skip_final_merge) ), "skip_final_merge_delete": skip_final_merge, }
def validate_e6_materialization( materialized: Path, contract: dict[str, object], materialization_contract: dict[str, object] | None = None,) -> None: expected_contract = contract or E6_RUNTIME_CONTRACT manifest = read_json(materialized / "manifest.json") metadata = read_json(materialized / "metadata.json") if manifest.get("workload_mode") != "continuous_uniform": raise ValueError("E6 manifest must use continuous_uniform workload mode") if manifest.get("window_lifecycle") != "continuous_logical_windows": raise ValueError( "E6 manifest windows must be logical input/progress segments" ) windows = manifest.get("windows") if not isinstance(windows, list) or not windows: raise ValueError("E6 manifest must contain logical workload segments") skip_final_merge = ( bool( materialization_contract.get( "skip_final_merge_delete", True ) ) if materialization_contract else True ) expected_final_mode = ( "disabled" if skip_final_merge else "concurrent" ) if ( not isinstance(windows[-1], dict) or windows[-1].get("merge_delete_mode") != expected_final_mode ): raise ValueError( "E6 final logical segment must use " f"merge_delete_mode={expected_final_mode}" ) if not any( isinstance(window, dict) and window.get("merge_delete_mode") == "concurrent" for window in windows ): raise ValueError("E6 requires at least one acknowledged-delete trigger") materialized_contract = metadata.get("runtime_contract") if not isinstance(materialized_contract, dict): raise ValueError("E6 metadata is missing runtime_contract") for field, expected in expected_contract.items(): if materialized_contract.get(field) != expected: raise ValueError( f"E6 materialized runtime_contract.{field} must be " f"{expected!r}, got {materialized_contract.get(field)!r}" ) if materialization_contract: expected_segments = int( materialization_contract["source_segment_count"] ) if len(windows) != expected_segments: raise ValueError( "E6 materialized source segment count must be " f"{expected_segments}, got {len(windows)}" ) expected_query = int( materialization_contract["source_query_count"] ) expected_insert = int( materialization_contract["source_insert_count"] ) expected_delete = int( materialization_contract["source_mark_delete_count"] ) expected_threshold = int( materialization_contract[ "merge_threshold_mark_delete_count" ] ) for index, window in enumerate(windows, start=1): if not isinstance(window, dict): raise ValueError( f"E6 materialized source segment {index} is invalid" ) counts = ( int(window.get("target_query_count", -1)), int(window.get("target_insert_count", -1)), int(window.get("target_mark_delete_count", -1)), ) if counts != (expected_query, expected_insert, expected_delete): raise ValueError( f"E6 materialized source segment {index} has counts " f"{counts}, expected " f"{(expected_query, expected_insert, expected_delete)}" ) expected_mode = ( "disabled" if skip_final_merge and index == expected_segments else "concurrent" ) if window.get("merge_delete_mode") != expected_mode: raise ValueError( f"E6 materialized source segment {index} must use " f"merge_delete_mode={expected_mode}" ) trigger = window.get("merge_delete_trigger") if expected_mode == "disabled": if trigger is not None: raise ValueError( "E6 final source segment must omit its merge trigger" ) continue if not isinstance(trigger, dict): raise ValueError( f"E6 materialized source segment {index} is missing " "its merge trigger" ) reference_count = int( trigger.get("reference_node_count", 0) ) threshold_count = round( float(trigger.get("threshold", 0.0)) * reference_count ) if threshold_count != expected_threshold: raise ValueError( f"E6 materialized source segment {index} has " f"merge threshold {threshold_count}, expected " f"{expected_threshold}" )
def concurrent_command( config: dict[str, object], spec: RunSpec, port: int, manifest: Path) -> list[str]: uniform = require_mapping(config, "uniform") command = common_command(config, spec, port) command.extend( [ "--concurrent-mode", "--concurrent-workload-manifest", str(manifest), "--task-runtime", "uniform", "--uniform-data-workers", str(spec.workers_per_cn), "--uniform-merge-workers", str(spec.merge_workers), "--uniform-query-ratio", str(uniform["query_ratio"]), "--uniform-insert-ratio", str(uniform["insert_ratio"]), "--uniform-mark-delete-ratio", str(uniform["mark_delete_ratio"]), "--uniform-ratio-window-multiplier", str(uniform["ratio_window_multiplier"]), "--search-max-queue-depth", str(uniform["search_queue_depth"]), "--insert-max-queue-depth", str(uniform["insert_queue_depth"]), "--mark-delete-max-queue-depth", str(uniform["mark_delete_queue_depth"]), "--merge-delete-max-queue-depth", str(uniform["merge_delete_queue_depth"]), "--search-max-inflight", str(uniform["search_max_inflight"]), "--insert-max-inflight", str(uniform["insert_max_inflight"]), "--mark-delete-max-inflight", str(uniform["mark_delete_max_inflight"]), "--merge-delete-max-inflight", str(uniform["merge_delete_max_inflight"]), "--overflow-policy", "wait_for_capacity", "--insert-search-ef", str(spec.ef_search), *repair_arguments(config), ] ) return command
def trace_for(config: dict[str, object], workload: str) -> str: batch = require_mapping(config, "batch") return str( { "insert": batch["insert_trace"], "delete": batch["delete_trace"], "replacement": batch["replacement_trace"], }[workload] )
def run_artifacts( config: dict[str, object], spec: RunSpec) -> tuple[list[str], list[str]]: selected_snapshot = snapshot(config, spec.snapshot) pq = require_mapping(config, "pq") query = require_mapping(config, "query") compute = [ str(selected_snapshot["index"]), str(query["path"]), str(selected_snapshot["groundtruth"]), str(pq["meta"]), str(pq["codebook"]), snapshot_pq_codes(selected_snapshot, "compute"), *sidecar_files(str(selected_snapshot["sidecar"])), ] if query.get("manifest"): compute.append(str(query["manifest"])) storage = [ str(selected_snapshot["index"]), str(pq["meta"]), snapshot_pq_codes(selected_snapshot, "storage"), *sidecar_files(str(selected_snapshot["sidecar"])), ] if spec.kind in {"batch", "concurrent"}: batch = require_mapping(config, "batch") root = Path(str(batch["root"])) trace = trace_for(config, spec.workload) if spec.experiment == "E6": source_batch_count = int( e6_materialization_contract(config, spec)[ "source_segment_count" ] ) elif spec.experiment == "M1": source_batch_count = int(batch["m1_prepare_batches"]) + int( batch["m1_measurement_batches"] ) else: source_batch_count = spec.batch_count compute.extend( [ str(root / "workload.json"), str(root / "traces" / trace / "trace.json"), str(batch["insert_vector_path"]), ] ) for index in range( int(batch["start_index"]), int(batch["start_index"]) + source_batch_count, ): batch_path = root / "traces" / trace / "batches" / f"batch_{index:04d}.json" compute.append(str(batch_path)) if batch_path.is_file(): compute.extend(batch_payload_paths(root, batch_path)) else: compute.append(str( root / "traces" / trace / "groundtruth" / f"checkpoint_{index:04d}.bin" )) prepared = config.get("prepared_workload") if isinstance(prepared, dict) and prepared.get("profile"): compute.append(str(prepared["profile"])) validation = Path(str(prepared["profile"])).parent / "validation.json" if validation.is_file(): compute.append(str(validation)) return list(dict.fromkeys(compute)), list(dict.fromkeys(storage))
def batch_payload_paths(root: Path, batch_path: Path) -> list[str]: """Include the actual u32 streams and checkpoint selected by compact JSON.""" document = read_json(batch_path) package_root = root.resolve() trace_root = batch_path.parent.parent.resolve()
def contained_path(raw: object, relative_to: Path, boundary: Path) -> str: if not isinstance(raw, str) or not raw or Path(raw).is_absolute(): raise ValueError(f"batch artifact path must be relative: {raw!r}") resolved = (relative_to / raw).resolve() if not resolved.is_relative_to(boundary): raise ValueError(f"batch artifact escapes its package: {raw}") return str(resolved)
paths = [] for operation in document.get("operations", []): for field in ("external_ids", "vector_refs"): descriptor = operation.get(field) if isinstance(descriptor, dict) and descriptor.get("encoding") in { "u32_slice", "u32_cyclic_slice" }: paths.append(contained_path( descriptor.get("path"), batch_path.parent, package_root )) checkpoint = require_mapping(document, "checkpoint") paths.append(contained_path( checkpoint.get("groundtruth", checkpoint.get("groundtruth_path")), trace_root, trace_root, )) return list(dict.fromkeys(paths))
def readiness_command( config: dict[str, object], spec: RunSpec, port: int, compute_sha256: str, storage_sha256: str,) -> list[str]: topology = require_mapping(config, "topology") compute_artifacts, storage_artifacts = run_artifacts(config, spec) command = [ str(PYTHON), str(READINESS), "--num-cns", str(spec.num_cns), "--num-sns", str(spec.num_mns), "--port", str(port), "--storage-bytes-per-node", str(topology["memory_bytes_per_mn"]), "--compute-sha256", compute_sha256, "--storage-sha256", storage_sha256, ] for path in compute_artifacts: command.extend(["--compute-artifact", path]) for path in storage_artifacts: command.extend(["--storage-artifact", path]) return command
def query_storage_key( config: dict[str, object], spec: RunSpec, storage_sha256: str,) -> dict[str, object]: topology = require_mapping(config, "topology") runtime = require_mapping(config, "runtime") pq = require_mapping(config, "pq") selected_snapshot = snapshot(config, spec.snapshot) storage_nodes = list(topology["storage_nodes"])[: spec.num_mns] return { "dataset_id": config["dataset_id"], "storage_nodes": storage_nodes, "memory_node_ids": [7] if spec.num_mns == 1 else list(range(spec.num_mns)), "num_mns": spec.num_mns, "storage_binary_path": REMOTE_STORAGE_BINARY, "storage_binary_sha256": storage_sha256, "mn_linearizable": spec.record_mode == "mn-linearizable", "runtime_id_mode": runtime["runtime_id_mode"], "index_path": selected_snapshot["index"], "data_type": config["dtype"], "pq_codes_path": snapshot_pq_codes(selected_snapshot, "storage"), "skip_initial_pq_codes": bool( topology.get("storage_skip_initial_pq_codes", False) ), "pq_meta_path": pq["meta"], "sidecar_manifest_path": selected_snapshot["sidecar"], "max_node_capacity": topology["storage_max_node_capacity"], "hash_directory_load_factor": topology["hash_directory_load_factor"], "registered_bytes_per_mn": topology["memory_bytes_per_mn"], }
def shell_script(path: Path, command: list[str], config: dict[str, object]) -> None: topology = require_mapping(config, "topology") content = ( "#!/usr/bin/env bash\n" "set -euo pipefail\n" f"export VECTORDB_CXL_COMPUTE_NODES={','.join(topology['compute_nodes'])}\n" f"export VECTORDB_CXL_STORAGE_NODES={','.join(topology['storage_nodes'])}\n" f"exec {shlex.join(command)}\n" ) path.parent.mkdir(parents=True, exist_ok=True) path.write_text(content, encoding="utf-8") path.chmod(0o755)
def create_query_cohorts( config: dict[str, object], root: Path, specs: list[RunSpec], rows: list[dict[str, object]], port_base: int, compute_sha256: str, storage_sha256: str, inter_run_wait_seconds: float,) -> list[dict[str, object]]: topology = require_mapping(config, "topology") read_qp_pool_size = int( topology.get("read_qp_pool_size", topology["workers_per_cn"]) ) if read_qp_pool_size <= 0: raise ValueError("topology.read_qp_pool_size must be positive") grouped: dict[tuple[object, ...], list[RunSpec]] = {} for spec in specs: if spec.kind != "query": continue key = ( spec.snapshot, spec.num_mns, spec.record_mode, ) grouped.setdefault(key, []).append(spec) row_by_id = {str(row["run_id"]): row for row in rows} cohorts = [] for offset, group in enumerate(grouped.values()): cohort_id = ( f"{group[0].experiment.lower()}-{config['dataset_id']}-" f"{group[0].record_mode}-q{offset + 1}" ) manifest_path = (root / "artifacts" / f"{cohort_id}.session.json").resolve() sessions = [] for spec in group: run_root = (root / "runs" / spec.run_id).resolve() sessions.append( { "run_id": spec.run_id, "num_cns": spec.num_cns, "num_threads": spec.workers_per_cn + 1, "read_qp_pool_size": read_qp_pool_size, "ef_search": spec.ef_search, "reranking_factor": spec.reranking_factor, "query_limit": spec.query_limit, "progress_interval": 1000, "compute_pq_residency": ( "mn" if spec.cache_variant in {"no-cache", "upper-only"} else "cn" ), "compute_pq_codes_path": ( "" if spec.cache_variant in {"no-cache", "upper-only"} else snapshot_pq_codes(snapshot(config, spec.snapshot), "compute") ), "disable_upper_cache": spec.cache_variant in {"no-cache", "pq"}, "compute_hosts": list(topology["compute_nodes"])[: spec.num_cns], "stdout_path": str(run_root / "stdout.log"), "stderr_path": str(run_root / "stderr.log"), "result_path": str(run_root / "session_result.json"), } ) row_by_id[spec.run_id]["cohort_id"] = cohort_id manifest = { "schema_version": 1, "storage_lifecycle": "reuse", "inter_session_wait_seconds": inter_run_wait_seconds, "cohort_id": cohort_id, "storage_key": query_storage_key(config, group[0], storage_sha256), "result_path": str((root / "artifacts" / f"{cohort_id}.result.json").resolve()), "storage_stdout_path": str( (root / "logs" / f"{cohort_id}.storage.stdout.log").resolve() ), "storage_stderr_path": str( (root / "logs" / f"{cohort_id}.storage.stderr.log").resolve() ), "sessions": sessions, } write_json(manifest_path, manifest) command_spec = max( group, key=lambda item: (item.num_cns, item.workers_per_cn) ) port = port_base + offset command = common_command(config, command_spec, port) if command_spec.record_mode in ATOMIC_RECORD_MODES: command.append("--query-session-requires-atomics") command.extend(["--query-session-manifest", str(manifest_path)]) readiness = readiness_command( config, command_spec, port, compute_sha256, storage_sha256, ) command_path = root / "commands" / f"{cohort_id}.sh" shell_script(command_path, command, config) cohorts.append( { "cohort_id": cohort_id, "run_ids": [spec.run_id for spec in group], "manifest_path": str(manifest_path), "command": command, "command_path": str(command_path), "readiness_command": readiness, "port": port, "num_cns": command_spec.num_cns, "num_mns": command_spec.num_mns, } ) return cohorts
def git_text(*args: str) -> str: result = subprocess.run( ["git", *args], cwd=CXL_ROOT, text=True, capture_output=True, check=True, ) return result.stdout.strip()
def create_campaign( experiment: str, config_path: Path, root: Path, args: argparse.Namespace,) -> dict[str, object]: if (root / "campaign.json").exists(): raise ValueError( f"campaign already exists: {root}; use run/status or a new directory" ) config = load_config( config_path, data_root=args.data_root, dataset_prefix=args.dataset_prefix, selected_dataset_id=args.dataset_id, dataset_label=args.dataset_label, ) specs = build_specs(experiment, config, args) compute_sha256 = binary_sha( args.compute_sha256, "build/src/compute/vectordb_compute_node", "compute", ) storage_sha256 = binary_sha( args.storage_sha256, "build/src/storage/vectordb_storage_node", "storage", ) root.mkdir(parents=True, exist_ok=True) rows: list[dict[str, object]] = [] for index, spec in enumerate(specs): run_root = (root / "runs" / spec.run_id).resolve() run_root.mkdir(parents=True, exist_ok=True) row = asdict(spec) | { "run_root": str(run_root), "cohort_id": "", "status": "pending", "port": args.port_base + 100 + index, } rows.append(row) write_json(run_root / "spec.json", row)
cohorts = create_query_cohorts( config, root.resolve(), specs, rows, args.port_base, compute_sha256, storage_sha256, args.inter_run_wait_seconds, ) standalone = [] for index, spec in enumerate(item for item in specs if item.kind != "query"): row = next(item for item in rows if item["run_id"] == spec.run_id) port = int(row["port"]) prepare_command: list[str] = [] materialized_dir = (Path(str(row["run_root"])) / "materialized").resolve() if spec.kind == "batch": command = batch_command(config, spec, port) else: prepare_command = ( m1_prepare_command(config, spec, materialized_dir) if spec.experiment == "M1" else e6_prepare_command(config, spec, materialized_dir) ) command = concurrent_command( config, spec, port, materialized_dir / "manifest.json" ) readiness = readiness_command( config, spec, port, compute_sha256, storage_sha256 ) command_path = root / "commands" / f"{spec.run_id}.sh" shell_script(command_path, command, config) if prepare_command: shell_script( root / "commands" / f"{spec.run_id}.prepare.sh", prepare_command, config, ) standalone.append( { "run_id": spec.run_id, "kind": spec.kind, "command": command, "command_path": str(command_path), "prepare_command": prepare_command, "readiness_command": readiness, "materialized_dir": ( str(materialized_dir) if prepare_command else "" ), "runtime_contract": ( e6_runtime_contract(config) if spec.experiment == "E6" else {} ), "materialization_contract": ( e6_materialization_contract(config, spec) if spec.experiment == "E6" else {} ), "port": port, "num_cns": spec.num_cns, "num_mns": spec.num_mns, } )
campaign = { "schema_version": 1, "created_utc": utc_now(), "experiment": experiment, "dataset_id": config["dataset_id"], "dataset_label": config["dataset_label"], "config_path": str(config_path.resolve()), "config_sha256": file_sha256(config_path), "source_branch": git_text("branch", "--show-current"), "source_commit": git_text("rev-parse", "HEAD"), "dirty_paths": git_text("status", "--short").splitlines(), "compute_binary_sha256": compute_sha256, "storage_binary_sha256": storage_sha256, "inter_run_wait_seconds": args.inter_run_wait_seconds, "compute_nodes": require_mapping(config, "topology")["compute_nodes"], "storage_nodes": require_mapping(config, "topology")["storage_nodes"], "runs": rows, "query_cohorts": cohorts, "standalone_runs": standalone, } write_json(root / "campaign.json", campaign) return campaign
def load_campaign(root: Path) -> dict[str, object]: path = root / "campaign.json" if not path.is_file(): raise ValueError(f"campaign is not planned: {path}") return read_json(path)
def campaign_env(campaign: dict[str, object]) -> dict[str, str]: env = os.environ.copy() if env.get("VECTORDB_EVAL_PRESERVE_SSH_AUTH_SOCK") != "1": env.pop("SSH_AUTH_SOCK", None) env["VECTORDB_CXL_COMPUTE_NODES"] = ",".join(campaign["compute_nodes"]) env["VECTORDB_CXL_STORAGE_NODES"] = ",".join(campaign["storage_nodes"]) return env
def run_logged( command: list[str], *, stdout_path: Path, stderr_path: Path, env: dict[str, str], heartbeat: Callable[[], None] | None = None,) -> int: stdout_path.parent.mkdir(parents=True, exist_ok=True) stop_heartbeat = threading.Event() heartbeat_thread: threading.Thread | None = None if heartbeat is not None: def pulse() -> None: while not stop_heartbeat.wait(5.0): heartbeat()
heartbeat_thread = threading.Thread(target=pulse, daemon=True) heartbeat_thread.start() with stdout_path.open("w", encoding="utf-8") as stdout, stderr_path.open( "w", encoding="utf-8" ) as stderr: try: return subprocess.run( command, cwd=CXL_ROOT, env=env, stdout=stdout, stderr=stderr, check=False, ).returncode finally: stop_heartbeat.set() if heartbeat_thread is not None: heartbeat_thread.join()
def run_checked( command: list[str], *, env: dict[str, str], label: str,) -> None: result = subprocess.run(command, cwd=CXL_ROOT, env=env, check=False) if result.returncode != 0: raise RuntimeError(f"{label} failed with return code {result.returncode}")
def kill_command(num_cns: int, num_mns: int) -> list[str]: return [ str(PYTHON), str(KILL_ALL), "--num-cns", str(num_cns), "--num-sns", str(num_mns), ]
def completion_path(root: Path, run_id: str) -> Path: return root / "runs" / run_id / "completed.json"
def pending_run_ids( root: Path, run_ids: Iterable[str], resume: bool) -> list[str]: if resume: for run_id in run_ids: completed_path = completion_path(root, run_id) if completed_path.exists(): continue session_result_path = root / "runs" / run_id / "session_result.json" try: session_result = read_json(session_result_path) except (OSError, ValueError, json.JSONDecodeError): continue if session_result.get("status") == "completed": write_json( completed_path, { "finished_utc": utc_now(), "returncode": 0, "status": "completed", "recovered_from": "session_result.json", }, ) completed = [ run_id for run_id in run_ids if completion_path(root, run_id).exists() ] if completed and not resume: raise ValueError( "campaign has completed runs; pass --resume or use a new campaign root" ) return [run_id for run_id in run_ids if run_id not in completed]
def resume_query_manifest( root: Path, cohort: dict[str, object], pending: list[str],) -> Path: original = read_json(Path(str(cohort["manifest_path"]))) if pending == list(cohort["run_ids"]): return Path(str(cohort["manifest_path"])) attempt = 1 while True: path = root / "artifacts" / f"{cohort['cohort_id']}.resume{attempt}.session.json" if not path.exists(): break attempt += 1 original["cohort_id"] = f"{cohort['cohort_id']}-resume{attempt}" original["result_path"] = str( (root / "artifacts" / f"{cohort['cohort_id']}.resume{attempt}.result.json").resolve() ) original["storage_stdout_path"] = str( (root / "logs" / f"{cohort['cohort_id']}.resume{attempt}.storage.stdout.log").resolve() ) original["storage_stderr_path"] = str( (root / "logs" / f"{cohort['cohort_id']}.resume{attempt}.storage.stderr.log").resolve() ) original["sessions"] = [ session for session in original["sessions"] if session["run_id"] in pending ] write_json(path, original) return path
def append_compute_artifacts( readiness: list[str], paths: Iterable[Path]) -> list[str]: result = list(readiness) for path in paths: result.extend(["--compute-artifact", str(path)]) return result
def sync_generated( campaign: dict[str, object], source: Path, num_cns: int, env: dict[str, str],) -> None: for host in list(campaign["compute_nodes"])[:num_cns]: subprocess.run( ["ssh", "-n", host, "mkdir", "-p", str(source)], check=True, env=env, ) subprocess.run( ["rsync", "-a", f"{source}/", f"{host}:{source}/"], check=True, env=env, )
def prepare_generated_unit( campaign: dict[str, object], unit: dict[str, object], env: dict[str, str],) -> list[str]: readiness = list(unit["readiness_command"]) prepare = list(unit["prepare_command"]) if not prepare: return readiness run_id = str(unit["run_id"]) materialized = Path(str(unit["materialized_dir"])) manifest = materialized / "manifest.json" if not manifest.exists(): if materialized.exists() and any(materialized.iterdir()): raise ValueError(f"partial materialization exists: {materialized}") run_checked(prepare, env=env, label=f"{run_id} materialization") if campaign["experiment"] == "M1": validate_m1_materialization(materialized) else: validate_e6_materialization( materialized, dict(unit.get("runtime_contract", {})), dict(unit.get("materialization_contract", {})), ) sync_generated( campaign, materialized, int(unit["num_cns"]), env, ) return generated_unit_readiness(unit)
def generated_unit_readiness(unit: dict[str, object]) -> list[str]: readiness = list(unit["readiness_command"]) materialized = Path(str(unit["materialized_dir"])) manifest = materialized / "manifest.json" return append_compute_artifacts( readiness, [ manifest, materialized / "metadata.json", *sorted(materialized.glob("*.u32")), ], )
def prepare_campaign(root: Path) -> None: campaign = load_campaign(root) env = campaign_env(campaign) prepared = 0 for unit in campaign["standalone_runs"]: if not unit["prepare_command"]: continue prepare_generated_unit(campaign, unit, env) prepared += 1 print(f"prepared_generated_units={prepared}", flush=True)
def execute_campaign(root: Path, resume: bool) -> None: campaign = load_campaign(root) if campaign["experiment"] == "EX1": verify_ex1_query_views(campaign) env = campaign_env(campaign) inter_run_wait_seconds = float(campaign.get("inter_run_wait_seconds", 0.0)) initial_pending = { str(run["run_id"]) for run in campaign["runs"] if pending_run_ids(root, [str(run["run_id"])], resume) } total = len(initial_pending) completed_count = 0 started_at = time.monotonic() progress_bar = ( tqdm( total=total, desc=f"{campaign['experiment']} {campaign['dataset_id']}", unit="run", dynamic_ncols=True, ) if tqdm is not None else None )
def refresh_progress(active: str) -> None: if progress_bar is not None: progress_bar.set_postfix_str(f"active={active}", refresh=True)
def progress(label: str) -> None: nonlocal completed_count completed_count += 1 elapsed = time.monotonic() - started_at rate = completed_count / elapsed if elapsed > 0 else 0.0 eta = (total - completed_count) / rate if rate > 0 else 0.0 message = ( f"progress={completed_count}/{total} elapsed_s={elapsed:.1f} " f"eta_s={eta:.1f} completed_run={label}" ) if progress_bar is not None: progress_bar.update(1) progress_bar.set_postfix_str(f"completed={label}", refresh=True) progress_bar.write(message) else: print(message, flush=True)
print(f"campaign_pending_runs={total}", flush=True) for cohort in campaign["query_cohorts"]: pending = pending_run_ids(root, cohort["run_ids"], resume) if not pending: continue manifest = resume_query_manifest(root, cohort, pending) command = list(cohort["command"]) command[-1] = str(manifest) kill = kill_command(int(cohort["num_cns"]), int(cohort["num_mns"])) refresh_progress(str(cohort["cohort_id"])) run_checked(kill, env=env, label="pre-run cleanup") run_checked( list(cohort["readiness_command"]), env=env, label=f"{cohort['cohort_id']} readiness", ) reported: set[str] = set() launched_at = time.time()
def query_heartbeat() -> None: refresh_progress(str(cohort["cohort_id"])) for run_id in pending: if run_id in reported: continue result_path = root / "runs" / run_id / "session_result.json" try: fresh = result_path.stat().st_mtime >= launched_at completed = ( fresh and read_json(result_path).get("status") == "completed" ) except (OSError, ValueError, json.JSONDecodeError): continue if completed: reported.add(run_id) progress(run_id)
try: returncode = run_logged( command, stdout_path=root / "logs" / f"{cohort['cohort_id']}.launcher.stdout.log", stderr_path=root / "logs" / f"{cohort['cohort_id']}.launcher.stderr.log", env=env, heartbeat=query_heartbeat, ) finally: run_checked(kill, env=env, label="post-run cleanup") for run_id in pending: result_path = root / "runs" / run_id / "session_result.json" run_completed = ( result_path.is_file() and read_json(result_path).get("status") == "completed" ) write_json( root / "runs" / run_id / ("completed.json" if run_completed else "failed.json"), { "finished_utc": utc_now(), "returncode": returncode, "status": "completed" if run_completed else "failed", }, ) if run_completed and run_id not in reported: progress(run_id) run_checked( list(cohort["readiness_command"]), env=env, label=f"{cohort['cohort_id']} post-cleanup readiness", ) if returncode != 0: raise RuntimeError(f"{cohort['cohort_id']} failed: {returncode}") if completed_count < total and inter_run_wait_seconds > 0.0: refresh_progress(f"inter-run wait {inter_run_wait_seconds:g}s") time.sleep(inter_run_wait_seconds)
for unit in campaign["standalone_runs"]: run_id = str(unit["run_id"]) if not pending_run_ids(root, [run_id], resume): continue run_root = root / "runs" / run_id readiness = prepare_generated_unit(campaign, unit, env) kill = kill_command(int(unit["num_cns"]), int(unit["num_mns"])) refresh_progress(run_id) run_checked(kill, env=env, label="pre-run cleanup") run_checked(readiness, env=env, label=f"{run_id} readiness") started = utc_now() try: returncode = run_logged( list(unit["command"]), stdout_path=run_root / "stdout.log", stderr_path=run_root / "stderr.log", env=env, heartbeat=lambda: refresh_progress(run_id), ) finally: run_checked(kill, env=env, label="post-run cleanup") write_json( run_root / ("completed.json" if returncode == 0 else "failed.json"), { "started_utc": started, "finished_utc": utc_now(), "returncode": returncode, "status": "completed" if returncode == 0 else "failed", }, ) if returncode == 0: progress(run_id) run_checked(readiness, env=env, label=f"{run_id} post-cleanup readiness") if returncode != 0: raise RuntimeError(f"{run_id} failed: {returncode}") if completed_count < total and inter_run_wait_seconds > 0.0: refresh_progress(f"inter-run wait {inter_run_wait_seconds:g}s") time.sleep(inter_run_wait_seconds) if progress_bar is not None: progress_bar.close()
def check_campaign(root: Path) -> None: campaign = load_campaign(root) env = campaign_env(campaign) for cohort in campaign["query_cohorts"]: run_checked( list(cohort["readiness_command"]), env=env, label=f"{cohort['cohort_id']} readiness", ) for unit in campaign["standalone_runs"]: if unit["prepare_command"]: manifest = Path(str(unit["materialized_dir"])) / "manifest.json" if manifest.exists(): readiness = generated_unit_readiness(unit) else: readiness = list(unit["readiness_command"]) print( f"{unit['run_id']}: source readiness only; run prepare " "before the final generated-artifact check" ) else: readiness = list(unit["readiness_command"]) run_checked( readiness, env=env, label=f"{unit['run_id']} readiness", ) if campaign["experiment"] == "EX1": verify_ex1_query_views(campaign)
def verify_ex1_query_views(campaign: dict[str, object]) -> None: config_path = Path(str(campaign["config_path"])) if file_sha256(config_path) != campaign["config_sha256"]: raise ValueError("EX1 configuration changed after planning") config = load_config(config_path) query = require_mapping(config, "query") manifest = str(query["manifest"]) verification = """\import hashlib,json,pathlib,sysp=pathlib.Path(sys.argv[1])m=json.loads(p.read_text())def h(path): d=hashlib.sha256() with path.open('rb') as f: for b in iter(lambda:f.read(1048576),b''): d.update(b) return d.hexdigest()assert h(pathlib.Path(m['query_source']))==m['query_source_sha256']assert h(pathlib.Path(m['groundtruth_source']))==m['groundtruth_source_sha256']for name,meta in m['outputs'].items(): q=p.parent/name assert q.stat().st_size==meta['bytes'] assert h(q)==meta['sha256']print(json.dumps(m['outputs'],sort_keys=True))""" identities = {} for host in campaign["compute_nodes"]: command = ( f"python3 -c {shlex.quote(verification)} " f"{shlex.quote(manifest)}" ) result = subprocess.run( [ "ssh", "-o", "BatchMode=yes", "-o", "ConnectTimeout=10", str(host), command, ], text=True, capture_output=True, check=False, ) if result.returncode != 0: raise RuntimeError( f"EX1 query manifest verification failed on {host}: " f"{result.stderr.strip()}" ) identities[str(host)] = json.loads(result.stdout) serialized = {json.dumps(value, sort_keys=True) for value in identities.values()} if len(serialized) != 1: raise ValueError("EX1 query-view hashes differ across compute nodes")
def status(root: Path) -> int: campaign = load_campaign(root) rows = [] for row in campaign["runs"]: run_id = str(row["run_id"]) state = "pending" if completion_path(root, run_id).exists(): state = "completed" elif (root / "runs" / run_id / "failed.json").exists(): state = "failed" rows.append({"run_id": run_id, "status": state}) print(json.dumps(rows, indent=2)) return 0 if all(row["status"] == "completed" for row in rows) else 1
def parser_for(experiment: str) -> argparse.ArgumentParser: default_config = ( Path(__file__).resolve().parent / "configs/bigann100.json" if experiment == "E9" else DEFAULT_CONFIG ) parser = argparse.ArgumentParser( description=( f"Plan or run {experiment}; defaults come from " f"{'BIGANN-100M' if experiment == 'E9' else 'DEEP-100M'}." ), formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument( "action", choices=("plan", "prepare", "check", "run", "collect", "status", "plot"), ) parser.add_argument("--config", type=Path, default=default_config) parser.add_argument( "--data-root", type=Path, help="Override the {data_root} path variable", ) parser.add_argument( "--dataset-prefix", help="Override the shared dataset package-name prefix", ) parser.add_argument("--dataset-id", help="Short ID used in run IDs") parser.add_argument("--dataset-label", help="Dataset name used in figures") parser.add_argument("--campaign-root", type=Path) parser.add_argument("--repetitions", type=int) parser.add_argument( "--repetition-start", type=int, default=1, help="First repetition number, useful for phased campaigns", ) parser.add_argument("--ef-search", type=int, action="append") parser.add_argument("--num-cns", type=int, action="append") parser.add_argument("--num-mns", type=int) parser.add_argument("--workers-per-cn", type=int, action="append") parser.add_argument("--merge-workers", type=int, help="E6 merge-only workers") parser.add_argument("--query-limit", type=int) parser.add_argument("--checkpoint-query-limit", type=int) parser.add_argument( "--batch-count", type=int, help=( "E6 evaluation-window count; each window contains the configured " "number of continuous 1M source segments" if experiment == "E6" else "Batch count for this experiment" ), ) parser.add_argument("--merge-every-batches", type=int) parser.add_argument( "--workload", choices=("query", "insert", "delete", "replacement"), action="append", ) parser.add_argument( "--record-mode", choices=RECORD_MODES, action="append" ) parser.add_argument("--mutation-snapshot", choices=("true", "false")) parser.add_argument( "--cache-variant", choices=E9_CACHE_VARIANTS, action="append", help="Select one or more E7/E9 cache variants", ) parser.add_argument("--port-base", type=int, default=17000) parser.add_argument("--compute-sha256") parser.add_argument("--storage-sha256") parser.add_argument( "--inter-run-wait-seconds", type=nonnegative_float, default=0.0, help=( "Wait between logical runs; query cohorts keep MNs resident while " "waiting between sessions" ), ) parser.add_argument("--resume", action="store_true") parser.add_argument( "--approved-run-plan", action="store_true", help="Required for EX1 remote prepare/run after plan approval", ) parser.add_argument("--results", type=Path, help="Normalized CSV for plot") parser.add_argument("--output", type=Path, help="Figure output path") return parser
def main(experiment: str) -> int: parser = parser_for(experiment) args = parser.parse_args() try: config = load_config( args.config, data_root=args.data_root, dataset_prefix=args.dataset_prefix, selected_dataset_id=args.dataset_id, dataset_label=args.dataset_label, ) root = ( args.campaign_root or Path( f"/tmp/vectordb-evaluation/" f"{experiment.lower()}-{config['dataset_id']}" ) ).resolve() if args.action == "plan": campaign = create_campaign(experiment, args.config, root, args) print( f"planned_runs={len(campaign['runs'])} " f"campaign={root / 'campaign.json'}" ) return 0 if args.action == "check": check_campaign(root) return 0 if args.action == "prepare": if experiment == "EX1" and not args.approved_run_plan: raise ValueError("EX1 prepare requires --approved-run-plan") prepare_campaign(root) return 0 if args.action == "run": if experiment == "EX1" and not args.approved_run_plan: raise ValueError("EX1 run requires --approved-run-plan") execute_campaign(root, args.resume) from collect import collect_campaign
paths = collect_campaign(root) print("collected=" + ",".join(str(path) for path in paths)) return status(root) if args.action == "collect": from collect import collect_campaign
paths = collect_campaign(root) print("collected=" + ",".join(str(path) for path in paths)) return 0 if args.action == "status": return status(root) if args.results is None: parser.error("plot requires --results") from plot import plot_results
output = args.output or root / "figures" / f"{experiment.lower()}.png" plot_results(experiment, args.results, output) print(output) return 0 except ( OSError, RuntimeError, subprocess.CalledProcessError, ValueError, ) as exc: print(exc, file=sys.stderr) return 2123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109"""Binary formats and reproducible metadata for spatial workload preparation."""
from __future__ import annotations
import hashlibimport jsonimport osimport structfrom pathlib import Path
import numpy as np
def read_json(path): return json.loads(Path(path).read_text(encoding="utf-8"))
def write_json(path, value): path = Path(path) path.parent.mkdir(parents=True, exist_ok=True) temporary = path.with_name(path.name + ".tmp") temporary.write_text(json.dumps(value, indent=2, sort_keys=True) + "\n", encoding="utf-8") os.replace(temporary, path)
def digest_json(value): return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(",", ":")).encode()).hexdigest()
def sha256(path): h = hashlib.sha256() with Path(path).open("rb") as stream: for block in iter(lambda: stream.read(8 * 1024 * 1024), b""): h.update(block) return h.hexdigest()
def file_identity(path): """Record trusted package checksums plus a cheap, independently read fingerprint.""" path = Path(path) size = path.stat().st_size h = hashlib.sha256(struct.pack("<Q", size)) with path.open("rb") as stream: for offset in sorted({0, max(0, size // 2 - 32768), max(0, size - 65536)}): stream.seek(offset) h.update(stream.read(65536)) result = {"file": path.name, "bytes": size, "sample_sha256": h.hexdigest()} for root in (path.parent, *path.parents): checksums = root / "checksums.sha256" if not checksums.is_file(): continue rel = path.relative_to(root).as_posix() for line in checksums.read_text().splitlines(): parts = line.split(maxsplit=1) if len(parts) == 2 and parts[1].lstrip(" *") == rel: result["package_sha256"] = parts[0] result["package_sha256_status"] = "trusted source record; not rehashed" return result return result
def matrix(path, dtype="float32", allow_distances=False): path = Path(path) with path.open("rb") as stream: header = stream.read(8) if len(header) != 8: raise ValueError(f"Truncated matrix header: {path}") rows, columns = struct.unpack("<II", header) if not rows or not columns: raise ValueError(f"Empty matrix: {path}") dtype = np.dtype(dtype).newbyteorder("<") expected = 8 + rows * columns * dtype.itemsize sizes = (expected, expected + rows * columns * 4) if allow_distances else (expected,) if path.stat().st_size not in sizes: raise ValueError(f"Matrix payload does not match header: {path}") return np.memmap(path, mode="r", dtype=dtype, offset=8, shape=(rows, columns))
def write_matrix(path, values, dtype=None): values = np.asarray(values, dtype=dtype) path = Path(path) path.parent.mkdir(parents=True, exist_ok=True) temporary = path.with_name(path.name + ".tmp") with temporary.open("wb") as stream: stream.write(struct.pack("<II", *values.shape)) values.astype(values.dtype.newbyteorder("<"), copy=False).tofile(stream) os.replace(temporary, path)
def write_u32(path, values): path = Path(path) path.parent.mkdir(parents=True, exist_ok=True) temporary = path.with_name(path.name + ".tmp") np.asarray(values, dtype="<u4").tofile(temporary) os.replace(temporary, path)
def safe_child(root, relative): root = Path(root).resolve() path = (root / relative).resolve() if not path.is_relative_to(root): raise ValueError(f"Path escapes artifact root: {relative}") return path
def seeded_rng(seed, stream): # Stable named streams isolate Q/I/D changes and avoid Python's salted hash(). key = int.from_bytes(hashlib.sha256(stream.encode()).digest()[:8], "little") return np.random.default_rng(np.random.SeedSequence([seed, key]))123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263#!/usr/bin/env python3"""Create exact checkpoint GT for subsets of an unchanged vector universe.
The source GT must be trusted exact, sorted nearest first, and computed overthe *entire* source universe for the same query vectors and metric. Its IDs,the live mask, and output IDs all use original/external source IDs. Filteringan initial-index GT is not sufficient when a checkpoint adds other vectors.
Keeping k live entries from an exact source prefix gives an exact live top-k.Queries with fewer survivors instead scan every live source vector. Sourcetie order is preserved; exhaustive fallback orders equal computed distancesby external ID. Both are valid top-k tie choices. This helper does not certifythe provenance or mathematical exactness of a supplied source GT."""
from __future__ import annotations
from contextlib import nullcontextfrom pathlib import Pathimport osimport structimport tempfilefrom typing import Callable
import numpy as np
def _matrix_header(path: Path) -> tuple[int, int]: with path.open("rb") as handle: header = handle.read(8) if len(header) != 8: raise ValueError(f"truncated matrix header: {path}") rows, columns = struct.unpack("<II", header) if rows == 0 or columns == 0: raise ValueError(f"matrix dimensions must be positive: {path}") return rows, columns
def _vector_matrix(path: Path, dtype: str | np.dtype) -> np.memmap: rows, dimensions = _matrix_header(path) element_type = np.dtype(dtype).newbyteorder("<") if element_type.kind not in "fiu" or element_type.itemsize > 8: raise ValueError(f"unsupported vector dtype: {dtype}") expected = 8 + rows * dimensions * element_type.itemsize if path.stat().st_size != expected: raise ValueError(f"vector payload size does not match header/dtype: {path}") return np.memmap( path, mode="r", dtype=element_type, offset=8, shape=(rows, dimensions) )
def _source_ids(path: Path, universe_size: int) -> np.memmap: rows, depth = _matrix_header(path) ids_bytes = rows * depth * 4 if path.stat().st_size not in (8 + ids_bytes, 8 + 2 * ids_bytes): raise ValueError(f"GT must contain u32 IDs and optional f32 distances: {path}") ids = np.memmap(path, mode="r", dtype="<u4", offset=8, shape=(rows, depth)) # Validate row chunks so even a deep source GT needs no second full copy. for begin in range(0, rows, 1024): chunk = np.asarray(ids[begin : begin + 1024]) if np.any(chunk >= universe_size): raise ValueError("source GT contains an ID outside the source universe") ordered = np.sort(chunk, axis=1) if depth > 1 and np.any(ordered[:, 1:] == ordered[:, :-1]): raise ValueError("source GT contains duplicate IDs within a query row") return ids
def _select_topk( scores: np.ndarray, external_ids: np.ndarray, k: int) -> tuple[np.ndarray, np.ndarray]: """Select smallest scores, breaking every boundary tie by external ID.""" count = min(k, scores.size) if scores.size > count: provisional = np.argpartition(scores, count - 1)[:count] cutoff = np.max(scores[provisional]) smaller = np.flatnonzero(scores < cutoff) equal = np.flatnonzero(scores == cutoff) remaining = count - smaller.size if equal.size > remaining: tie_order = np.argpartition(external_ids[equal], remaining - 1) equal = equal[tie_order[:remaining]] chosen = np.concatenate((smaller, equal)) else: chosen = np.arange(scores.size) order = np.lexsort((external_ids[chosen], scores[chosen])) chosen = chosen[order] return scores[chosen], external_ids[chosen]
def _exact_fallback( base: np.ndarray, queries: np.ndarray, live: np.ndarray, base_external_ids: np.ndarray | None, *, k: int, metric: str, block_rows: int, query_batch_size: int, progress: Callable[[dict], None] | None,) -> np.ndarray: """Exhaustive scan; L2 uses direct differences to avoid cancellation.""" query_count = queries.shape[0] best_scores = [np.empty(0, dtype=np.float64) for _ in range(query_count)] best_ids = [np.empty(0, dtype=np.uint32) for _ in range(query_count)] # A permuted base must still represent every external source ID once. seen = np.zeros(live.size, dtype=np.bool_) if base_external_ids is not None else None for begin in range(0, base.shape[0], block_rows): end = min(begin + block_rows, base.shape[0]) ids = ( np.arange(begin, end, dtype=np.uint32) if base_external_ids is None else np.asarray(base_external_ids[begin:end]) ) if seen is not None: if np.any(ids < 0) or np.any(ids >= live.size): raise ValueError("base_external_ids contains an out-of-range ID") if np.unique(ids).size != ids.size or np.any(seen[ids]): raise ValueError("base_external_ids must be a permutation of source IDs") seen[ids] = True keep = live[ids] ids = ids[keep].astype(np.uint32, copy=False) if not ids.size: continue vectors = np.asarray(base[begin:end][keep], dtype=np.float64) if not np.all(np.isfinite(vectors)): raise ValueError("live base vectors contain non-finite values") for query_begin in range(0, query_count, query_batch_size): query_end = min(query_begin + query_batch_size, query_count) if metric == "ip": # Negate inner products so both metrics select smallest scores. scores_batch = -(queries[query_begin:query_end] @ vectors.T) if not np.all(np.isfinite(scores_batch)): raise ValueError("inner-product scores overflowed") for index in range(query_begin, query_end): if metric == "l2": differences = vectors - queries[index] scores = np.einsum("ij,ij->i", differences, differences) if not np.all(np.isfinite(scores)): raise ValueError("squared-L2 scores overflowed") else: scores = scores_batch[index - query_begin] local_scores, local_ids = _select_topk(scores, ids, k) best_scores[index], best_ids[index] = _select_topk( np.concatenate((best_scores[index], local_scores)), np.concatenate((best_ids[index], local_ids)), k, ) if progress is not None: progress({"event": "exact_gt_scan", "source_rows_scanned": end, "source_rows": base.shape[0], "fallback_queries": query_count}) if any(ids.size != k for ids in best_ids): raise ValueError("exact fallback found fewer than k live vectors") return np.stack(best_ids)
def write_checkpoint_groundtruth( *, source_groundtruth_path: str | Path, query_path: str | Path, base_path: str | Path, output_path: str | Path, live_mask: np.ndarray, k: int = 10, metric: str = "l2", base_dtype: str | np.dtype = "float32", query_dtype: str | np.dtype = "float32", base_external_ids: np.ndarray | None = None, block_rows: int = 250_000, query_batch_size: int = 32, threads: int = 32, progress: Callable[[dict], None] | None = None,) -> dict: """Write IDs-only checkpoint GT and return JSON-serializable audit stats.
``live_mask`` is indexed by original source ID. The base contains the completesource universe in original row order, or ``base_external_ids`` supplies theper-row mapping (for example update_order.u32 for base_permuted). Fallbackuses float64 arithmetic without approximate indexes. The source GT orderingis trusted; optional source distances are not reinterpreted or recomputed.The thread limit applies to BLAS if threadpoolctl is installed; direct L2differences intentionally avoid the cancellation of norm/dot-product L2.""" if metric not in ("l2", "ip"): raise ValueError("metric must be l2 or ip") if min(k, block_rows, query_batch_size, threads) <= 0: raise ValueError("k, block_rows, query_batch_size, and threads must be positive") live = np.asarray(live_mask) if live.ndim != 1 or live.dtype != np.bool_ or live.size == 0: raise ValueError("live_mask must be a nonempty one-dimensional boolean array") if live.size > np.iinfo(np.uint32).max + 1: raise ValueError("source universe exceeds uint32 ID space") live_count = int(np.count_nonzero(live)) if live_count < k: raise ValueError("checkpoint contains fewer than k live vectors") base = _vector_matrix(Path(base_path), base_dtype) query_matrix = _vector_matrix(Path(query_path), query_dtype) source = _source_ids(Path(source_groundtruth_path), live.size) if base.shape[0] != live.size: raise ValueError("base must contain the complete source universe") if query_matrix.shape[1] != base.shape[1] or query_matrix.shape[0] != source.shape[0]: raise ValueError("query dimensions/count do not match base and source GT") queries = np.asarray(query_matrix, dtype=np.float64) if not np.all(np.isfinite(queries)): raise ValueError("query vectors contain non-finite values") if base_external_ids is not None: base_external_ids = np.asarray(base_external_ids) if (base_external_ids.ndim != 1 or base_external_ids.size != live.size or base_external_ids.dtype.kind not in "iu"): raise ValueError("base_external_ids must have one integer ID per source row")
result = np.empty((source.shape[0], k), dtype="<u4") missing = [] min_survivors = source.shape[1] for query_index, candidates in enumerate(source): surviving = candidates[live[candidates]] min_survivors = min(min_survivors, surviving.size) if surviving.size >= k: result[query_index] = surviving[:k] else: missing.append(query_index) if missing: try: from threadpoolctl import threadpool_limits except ImportError: limits = nullcontext() else: limits = threadpool_limits(limits=threads) with limits: result[missing] = _exact_fallback( base, queries[missing], live, base_external_ids, k=k, metric=metric, block_rows=block_rows, query_batch_size=query_batch_size, progress=progress, )
output = Path(output_path) inputs = [Path(source_groundtruth_path), Path(query_path), Path(base_path)] if any(output.resolve() == path.resolve() for path in inputs): raise ValueError("output_path must not overwrite an input artifact") output.parent.mkdir(parents=True, exist_ok=True) temporary_path = None try: with tempfile.NamedTemporaryFile(dir=output.parent, prefix=output.name + ".", suffix=".tmp", delete=False) as handle: temporary_path = Path(handle.name) handle.write(struct.pack("<II", result.shape[0], k)) result.tofile(handle) os.replace(temporary_path, output) finally: if temporary_path is not None: temporary_path.unlink(missing_ok=True) return { "schema": "spatial-checkpoint-groundtruth.v1", "path": str(output), "query_count": int(source.shape[0]), "k": k, "live_count": live_count, "metric": metric, "source_gt_depth": int(source.shape[1]), "min_live_source_candidates": int(min_survivors), "source_filtered_query_count": int(source.shape[0] - len(missing)), "fallback_query_count": len(missing), "fallback_query_ids": missing, "source_gt_contract": "trusted exact over full universe, same queries and metric", "fallback_distance_precision": "float64", "tie_policy": "preserve source order; fallback distance then external ID", }123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131"""Train sampled centroids, then assign every source and official query vector."""
from __future__ import annotations
import argparseimport mathimport timefrom pathlib import Path
import numpy as np
from spatial_common import digest_json, file_identity, matrix, read_json, sha256, write_json, write_matrix, write_u32
def prepare_partition(config, static_root, output, threads=16, chunk_rows=250000): import faiss
source = config["source"] parameters = config["partition"] static_root, output = Path(static_root), Path(output) base_path = static_root / source["base"] query_path = static_root / source["queries"] base = matrix(base_path, source["dtype"]) queries = matrix(query_path, source.get("query_dtype", source["dtype"])) if base.shape[1] != queries.shape[1] or base.shape[0] != source["base_count"]: raise ValueError("Base/query dimensions or configured source count mismatch") if base.shape[0] >= 2**32: raise ValueError("v1 requires source IDs to fit uint32") clusters = int(parameters["clusters"]) sample_count = min(int(parameters["training_rows"]), len(base)) if not 2 <= clusters <= sample_count or threads < 1 or chunk_rows < 1: raise ValueError("Invalid cluster/sample/thread/chunk counts") partition_metric = parameters.get("metric", "l2") if partition_metric not in ("l2", "cosine"): raise ValueError("Partition metric must be l2 or cosine") inputs = {"base": file_identity(base_path), "queries": file_identity(query_path)} signature_inputs = {"parameters": parameters, "source": inputs, "dtype": source["dtype"]} if source.get("query_dtype", source["dtype"]) != source["dtype"]: signature_inputs["query_dtype"] = source["query_dtype"] signature = digest_json(signature_inputs) manifest_path = output / "partition.json" if manifest_path.exists(): manifest = read_json(manifest_path) if manifest["signature"] != signature: raise ValueError("Existing partition uses different source/parameters; choose a new output directory") for rel, identity in manifest["files"].items(): if (output / rel).stat().st_size != identity["bytes"] or sha256(output / rel) != identity["sha256"]: raise ValueError(f"Corrupted existing partition artifact: {rel}") return manifest output.mkdir(parents=True, exist_ok=True) faiss.omp_set_num_threads(threads) rng = np.random.default_rng(parameters["seed"]) sample_ids = np.sort(rng.choice(len(base), sample_count, replace=False)).astype("<u4") print(f"Reading {sample_count:,} sampled training vectors", flush=True) training = np.ascontiguousarray(base[sample_ids], dtype="float32") if not np.isfinite(training).all(): raise ValueError("Training vectors contain nonfinite values") if partition_metric == "cosine": faiss.normalize_L2(training) print(f"Training {clusters} centroids on {sample_count:,} vectors", flush=True) start = time.monotonic() kmeans = faiss.Kmeans( base.shape[1], clusters, niter=int(parameters["iterations"]), seed=int(parameters["seed"]), verbose=True, spherical=partition_metric == "cosine", max_points_per_centroid=math.ceil(sample_count / clusters), ) kmeans.train(training) centroids = np.asarray(kmeans.centroids, dtype="float32") if not np.isfinite(centroids).all(): raise ValueError("Clustering produced nonfinite centroids") write_matrix(output / "centroids.fbin", centroids) write_u32(output / "training_source_ids.u32", sample_ids) index = faiss.IndexFlatL2(base.shape[1]) if partition_metric == "l2" else faiss.IndexFlatIP(base.shape[1]) index.add(centroids) counts = np.zeros(clusters, dtype=np.int64) assignments_path = output / "assignments.u32" with assignments_path.with_suffix(".u32.tmp").open("wb") as stream: for offset in range(0, len(base), chunk_rows): block = np.ascontiguousarray(base[offset:offset + chunk_rows], dtype="float32") if not np.isfinite(block).all(): raise ValueError(f"Nonfinite vectors at offset {offset}") if partition_metric == "cosine": block = block.copy() faiss.normalize_L2(block) _, labels = index.search(block, 1) if np.any(labels < 0) or np.any(labels >= clusters): raise ValueError("Clustering produced invalid source assignments") labels = labels[:, 0].astype("<u4") labels.tofile(stream) counts += np.bincount(labels, minlength=clusters) if offset == 0 or (offset + len(block)) % (chunk_rows * 20) == 0 or offset + len(block) == len(base): print(f"Assigned {offset + len(block):,}/{len(base):,} vectors ({time.monotonic()-start:.1f}s)", flush=True) assignments_path.with_suffix(".u32.tmp").replace(assignments_path) query_values = np.ascontiguousarray(queries, dtype="float32") if not np.isfinite(query_values).all(): raise ValueError("Query vectors contain nonfinite values") if partition_metric == "cosine": query_values = query_values.copy() faiss.normalize_L2(query_values) _, query_labels = index.search(query_values, 1) if np.any(query_labels < 0) or np.any(query_labels >= clusters): raise ValueError("Clustering produced invalid query assignments") write_u32(output / "query_assignments.u32", query_labels[:, 0]) manifest = { "schema": "spatial-partition.v1", "signature": signature, "parameters": parameters, "source": inputs, "source_rows": len(base), "dimension": base.shape[1], "query_rows": len(queries), "assignment_order": "original source vector ID; not HNSW internal ID or update_order row", "counts": counts.tolist(), "query_counts": np.bincount(query_labels[:, 0], minlength=clusters).tolist(), "software": {"numpy": np.__version__, "faiss": faiss.__version__, "threads": threads}, "elapsed_seconds": round(time.monotonic() - start, 3), "files": {}, } for name in ("centroids.fbin", "training_source_ids.u32", "assignments.u32", "query_assignments.u32"): path = output / name manifest["files"][name] = {"bytes": path.stat().st_size, "sha256": sha256(path)} write_json(manifest_path, manifest) return manifest
if __name__ == "__main__": parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--config", required=True, type=Path) parser.add_argument("--static-root", required=True, type=Path) parser.add_argument("--output", required=True, type=Path) parser.add_argument("--threads", type=int, default=16) parser.add_argument("--chunk-rows", type=int, default=250000) args = parser.parse_args() prepare_partition(read_json(args.config), args.static_root, args.output, args.threads, args.chunk_rows).gitattributes-31
README.md+7-5
checksums.sha256+5-175
spatial-workloads/v1/README.mdDeleted-67
spatial-workloads/v1/cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.binDeleted-3
spatial-workloads/v1/cache/groundtruth/0044b23d244fc0002ffb92da7ea71cc9d47d3af6fe5509101681ffe6481404bd.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.binDeleted-3
spatial-workloads/v1/cache/groundtruth/402fb6d0ce0e2637c4cea863e6f341f685a1a26a552deadaeb8815ae96663ae7.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.binDeleted-3
spatial-workloads/v1/cache/groundtruth/78f8274eb6cc4fa58773abc8d770968efd6dde0422afa3c8226fa65e269eb8e7.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.binDeleted-3
spatial-workloads/v1/cache/groundtruth/7c9012d5c006cb369f82a5173129fc9068b563ea3831504d79d4647a5c45371f.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.binDeleted-3
spatial-workloads/v1/cache/groundtruth/873fe2e8659d576834f2ed4b261c70f2d0f1235c47305eb860bb5b95e0ce3696.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.binDeleted-3
spatial-workloads/v1/cache/groundtruth/98e90c24cde0e10b6882bfb88f8aa925e5ad93855b5cf77559bbb100084fd8ef.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.binDeleted-3
spatial-workloads/v1/cache/groundtruth/9c2ae58e45ca0946a7b165944bb8955b6e00eafed1831358805dca9988e04ffd.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.binDeleted-3
spatial-workloads/v1/cache/groundtruth/9fcd100d34d91611096f80f2ee7eb0f10fab77dd2a8267dddf6d41ac612ad008.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.binDeleted-3
spatial-workloads/v1/cache/groundtruth/c159684687b40d63a3340a68cbfbb6386cc4b38397760d1fae4ca7c4566efc0f.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.binDeleted-3
spatial-workloads/v1/cache/groundtruth/c353a5705a268757c3938dedf755e7f232b4b046de059eac73b3f92b6d5c12a2.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.binDeleted-3
spatial-workloads/v1/cache/groundtruth/ccf33ba79ad6952e2f4a99a7eca0acbc4696d4cce4f95d3e358f81b444076784.jsonDeleted-17
spatial-workloads/v1/cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.binDeleted-3
spatial-workloads/v1/cache/groundtruth/fafeda2015f75eade921512586edb67c9ab52420264f9a44576ed30eb35a2029.jsonDeleted-17
spatial-workloads/v1/catalog.jsonDeleted-151
spatial-workloads/v1/checksums.sha256Deleted-169
spatial-workloads/v1/code-provenance.jsonDeleted-31
spatial-workloads/v1/generation-spec.jsonDeleted-143
spatial-workloads/v1/partitions/k128-seed42/assignments.u32Deleted-3
spatial-workloads/v1/partitions/k128-seed42/centroids.fbinDeleted
spatial-workloads/v1/partitions/k128-seed42/partition.jsonDeleted-315
spatial-workloads/v1/partitions/k128-seed42/query_assignments.u32Deleted
spatial-workloads/v1/partitions/k128-seed42/training_source_ids.u32Deleted-3
spatial-workloads/v1/plan.jsonDeleted-589
spatial-workloads/v1/requirements.txtDeleted-4
spatial-workloads/v1/tools/cxl/derive_concurrent_manifest.pyDeleted-555
spatial-workloads/v1/tools/cxl/materialize_concurrent_batch_update.pyDeleted-1392
spatial-workloads/v1/tools/evaluation_runners/configs/deep100.jsonDeleted-123
spatial-workloads/v1/tools/evaluation_runners/e1.pyDeleted-4
spatial-workloads/v1/tools/evaluation_runners/e2.pyDeleted-4
spatial-workloads/v1/tools/evaluation_runners/e6.pyDeleted-4
spatial-workloads/v1/tools/evaluation_runners/prepare_spatial_config.pyDeleted-230
spatial-workloads/v1/tools/evaluation_runners/runner.pyDeleted-2556
spatial-workloads/v1/tools/generator/spatial_common.pyDeleted-109
spatial-workloads/v1/tools/generator/spatial_groundtruth.pyDeleted-263
spatial-workloads/v1/tools/generator/spatial_partition.pyDeleted-131