-
Notifications
You must be signed in to change notification settings - Fork 204
Description
Hello Team,
I am use qdrant client in memory to initiate my qdrant collections, but when I try set the parameters as mentioned below, they never get initiated in during the collection creation. What could be possible issue? Please can you advise me if i am doing something wrong.
Below in the code to understand issue and also I have printed the collection parameters been used after creating collection using get_collection method.
>>client = QdrantClient(":memory:")
>> client.recreate_collection(
collection_name="electronic",
vectors_config=models.VectorParams(size=608, # Vector size is defined by used model#,encoder.get_sentence_embedding_dimension(),
distance=models.Distance.COSINE,hnsw_config=models.HnswConfigDiff(m=128, ef_construct=1000,on_disk=False),
),
optimizers_config=models.OptimizersConfigDiff(default_segment_number=8),
quantization_config=models.BinaryQuantization(
binary=models.BinaryQuantizationConfig(
always_ram=True,
),
)
)
`>> client.get_collection(collection_name="electronic")`
Output of above get_collection method:
CollectionInfo(status=<CollectionStatus.GREEN: 'green'>, optimizer_status=<OptimizersStatusOneOf.OK: 'ok'>, vectors_count=None, indexed_vectors_count=0, points_count=0, segments_count=1, config=CollectionConfig(params=CollectionParams(vectors=VectorParams(size=608, distance=<Distance.COSINE: 'Cosine'>, hnsw_config=HnswConfigDiff(m=128, ef_construct=1000, full_scan_threshold=None, max_indexing_threads=None, on_disk=False, payload_m=None), quantization_config=None, on_disk=None, datatype=None), shard_number=None, sharding_method=None, replication_factor=None, write_consistency_factor=None, read_fan_out_factor=None, on_disk_payload=None, sparse_vectors=None), hnsw_config=HnswConfig(m=16, ef_construct=100, full_scan_threshold=10000, max_indexing_threads=0, on_disk=None, payload_m=None), optimizer_config=OptimizersConfig(deleted_threshold=0.2, vacuum_min_vector_number=1000, default_segment_number=0, max_segment_size=None, memmap_threshold=None, indexing_threshold=20000, flush_interval_sec=5, max_optimization_threads=1), wal_config=WalConfig(wal_capacity_mb=32, wal_segments_ahead=0), quantization_config=None), payload_schema={})
As from the above output you can see it only sets VectorParams and other params are not getting set. Please help me to understand. How I can fix it?