Repository navigation
Conversation
Resolve SQ8 compression and training threshold with precedence collection_params.hnsw_config > REDIS_HNSW_COMPRESSION / REDIS_HNSW_TRAINING_THRESHOLD > unset, mirroring the SVS env vars. The env vars are read only for HNSW configs with a vector index. Env text is trimmed, blank is unset, and invalid values are fatal errors that name the variable. Extend the ignored SQ8 integration test with an env-only engine config. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
create-hnsw-sq8.py regenerates redis-hnsw-sq8-k10.json and redis-svs-sq8-comparison.json deterministically, in the compact one-point-per-line layout. The committed files are reproduced byte-identically, so they are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Add "Environment overrides" section to hnsw-sq8-e2e.md documenting REDIS_HNSW_COMPRESSION and REDIS_HNSW_TRAINING_THRESHOLD variables. Explain how config fields override environment variables, validation requirements (compression must be SQ8, threshold 0-102400), error handling for invalid values, and how resolved values are recorded in result metadata. Add "Regenerating configurations" section describing the create-hnsw-sq8.py script and byte-for-byte verification via git diff. Add one sentence to svs-sq8-e2e.md noting that redis-svs-sq8-comparison.json is generated by the same script. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
F1: warn in hnsw-sq8-e2e.md that env overrides can mislabel results
(identical values across upload and search, plain baselines, metadata).
F2: make the ignored SQ8 integration test discriminate config from env
for all three cases (env threshold 8, expect redis-sq8-env = 8).
F3: qualify the threshold validation and env-record wording in the docs.
F4: append "(from REDIS_HNSW_COMPRESSION)" to dtype errors when the
compression came from the env var, with a unit test.
F5: drop the personal fork link and internal hostname in svs-sq8-e2e.md.
F6: document running the generator with python3.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
🤖 Automated first-pass review — a human maintainer's review is still required before merge. I read this against the base tree. It's stacked on #324, so anything that lives only in #324 (the Worth fixing before merge Nothing blocking in this diff. The precedence logic is in Optional / follow-up
On the matrices themselves: the new Net: clean, carefully self-reviewed, and well-scoped for a first contribution. The remaining risk is mislabeled results when env vars are exported and nobody checks the metadata, and items 1–3 would narrow it. Whether to accept, and whether to wait for #324 first, is the maintainer's call. |
Add four HNSW SQ8 cases (training threshold 0 and 10240, FLOAT16 and FLOAT32) to each of dbpedia-calibration.json and cohere-calibration.json. They copy the plain HNSW baselines and add COMPRESSION and TRAINING_THRESHOLD, so SQ8 shares the dataset, data type, upload settings and search point of every SVS case. Document the pairing and the ground-truth width check for the cohere corpus. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The four SQ8 entries had landed after the first SVS entry because that entry's opening brace is unindented in the file, which defeated the insertion anchor. Move the block to directly follow cohere-cal-hnsw-float32, content unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
E2E part of MOD-14960: make HNSW SQ8 benchmarkable through this harness and give every SVS-VAMANA benchmark in the repository an SQ8 counterpart. Separate from the VectorSimilarity microbenchmarks (#1064, #1065, #1067). Replaces #324 and the fork draft #323.
1. Redis engine: HNSW SQ8 support
The Redis adapter ignored HNSW compression settings, so a configuration labeled SQ8 created an uncompressed index. It now reads
collection_params.hnsw_config.COMPRESSION/TRAINING_THRESHOLD(typed and validated:SQ8only, threshold 0..=102400, FLOAT32/FLOAT16, HNSW only), emits them inFT.CREATE, verifies the created schema throughFT.INFO, and records declared and effective values in result metadata. A dedicatedmake integration-test-redis-sq8target runs against SQ8-capable servers (opt-in, because the CI Redis image predates HNSW SQ8). Run guide:docs/hnsw-sq8-e2e.md.2. SQ8 counterparts for every SVS benchmark
The SVS E2E benchmarks are the two calibration matrices
dbpedia-calibration.jsonandcohere-calibration.json. Every SVS case there now has HNSW SQ8 counterparts,<prefix>-cal-hnsw-sq8-zero-{float16,float32}(threshold 0) and<prefix>-cal-hnsw-sq8-trained-{float16,float32}(threshold 10240), identical to the file's HNSW baselines except for the compression keys: same data type, upload settings and search point (k=100, 100 clients, calibration to 0.95). Pure additions. The SVS matrix and the SQ8 matrix run with the same command, selecting--engines '<prefix>-cal-svs-*'or--engines '<prefix>-cal-hnsw-sq8-*'.3. Additional configurations
redis-hnsw-sq8-k10.json: FLOAT32/FLOAT16 x plain HNSW, SQ8 threshold 0, SQ8 threshold 10240; k=10 for the DBpedia 100K corpus, whose ground truth has only ten neighbors per query.redis-svs-sq8-comparison.json: the same four index types plus SVS-VAMANA, k=10 and k=100, 1/8/100 clients, breadth sweep and calibration 0.95/0.99, for the full DBpedia 975K corpus. Guide:docs/svs-sq8-e2e.md.create-hnsw-sq8.pyregenerates both files byte-identically (python3 experiments/configurations/create-hnsw-sq8.py && git diff --exit-code experiments/configurations).4. Environment overrides
REDIS_HNSW_COMPRESSIONandREDIS_HNSW_TRAINING_THRESHOLD, mirroringREDIS_SVS_COMPRESSION/REDIS_SVS_REDUCE: a value inhnsw_configwins per field; the variables are read only for HNSW configurations that build a vector index; env text is trimmed and an empty value is unset. Unlike the SVS variables, an unparseable or out-of-range threshold is a fatal error naming the variable. Both are registered in theKNOWN_UNRECORDEDinventory. The docs warn that the values must be identical for the upload and the search invocations (read-back runs only at index creation) and that the variables also convert the-plainbaselines, so they must not be exported while running the shipped matrices.5. Dataset registry correction (breaking rename)
dbpedia-openai-1M-1536-angular-100neighborsdeclared 1,000,000 vectors, but the archive holds 975,000 (verified on disk; the harness only warned). Renamed todbpedia-openai-975K-1536-angular-100neighborswithvector_count975000 and matching path components; source URL unchanged. Move existing downloads todatasets/dbpedia-openai-975K-1536-angular-100neighbors/dbpedia_openai_975K/to avoid a re-download. The legacyv0/registry is untouched.Validation
make agent-check(fmt, clippy, unit tests, harness invariants): passed at every commit; 185 unit tests at HEAD (x86, rustc 1.98.1; also Arm for the engine change).make integration-test-no-dockeragainstredis:8.8.0: 44 passed, 1 ignored (the SQ8 test).make integration-test-redis-sq8against the SQ8-capable Search development build (Arm): passed, including the env-override case (config thresholds 0 and 4 kept, env threshold 8 applied to the config withoutCOMPRESSION). Mutation check on the read-back: forcing an emitted threshold of 0 made the learned-threshold case fail withdiffers from requested 4.REDIS_HNSW_TRAINING_THRESHOLD=abcexited 1 withREDIS_HNSW_TRAINING_THRESHOLD must be an integer from 0 to 102400, got "abc"before creating any index.git diff --exit-code experiments/configurationsclean after regeneration.GitHub CI here runs code checks and the general integration matrix; it does not run the Arm benchmarks.
Integration tests (Milvus)fails at the "Start Milvus" step on this branch and onmaster(2026-09-24); unrelated to this change.Initial Arm results (smoke, not throughput evidence)
DBpedia 100K, 1536d, cosine, first 100 queries, k=10, ef=400, one client, one repetition, four Search workers. Redis 8.10.1 with the Search development build at
8d1dae1(HNSW SQ8 targets Redis 8.12).Every case verified the requested schema, full document and backend counts, empty frontend and no indexing errors before searching; one index resident at a time. Total memory includes the stored HASH vectors. Full-corpus 975K runs and the training-transition study are reported on MOD-14960.
Notes and follow-ups
RedisEngineon HNSW configs read the ambient environment, as they already do forREDIS_SVS_*.REDIS_HNSW_*andREDIS_SVS_*: run theFT.INFOread-back on the--skip-uploadsearch path too.conditions: {}); that independent test fix is not part of this PR.🤖 Generated with Claude Code