Repository navigation
fix(seekdb): make SeekDB runnable from the web UI - #895
Conversation
| ) | ||
|
|
||
|
|
||
| def test_ui_exposes_every_field_the_hnsw_model_requires(): |
There was a problem hiding this comment.
tests/test_seekdb_config.py line:43
Low ---- This new regression test is not executed by PR CI: .github/workflows/pull_request.yml runs make unittest, which invokes only tests/test_dataset.py::TestDataSet::test_download_small (see Makefile), and make lint checks only vectordb_bench/. The four green matrix jobs never run tests/test_seekdb_config.py, so the SeekDB task-generation fix has no automated regression protection; consider wiring the new test into the CI test step.
|
Good point, nothing outside test_dataset was running in CI. Added |
jamesgao-jpg
left a comment
There was a problem hiding this comment.
Thanks for fixing the SeekDB UI task generation and adding the CI coverage! I found one issue with the new controls and a few existing client risks that the UI path exposes:
| inputHelp="HNSW graph degree (m) for SeekDB", | ||
| inputType=InputType.Number, | ||
| inputConfig={ | ||
| "min": 4, |
There was a problem hiding this comment.
[P1] Validate the existing index before reporting these build settings
The UI allows users to set these parameters and select Index already exists, but the existing SeekDB client skips index creation without validating the existing index parameters or metric. A run can therefore report the newly selected m and ef_construction while searching a different index. This client limitation predates the PR, but this change makes the UI path usable. Could we validate the actual index before reuse, or reject reuse when it cannot be verified, and add a mismatch test?
There was a problem hiding this comment.
Thanks for adding the reuse check. I found one remaining edge case: the new regex checks the index name and parameters but accepts any indexed column. In a mocked SHOW CREATE TABLE reproduction, vidx on other_embedding passed validation even though the benchmark searches embedding. The lack of this validation predates the PR; this is a gap in the new safeguard, not a regression. Could the check also require the index to target embedding, with a mismatch regression test? I haven't tested the query against a live SeekDB instance.
| CaseLabel.Load: QdrantLocalLoadConfig, | ||
| CaseLabel.Performance: QdrantLocalPerformanceConfig, | ||
| }, | ||
| DB.SeekDB: { |
There was a problem hiding this comment.
[P1] Redact the SeekDB password from initialization logs
This UI integration makes an existing client issue reachable: SeekDBConfig.to_dict() unwraps the password and the client logs the entire dictionary at INFO. I confirmed this with a mocked initialization using a synthetic password. Could the client omit or redact credentials before logging, with a regression test?
| CaseLabel.Performance: QdrantLocalPerformanceConfig, | ||
| }, | ||
| DB.SeekDB: { | ||
| CaseLabel.Load: SeekDBLoadConfig, |
There was a problem hiding this comment.
[P1] Preserve instance-wide resource settings by default
Now that the UI can start a SeekDB run, it also reaches the existing client initialization, which executes ALTER SYSTEM for memory_limit and cpu_count, even when reusing an existing index. These are instance-wide settings, so a benchmark can change an operator-configured resource policy without an explicit choice. Could we preserve them by default and make any tuning opt-in?
| label=CaseConfigParamType.ef_construction, | ||
| inputHelp="HNSW ef_construction for SeekDB", | ||
| inputType=InputType.Number, | ||
| inputConfig={ |
There was a problem hiding this comment.
[P2] Reject incompatible HNSW parameter combinations before running
The new inputs allow m=64 with ef_construction=8, and the config model accepts the pair. OceanBase HNSW documentation states that ef_construction must exceed m. The existing client drops the old table before creating the new index, so waiting for the backend to reject an invalid pair can happen after that destructive step. Could we validate the pair before starting the run and add a boundary test?
There was a problem hiding this comment.
Thanks for adding the ef_construction > m validation. One boundary remains: the new UI and model accept m=64, ef_construction=1001, but SeekDB's regression test rejects that value. In a mocked rejection I confirmed that the client drops and recreates the table before attempting index creation. The backend risk predates this PR, but the new UI now exposes the value. Could we validate the supported upper bound before starting and add a boundary test?
|
@jamesgao-jpg pushed fixes for all four. Reusing an index now reads I checked the DDL format and the bound against a local One thing to flag: anyone who relied on the old implicit |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: serhiizghama The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Merged main to clear the conflict in |
| self._cursor.execute(f"SHOW CREATE TABLE {self.table_name}") | ||
| row = self._cursor.fetchone() | ||
| ddl = row[1] if row else "" | ||
| m = re.search(rf"VECTOR KEY `?{self._index_name}`?\s*\([^)]*\)\s*WITH\s*\(([^)]*)\)", ddl, re.IGNORECASE) |
There was a problem hiding this comment.
[P1] Validate the column of a reused index
The new check matches any column inside vidx's parentheses. In a mocked SHOW CREATE TABLE reproduction, an index on other_embedding passed even though benchmark searches use embedding; the check therefore cannot establish that the verified index is the one being searched. This lack of validation predates the PR, but the new safeguard should check the indexed column too. Could you reject a column mismatch and add a regression test? I haven't tested the resulting query against a live SeekDB instance.
| @model_validator(mode="after") | ||
| def check_ef_construction(self): | ||
| # The client drops the old table before creating the index, so reject this up front. | ||
| if self.ef_construction <= self.m: |
There was a problem hiding this comment.
[P1] Validate the upper bound before dropping the table
The new UI and validator accept m=64, ef_construction=1001, but SeekDB's regression test rejects this value. In a mocked rejection, the client dropped and recreated the table before attempting the invalid index. The backend risk predates this PR, but the new UI exposes the value. Could we validate the supported upper bound before initialization and add a boundary test?
|
Hi, thanks for the update! I did a re-scan and found some new pending blockers not found in the first round. |
|
@jamesgao-jpg pushed both. The reuse check now also reads the column inside For the bounds I went to the source of that error rather than just the test: I left |
SeekDB shows up in the web UI's database picker, but any run with it dies at task generation with
TypeError: 'NoneType' object is not callable. It has no entry inCASE_CONFIG_MAP, so the UI sends no index type,generate_tasksfalls back to AUTOINDEX, and_seekdb_case_configonly knows HNSW. Even with the right class,SeekDBHNSWConfigrequiresm,ef_constructionandef_searchwith no defaults, and the UI had no inputs for them.This is the same error people reported for OceanBase in #689 (fixed by #691); the SeekDB backend came later in #770 and didn't get a UI entry.
Added SeekDB to the map with an HNSW index type plus
m,ef_constructionandef_searchinputs, on both Load and Performance (the model needsef_searcheven for load-only cases). Since SeekDB runs on the OceanBase vector engine, I copied the bounds and defaults from the OceanBase inputs rather than inventing new ones. If you'd rather use SeekDB's own defaults there, happy to change them.The new test drives
generate_taskswith the UI defaults; without the map entry it fails with the sameTypeError.