.Net: Fixes Qdrant 1.17 issue with returning empty vectors#13638
.Net: Fixes Qdrant 1.17 issue with returning empty vectors#13638TsengSR wants to merge 4 commits intomicrosoft:mainfrom
Conversation
|
Thanks @TsengSR, seems like a straightforward enough change. The integration tests automatically spin up a qdrant container in docker to test against locally. So running the tests should do all the work, as long as you have docker installed. Looks like a few of the unit tests need updating though to match the latest code. |
|
Okay, seems the test can run (net472 fails, seems tls validation issue with the qdrant store), but there seems to be issues. The containers spinning up during the tests are qdrant 1.13.4 (shows under the qdrant logo, when they spin up) which probably still only suports the old format. I had 1.16.3 previously and upgraded to 1.17 when it happened. But all I could find is which should be 1.17.0, but its not what runs in the container. Any ideas/pointers? |
|
@TsengSR, check out https://github.com/microsoft/semantic-kernel/blob/main/dotnet/test/VectorData/Qdrant.ConformanceTests/Support/QdrantTestStore.cs#L21. We use https://testcontainers.com/modules/qdrant/?language=dotnet. I see we don't pass a version into QdrantBuilder, so I would have expected it to use the latest version, but I guess not. It's possible to pass a specific version though: var qdrantContainer = new QdrantBuilder("qdrant/qdrant:v1.13.4")
.Build();The code you shared is actually samples, but the tests are all under https://github.com/microsoft/semantic-kernel/blob/main/dotnet/test/VectorData |
Updated Testcontainers.Qdrant to be able to use the string constructor to set a qdrant image version
dotnet/test/VectorData/Weaviate.ConformanceTests/Support/TestContainer/WeaviateBuilder.cs
Show resolved
Hide resolved
Thanks, that helped a lot. The current Testcontainers.Qdrant didn't had any constructor, updated to 4.10.0 locally which contain these (and deprecates the parameterless one). Its still odd ":latest" tag gave v1.16.3, but ":v1.17.0" pulled the correct image. Had to change the setup slightly for Weaviate Tests, as Fixed the test issues by doing pattern matching whether update: |
roji
left a comment
There was a problem hiding this comment.
LGTM, but see the global.json change.
dotnet/test/VectorData/Qdrant.ConformanceTests/Support/QdrantTestStore.cs
Show resolved
Hide resolved
|
@TsengSR see build error in CI. |
Head branch was pushed to by a user without write access
Fixed that. There are 4 tests failing on pinecone, but this also fail when I run them against main branch. Not sure its related to my machine setup. For qdrant net472 most fail too, but net10 they succeed. Hope it will work though.
|

Motivation and Context
With Qdrant server 1.17 Embeddings stopped being returned.
Fixes #13587
Description
The
VectorOutput.Dataproperty became deprecated inQdrant.Client1.17. The alternative is to useVectorOutput.Dense.Datainstead orVectorOutput.GetDenseVector()(fromQdrant.Client1.16.0 or later).Since the
.Densealready exyists inQdrant.Client1.15.1 that is used by the current connector, I used these. The.GetDenseVector()also returns nullableDenseVector, so I was unsure how to handle in context of Semantic Kernel, as as far as I see it Semantic Kernel only supports Dense Vectors (the other two are.Sparsefor sparse vectors and.MultiDense).So this may need special handling in future to throw an exception, when the server returns one of the other two vector types and not dense vectors.
Contribution Checklist
I'm currently unable (or rather I don't know how) to run the local integration/unit tests against the qdrant database. But I validated the change in my personal project mentioned in #13587 by directly referencing the connector in my project and it correctly returned the vectors on the sample code where it failed previously