Skip to content

Fix quantized schema serialization - #3

Merged
feihongxu0824 merged 1 commit into
mainfrom
fix-quantized-schema-serialization
Jun 29, 2026
Merged

Fix quantized schema serialization#3
feihongxu0824 merged 1 commit into
mainfrom
fix-quantized-schema-serialization

Conversation

@feihongxu0824

Copy link
Copy Markdown
Collaborator

Summary

Fix opening zvec collections whose vector index schema includes quantization parameters from the zvec SDK.

The SDK returns values such as zvec.QuantizeType.INT8 for quantize_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_type values 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 -q
  • uv run pytest tests/integration/test_collections_router.py -q
  • uv run ruff check zvec_studio/storage/sdk.py tests/unit/test_sdk_query_params.py tests/integration/test_collections_router.py
  • git diff --check

Signed-off-by: xufeihong.xfh <xufeihong.xfh@alibaba-inc.com>
@feihongxu0824
feihongxu0824 force-pushed the fix-quantized-schema-serialization branch from ff47fac to 5fbcaec Compare June 29, 2026 08:48
@feihongxu0824
feihongxu0824 marked this pull request as ready for review June 29, 2026 08:58
@feihongxu0824
feihongxu0824 merged commit 08ec8b3 into main Jun 29, 2026
15 checks passed
@feihongxu0824
feihongxu0824 deleted the fix-quantized-schema-serialization branch June 29, 2026 09:07
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.

1 participant