Skip to content

feat: encode multi-vector attrs - #258

Merged
rkruze merged 3 commits into
nextfrom
roko/encoding-for-multivec
Aug 21, 2026
Merged

feat: encode multi-vector attrs#258
rkruze merged 3 commits into
nextfrom
roko/encoding-for-multivec

Conversation

@rkruze

@rkruze rkruze commented Aug 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@rkruze
rkruze requested a review from benesch August 21, 2026 12:04
Comment thread src/turbopuffer/_utils/_transform.py Outdated
Comment on lines +95 to +98
# Dense vector attrs require ann (true or a config object, including {});
# type-only declarations are rejected server-side. The auto-inferred
# "vector" column is handled separately and does not need to appear in schema.
# Server treats ann:{} as enabled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Dense vector attrs require ann (true or a config object, including {});
# type-only declarations are rejected server-side. The auto-inferred
# "vector" column is handled separately and does not need to appear in schema.
# Server treats ann:{} as enabled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment just makes things more confusing IMO; ann is not None and ann is not False reads more simply than this comment.

],
"schema": {
"title_embedding": {"type": "[3]f32", "ann": True},
"image_embedding": {"type": "[2]f16", "ann": True},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to test that the ann: False case doesn't fire here.

@rkruze
rkruze merged commit 712b379 into next Aug 21, 2026
8 checks passed
@stainless-app stainless-app Bot mentioned this pull request Aug 21, 2026
stainless-app Bot pushed a commit that referenced this pull request Aug 21, 2026
* feat: encode multi-vector attrs

* Address review feedback on multi-vector encoding.

Co-authored-by: Cursor <[email protected]>

* Cover ann: False in the async encoding test too.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Nikhil Benesch <[email protected]>
Co-authored-by: Cursor <[email protected]>
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.

2 participants