Skip to content

fix: make QdrantLocal runnable from the web UI - #867

Open
serhiizghama wants to merge 5 commits into
zilliztech:mainfrom
serhiizghama:fix/qdrant-local-ui-index-params
Open

fix: make QdrantLocal runnable from the web UI#867
serhiizghama wants to merge 5 commits into
zilliztech:mainfrom
serhiizghama:fix/qdrant-local-ui-index-params

Conversation

@serhiizghama

Copy link
Copy Markdown
Contributor

Fixes #796. QdrantLocal can't be run from the web UI at all — QdrantLocalIndexConfig requires m and ef_construct, but there's no DB.QdrantLocal entry in CASE_CONFIG_MAP, so the UI renders "Auto", passes an empty config, and pydantic raises 2 validation errors ... Field required before the run starts. That matches the reporter's "seems like 'ef_construct' is missing, but there is not such option" — the option genuinely isn't there.

Gave both fields the same defaults the CLI already uses (m=16, ef_construct=200) and registered QdrantLocal in CASE_CONFIG_MAP so m, ef_construct and on_disk are tunable for load, plus hnsw_ef for search — the same four knobs qdrant_local/cli.py exposes. Needed two new CaseConfigParamType members since the existing ef_construction spelling doesn't match the model field.

The CLI path is unchanged: it always passed these explicitly. Verified the empty-config case now builds, that the UI defaults round-trip into index_param()/search_param(), and that tuned values reach the client. New tests fail on main and pass here.

@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: serhiizghama
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

CaseConfigParamInput_m_QdrantLocal = CaseConfigInput(
label=CaseConfigParamType.m,
displayLabel="m",
inputHelp="HNSW index parameter m, set 0 to disable the index",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vectordb_bench/frontend/config/dbCaseConfigs.py line:3299
Low ---- The new m input lets users set m=0 with the help text "set 0 to disable the index", but no such code path exists: QdrantLocalIndexConfig.index_param() always forwards m into HnswConfigDiff(m=...), and Qdrant does not validate m (only ef_construct is constrained to min=4), so create_collection accepts m=0 and builds an HNSW graph with m0 = 2*m = 0 edges — a degenerate index that silently yields broken search results rather than a disabled index. Consider setting min=2, rewording/removing the "set 0 to disable the index" claim, or implementing an actual no-index path.

@serhiizghama

Copy link
Copy Markdown
Contributor Author

You're right — that help text was inherited from the local CLI's --m option, and it doesn't hold here. m=0 is Qdrant's multitenancy knob: it disables the global index only when payload_m builds per-tenant ones instead, which qdrant_cloud sets but qdrant_local never does. So in this client 0 just leaves the collection without a vector index.

Bumped the input to min=2 and reworded the help to describe m plainly. Fixed the same sentence in the CLI too, so the two surfaces don't disagree about the same flag. Added a small test on the bound.

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.

[BUG]: QdrantLocal Error

3 participants