refactor(vector-storage): fix vector counting logic and improve error…#123
Open
sqhyz55 wants to merge 2 commits intoxorbitsai:mainfrom
Open
refactor(vector-storage): fix vector counting logic and improve error…#123sqhyz55 wants to merge 2 commits intoxorbitsai:mainfrom
sqhyz55 wants to merge 2 commits intoxorbitsai:mainfrom
Conversation
… handling - Add _group_embeddings_by_model() to group embeddings by model for batch processing - Add _validate_and_prepare_table() to ensure table exists with compatible schema, drop and recreate on dimension mismatch or incompatible vector field type - Add _process_batch() with merge_insert-first strategy and fallback to add(); distinguish non-recoverable errors (schema/type/dimension) from recoverable ones - Add _process_model_embeddings() to process per-model batches and aggregate upsert counts correctly - Refactor write_vectors_to_db() to use per-model flow and return accurate upsert_count / index_status - Improve error handling and logging throughout
- Use IndexOperation enum for embedding write index_status mapping - Improve _validate_and_prepare_table and _process_batch docstrings - Add tests for grouping embeddings, table validation and spill retry - Extend IndexOperation tests to cover READY status Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… handling