-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some smaller updates #27
Conversation
turbopuffer/namespace.py
Outdated
@@ -175,7 +175,7 @@ def created_at(self) -> Optional[datetime]: | |||
def upsert(self, | |||
ids: Union[List[int], List[str]], | |||
vectors: List[List[float]], | |||
attributes: Optional[Dict[str, List[Optional[str]]]] = None, | |||
attributes: Optional[Dict[str, List[Optional[str | int]]]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
isn't supported for union types on python 3.9, need to use Union[]
[ | ||
tpuf.VectorRow(id=8, vector=[0.8, 0.8], attributes={ "blabla": "row based upsert format is cool" }), | ||
], | ||
schema=schema, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though this seems to work, we should also make sure all the overrides have the schema in the parameter list
Good catch. Sorry I missed this. |
Signed-off-by: Morgan Gallant <[email protected]>
Signed-off-by: Morgan Gallant <[email protected]>
Signed-off-by: Morgan Gallant <[email protected]>
4a66ece
to
4c56e97
Compare
Signed-off-by: Morgan Gallant <[email protected]>
@pushrax went ahead and bumped version to v0.1.13 in here, mind merging this + doing the publish after final review? Added the schema param to the upsert helpers too, I don't think this changed anything, but I agree it's the right thing to do! |
published |
Optional[str]
toOptional[str | int]
, we support numerical attribute types