qdrant-client icon indicating copy to clipboard operation
qdrant-client copied to clipboard

Data validation and `upload_collection` method

Open rushter opened this issue 3 years ago • 7 comments

I think the upload_collection method should validate data before uploading it.

For example, it will silently upload 1 million records where vector_size=256 to a collection where vector_size=512. As a result, you get no errors and no data will be added to a collection.

Comparing the vector size of a collection to the input array size is very cheap.

rushter avatar Feb 01 '22 14:02 rushter

Just ran into the silent fail issue, I'm surprised the Python client doesn't report an error here. I see a warning in the Qdrant Docker logs but nothing is wrong from the Python side: [2023-05-08T21:58:47.845Z WARN collection::collection_manager::collection_updater] Update operation declined: Wrong input: Vector inserting error: expected dim: 128, got 1536

arestifo avatar May 08 '23 22:05 arestifo

it might happen if you use wait=false in upsert API

generall avatar May 09 '23 06:05 generall

Just ran into the silent fail issue, I'm surprised the Python client doesn't report an error here. I see a warning in the Qdrant Docker logs but nothing is wrong from the Python side: [2023-05-08T21:58:47.845Z WARN collection::collection_manager::collection_updater] Update operation declined: Wrong input: Vector inserting error: expected dim: 128, got 1536

I have the same problem, I would appreciate it if you could help. I am working with the Google Cloud Server and I came across this error in Notepad. UnexpectedResponse: Unexpected Response: 400 (Bad Request) Raw response content: b'{"status":{"error":"Wrong input: Vector inserting error: expected dim: 734, got 0"},"time":0.002494573}'

zeynepiskndr avatar Aug 29 '23 05:08 zeynepiskndr

I'm hitting this error: grpc_message:"Wrong input: Vector inserting error: expected dim: 1536, got 768"

kientv avatar Dec 12 '23 10:12 kientv

I'm hitting this error: grpc_message:"Wrong input: Vector inserting error: expected dim: 1536, got 768"

it means that you are trying to upload 768-d vectors to a collection which has been configured to work with 1536-d vectors

joein avatar Dec 12 '23 11:12 joein

Is there a fix? Even setting wait=True is not solving this issue

AI-Aether avatar Jan 04 '24 13:01 AI-Aether

That's not Qdrant's problem. You can solve that error by deleting old collection and create a new collection with correct dimension size. for instance: OpenAI embedding is 1536, Gemini is 768.

kientv avatar Jan 04 '24 14:01 kientv