Skip to content

Fix(#590): use snake_case DiskANN build params so max_degree/search_list_size are applied#670

Merged
FileSystemGuy merged 2 commits into
mainfrom
fix/590-diskann-snake-case-build-params
Jul 4, 2026
Merged

Fix(#590): use snake_case DiskANN build params so max_degree/search_list_size are applied#670
FileSystemGuy merged 2 commits into
mainfrom
fix/590-diskann-snake-case-build-params

Conversation

@idevasena

Copy link
Copy Markdown
Contributor

Fixes #590 + Pull updated README.md from PR #588

Problem

For index_type: DISKANN, the max_degree and search_list_size values set in config.yaml (or via --max-degree / --search-list-size) had no effect on the built index. PR #497 fixed config parsing so the values reach create_index(),
but the index was still built with engine defaults.

Root cause

As identified in issue #590 (comment),
this is a key-name case mismatch, not a milvus.yaml server-config limitation. knowhere's DiskANN config declares snake_case build fields (src/index/diskann/diskann_config.h:87-99) and builds with
build_conf.max_degree.value() / build_conf.search_list_size.value() (src/index/diskann/diskann.cc:481-498). The benchmark's DISKANN branch passed CamelCase keys (MaxDegree, SearchListSize), which knowhere silently drops.

The reporter's build log (configured max_degree=72, search_list_size=137) confirms it: the snake_case fields were applied with defaults (56 / 100) while the CamelCase fields carried the configured values (72 / 137) but were ignored. HNSW and AISAQ were unaffected because their key names already match what the engine reads — the AISAQ branch was already snake_case.

Changes

File Change
vdb_benchmark/vdbbench/load_vdb.py DISKANN branch emits max_degree / search_list_size (snake_case), matching the AISAQ branch; help strings updated
vdb_benchmark/vdbbench/mpi_wrapper.py Same fix in the multi-node _build_index_params() path
vdb_benchmark/vdbbench/benchmark/backends/milvus/backend.py Emits snake_case; normalizes legacy CamelCase keys from older user configs (params.get("max_degree", params.get("MaxDegree", 64))) so existing configs keep working but now take effect
vdb_benchmark/vdbbench/benchmark/backends/milvus/__init__.py DISKANN ParamDescriptor names renamed to snake_case so introspection advertises the working keys
vdb_benchmark/vdbbench/benchmark/configs/1m_diskann.yaml Reference config switched to snake_case keys
vdb_benchmark/vdbbench/benchmark/backends/milvus/README.md Parameter table updated; note added documenting legacy-key normalization
mlpstorage_py/cli/vectordb_args.py Help strings refer to snake_case parameter names

Notes on scope:

  • run_benchmark.py:_collect_index_params() intentionally still accepts both
    spellings; the backend normalizes CamelCase → snake_case, so this PR is
    backward compatible with existing configs.
  • collection_mgr.py already reads both spellings for display; unchanged.

Impact on submissions

Any prior DISKANN run on the affected code built its index with knowhere defaults regardless of configured values, so DISKANN "tuning" results were not actually varying build parameters. After this fix, configured values take effect — DISKANN build times and recall/QPS characteristics may legitimately change versus earlier runs with the same config. This may warrant a note in the v3.0 changelog / Rules discussion.

Validation

  1. Start Milvus and load with clearly non-default values:

    python3 vdb_benchmark/vdbbench/load_vdb.py \
      --index-type DISKANN --max-degree 72 --search-list-size 137 \
      --collection-name diskann_590_check --force ...
  2. Confirm the applied build params in the Milvus/knowhere build log
    (grep -E "max_degree|search_list_size" <milvus log>): snake_case fields
    now show 72 / 137 instead of defaults 56 / 100, and no ignored
    CamelCase entries carry the configured values.

  3. Confirm via index description:

    from pymilvus import Collection, connections
    connections.connect(host=..., port=...)
    print(Collection("diskann_590_check").index().params)
    # {'index_type': 'DISKANN', 'metric_type': 'COSINE',
    #  'params': {'max_degree': 72, 'search_list_size': 137}}
  4. Backward-compat check: run the modular framework with an old-style config containing MaxDegree / SearchListSize and confirm the backend normalizes and applies them (same log signature as step 2).

  5. Sanity: build-time sensitivity — with a fixed dataset, max_degree=16 vs 72 should now produce measurably different index build times and index file sizes, which was not the case before this fix.

  6. Regression: HNSW and AISAQ load paths unchanged (M/efConstruction and inline_pq/max_degree/search_list_size still applied as before).

…ist_size are applied + README updates based on mlpstorage cli changes (pulled from PR #588)
@idevasena idevasena requested a review from a team July 4, 2026 02:55
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Ride-along with the #590 DISKANN fix. Since 3.0.29 (silently rolled in
by #648) the following have landed on main: #649, #650, #652, #654,
#656, #657, #659, #665, and #602. Marks a natural version boundary
before the DISKANN key-name fix ships.
@FileSystemGuy FileSystemGuy merged commit f91dfdd into main Jul 4, 2026
4 checks passed
@FileSystemGuy FileSystemGuy deleted the fix/590-diskann-snake-case-build-params branch July 4, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VDB] DISKANN index build params (max_degree / search_list_size) are not applied at index creation

2 participants