-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi, Jason
I received the following result after running python examples/quickstart.py:
=== Quake Basic Example ===
Loading sift1m dataset...
/home/wjl/quake/data/sift
Building index with num_clusters=1024 over 1000000 vectors of dimension 128...
[PartitionManager] init_partitions: Created 1 partitions.
[PartitionManager] init_partitions: Created 1024 partitions.
Build time: 3.2801 seconds
Performing search of 100 queries with k=10 and nprobe=10...
Mean recall: 0.8950
Search time: 0.0916 seconds
Removing 100 vectors from the index...
Remove time: 0.0084 seconds
Adding 100 vectors to the index...
Add time: 0.0619 seconds
Perform maintenance on the index...
Window not full yet. 0 queries recorded and 1000 queries required.
Num partitions split: 0
Num partitions merged: 0
Maintenance time: 0.0001 seconds
It shows the maintenance information as 0 queries recorded, Num partitions split: 0, and Num partitions merged: 0.
Then, I ran another dataset, msturing-30M, and got the following result:
File testQuery10K.fbin info: 10000 vectors, dimension 100
Successfully loaded 3000000 base vectors and 10000 query vectors.
--- Step 2: Build Quake Index ---
[PartitionManager] init_partitions: Created 1 partitions.
[PartitionManager] init_partitions: Created 8192 partitions.
Index build complete. Time: 61.91 seconds.
--- Step 3: Search Index ---
Search complete. Time: 10.6995 seconds.
Found 10 nearest neighbors for 10000 queries.
Results for the first 3 queries (neighbor IDs):
tensor([[1326166, 2031973, 823397, 1347868, 1325216, 1196088, 2023600, 1454480,
1454486, 1194099],
[ 314103, 83306, 141383, 79022, 301927, 24677, 24695, 83748,
128564, 82493],
[ 866125, 670079, 896884, 896631, 805888, 670193, 800235, 733622,
800200, 685271]])
--- Step 4: Update Index ---
Removing 10000 vectors (IDs 0 to 9999) from the index...
Remove operation complete. Time: 0.1011 seconds.
Adding 10000 new vectors to the index...
Add operation complete. Time: 0.6221 seconds.
--- Step 5: Perform Index Maintenance ---
Window not full yet. 0 queries recorded and 1000 queries required.
Maintenance operation complete. Time: 0.0001 seconds.
Maintenance info: {"total_time_us": 0, "split_time_us": 0, "delete_time_us": 0, "split_refine_time_us": 0, "delete_refine_time_us": 0, "n_splits": 0, "n_deletes": 0}
I still got 0 queries recorded and "n_splits": 0, "n_deletes": 0.
My questions are:
Under what conditions will queries be recorded?
Under what conditions will partitions be split and merged?
BTW, I cloned the main branch of Quake because I want to see the maintenance module in action.