Fix quantized schema serialization - #3
Merged
Conversation
Signed-off-by: xufeihong.xfh <xufeihong.xfh@alibaba-inc.com>
feihongxu0824
force-pushed
the
fix-quantized-schema-serialization
branch
from
June 29, 2026 08:48
ff47fac to
5fbcaec
Compare
feihongxu0824
marked this pull request as ready for review
June 29, 2026 08:58
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.
Summary
Fix opening zvec collections whose vector index schema includes quantization parameters from the zvec SDK.
The SDK returns values such as
zvec.QuantizeType.INT8forquantize_type. Those pybind enum values were previously passed through into Studio API response models, which caused FastAPI/Pydantic JSON serialization to fail when opening a collection.This change converts
quantize_typevalues back to their wire-safe enum names, such as"INT8"and"FP16", while preserving the existing create/edit path that accepts those strings and converts them back to SDK values.Validation
uv run pytest tests/unit/test_sdk_query_params.py -quv run pytest tests/integration/test_collections_router.py -quv run ruff check zvec_studio/storage/sdk.py tests/unit/test_sdk_query_params.py tests/integration/test_collections_router.pygit diff --check