weaviate / weaviate/weaviate-python-client
insert_many silently discards vectors if they're NumPy arrays
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 227
- Forks
- 151
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at weaviate/collections/batch/grpc_batch_objects.py line 60 and trace the insert_many handling for DataObject vectors. Reproduce the case with a NumPy array, then verify that the completed behavior either preserves the vector as floats or reports an explicit error. Add regression coverage for the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100