Comments (4)
Yes, there are several ways to access your points
- As it is persisted in sqlite, you can just read the data from sqlite using
sqlite3
Something like this:
import sqlite3
import pickle
connection = sqlite3.connect('asdf/collection/asdf/storage.sqlite')
cursor = connection.cursor()
cursor.execute("SELECT point FROM points")
for row in cursor.fetchall():
rows = pickle.loads(row[0])
print(rows)
- The same thing but using QdrantClient classes
from qdrant_client.local.persistence import CollectionPersistence
col = CollectionPersistence("asdf/collection/asdf")
for point in col.load():
print(point)
- You can modify
load_vectors
method inqdrant_client.local.local_collection
vectors[name].append(
np.ones(self.config.vectors[name].size, dtype=np.float32)
)
->
size = self.config.vectors[name].size if isinstance(self.config.vectors, dict) else self.config.vectors.size
vectors[name].append(np.ones(size, dtype=np.float32))
- You can wait for sometime for the next release of qdrant-client where we will fix it (I hope it will be available this week)
P.S. I don't think it can spoil your db, but be sure to make a backup before experiments
P.P.S. Pay attention to the path of your db during these experiments, you might need to set it different in different options (e.g. 1) and 2))
from qdrant-client.
Hi @hdmi
Thank you for pointing it out and for a code sample (which occurred to be really valuable :) )!
It seems that there is a bug on our side, which does not correctly load unnamed vectors
As a workaround until we fix it, I can suggest you to make dense vectors named:
vectors_config=models.VectorParams(
size=1024,
distance=models.Distance.COSINE)
->
vectors_config={"text": models.VectorParams(
size=1024,
distance=models.Distance.COSINE)
}
By the way, there is another bug in local mode, which is also highlighted by your code sample :(
operation_info = db.upsert(
collection_name=collectionName,
wait=True,
points=[PointStruct(id = i,
vector = { "text": models.SparseVector(indices=[0,100,123,3213], values=[0.12321, -1.3123, 0.9321, -1.33333])},
payload = {"name": f"Name_{i}"})
],
)
Here you are trying to upsert vector text
instead of text-sparse
. text
vector does not exist and should throw an error
However with correct configuration it should work as intended.
We will fix these bugs in the upcoming days, sorry for the inconvenience
from qdrant-client.
Ok, thanks for the insights!
Kind of offtopic but related to the bug, is there a way of recovering the already stored embeddings?
I have days of generated sparse and dense vectors that I would like to recover.
Maybe I can build a qdrant server and place the sqlite files there.
Thank you for the support!
from qdrant-client.
available as of qdrant-client==1.7.1
from qdrant-client.
Related Issues (20)
- PointStruct is very slow HOT 8
- update scoring in local mode in discovery api HOT 1
- Missing import statement in documentation (Get Started) HOT 2
- Local Qdrant db Error on loading: KeyError: '__pydantic_fields_set__' HOT 4
- query_text param not working for qdrant_client.search HOT 8
- Upgrade fastembed version from 0.1.1 to 0.2.1 (latest) HOT 3
- Deleting points by ID not working HOT 3
- Trigger nighly tests against latest qdrant dev build
- Tracking issue: local mode for Qdrant v1.8 HOT 3
- Feature Request: Progress bar for batch upload_points function HOT 2
- Check vectors for NaN in local mode HOT 2
- qdrant_client.get_fastembed_vector_params() with upload_collection HOT 4
- Python Application Crashes on Attempting to Retrieve Non-existent Collection via QdrantClient in GRPC Mode HOT 2
- Add note about batching into README.md HOT 1
- grpc.PointStruct.PayloadEntry errror HOT 2
- How to upload collection asynchronous HOT 2
- Feature Request: Add ability to have properties/metadata for a collection
- qdrant_client.QdrantClient never returns HOT 2
- Datetime timezone parsing inconsistency HOT 1
- investigate local mode close HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qdrant-client.