You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a collection c and call c.data.insert_many on a list[DataObject], each of which with the vector field set to a NumPy array, the upload returns without error but silently discards the vectors. The line that causes this behavior is here.
I would expect the NumPy array to be interpreted as a list of floats. Or, if this is undesirable for some reason, passing a NumPy array as a vector should result in an error.
The text was updated successfully, but these errors were encountered:
hi @kylrth, this is definitely a bug since we handle NumPy arrays gracefully in other areas of the API. I will make sure it's fixed for the next release. Thanks for raising it!
@tsmith023 I have raised a PR, please review it.
I was not sure how to do it without importing numpy, I was having troubles with Pydantic throwing errors when specifying types without importing them. Also numpy.ndarray doesn't seem to implement Sequence from ABC, only closest thing it implements is Iterable, So I added a custom class for validation.
If I have a collection
c
and callc.data.insert_many
on alist[DataObject]
, each of which with thevector
field set to a NumPy array, the upload returns without error but silently discards the vectors. The line that causes this behavior is here.I would expect the NumPy array to be interpreted as a list of floats. Or, if this is undesirable for some reason, passing a NumPy array as a vector should result in an error.
The text was updated successfully, but these errors were encountered: