You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cache.init(
embedding_func=onnx.to_embeddings,
data_manager=data_manager,
similarity_evaluation=SearchDistanceEvaluation(),
config=Config(similarity_threshold=0.9,
auto_flush=5
)
)This code is supposed to evict 10 out of 100 items when the number of queries exceeds 100, with a cache size of 100. However, I'm not sure if this is working correctly in milvus. For debugging, I added the following code to milvus.py:
I added num_entities to check the size, and I found that it manages more than the cache size. Can you tell me why this is happening? Also, is there a way to make it work according to the cache_size?"
Is there anything specific you'd like me to explain or help with regarding this translated content?
The text was updated successfully, but these errors were encountered:
This is mainly because the num entity of milvus only obtains an approximate number of data rows, which is not accurate. If you need the exact number of rows, you need to call the query interface. You can refer to the milvus document: https://milvus.io/docs/get-and-scalar-query.md#Use-Advanced-Operators
res = client.query(
collection_name="collectin_name",
output_fields=["count(*)"]
)
For eviction, perhaps some explanations of another issue can deepen the understanding of this aspect
I want to use gptcache with milvus. I have created the following code by referring to the example:
cache.init(
embedding_func=onnx.to_embeddings,
data_manager=data_manager,
similarity_evaluation=SearchDistanceEvaluation(),
config=Config(similarity_threshold=0.9,
auto_flush=5
)
)
This code is supposed to evict 10 out of 100 items when the number of queries exceeds 100, with a cache size of 100. However, I'm not sure if this is working correctly in milvus. For debugging, I added the following code to milvus.py:
I added num_entities to check the size, and I found that it manages more than the cache size. Can you tell me why this is happening? Also, is there a way to make it work according to the cache_size?"
Is there anything specific you'd like me to explain or help with regarding this translated content?
The text was updated successfully, but these errors were encountered: