I am building my Qdrant service on macos using docker image as follows:
qdrant:
image: qdrant/qdrant
restart: unless-stopped
ports:
- "6335:6333"
networks:
- app-network
volumes:
- ./backend/data-source/qdrant-storage:/qdrant/storage
And I am using LlamaIndex Client to create the index
class QdrantIndexer:
def __init__(self, collection_name=None):
"""Initialize the Qdrant vector database."""
Settings.embed_model = FastEmbedEmbedding(model_name = os.getenv("EMBEDDER"), cache_dir= os.path.join(PARENT_DIR, "model_checkpoints"))
self.qdrant_client = QdrantClient(os.getenv("QDRANT_HOST", "http://qdrant:6335"))
self.collection_name = os.getenv("QDRANT_COLLECTION_NAME", "legal") if collection_name is None else collection_name
self.vector_store = QdrantVectorStore(
client=self.qdrant_client,
collection_name=self.collection_name,
)
self.storage_context = StorageContext.from_defaults(vector_store=self.vector_store)
def create_index(self, chunks: List[Document]):
"""Store processed chunks in Qdrant as vector embeddings."""
self.index = VectorStoreIndex.from_documents(documents=chunks, storage_context=self.storage_context)
When I index any file, I can see that the vector embeddings are correctly computed and saved to the collection. However, If I delete the container and build a new one using the same storage, then all the vector values are set to a zero (A vector of zero values).
This happens only on Macos Silicon. On Ubuntu it works normally and vector are restored without issues.
Using Python3.10 and llama-index-vector-stores-qdrant==0.4.3
I am building my Qdrant service on macos using docker image as follows:
qdrant: image: qdrant/qdrant restart: unless-stopped ports: - "6335:6333" networks: - app-network volumes: - ./backend/data-source/qdrant-storage:/qdrant/storageAnd I am using LlamaIndex Client to create the index
When I index any file, I can see that the vector embeddings are correctly computed and saved to the collection. However, If I delete the container and build a new one using the same storage, then all the vector values are set to a zero (A vector of zero values).
This happens only on Macos Silicon. On Ubuntu it works normally and vector are restored without issues.
Using
Python3.10andllama-index-vector-stores-qdrant==0.4.3