Skip to content

fix(embed): give warning when embeder and vectoerdb are not the same.#930

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
zhougit86:feature/check_embed_dims
Mar 24, 2026
Merged

fix(embed): give warning when embeder and vectoerdb are not the same.#930
qin-ctx merged 1 commit intovolcengine:mainfrom
zhougit86:feature/check_embed_dims

Conversation

@zhougit86
Copy link
Contributor

Description

This PR adds a configuration validation step to check the consistency of vector dimensions. It compares the dimension specified for storage.vectordb with the dimension configured for embedding. If both values are greater than 0 but do not match, the system will log a warning to help users catch potential vector search errors early.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Added a dimension consistency check in OpenVikingConfig.from_dict (openviking_cli/utils/config/open_viking_config.py).
  • Added a standard logging.warning output to notify users of dimension mismatches.
  • Applied ruff formatting to the modified code blocks to ensure styling compliance.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (Note: Added an intentional runtime warning for invalid configs)
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

The warning uses the standard logging module directly to avoid infinite recursion that could occur if get_logger triggers config initialization before the config object is fully loaded.

@github-actions
Copy link

Failed to generate code suggestions for PR

@zhougit86 zhougit86 force-pushed the feature/check_embed_dims branch 2 times, most recently from 4eb77d7 to 394d6be Compare March 24, 2026 12:25
@zhougit86 zhougit86 force-pushed the feature/check_embed_dims branch from 394d6be to 7a977d9 Compare March 24, 2026 12:36
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


xiaogang.zhou seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@qin-ctx qin-ctx merged commit d95ee7d into volcengine:main Mar 24, 2026
5 of 6 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 24, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


xiaogang.zhou seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

zeattacker pushed a commit to zeattacker/OpenViking that referenced this pull request Mar 25, 2026
…ngine#930)

Cherry-pick from upstream d95ee7d. Warns when vectordb and embedding
dimensions don't match to prevent silent search failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants