forked from qdrant/vector-db-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcreate-svs.py
More file actions
51 lines (48 loc) · 2.23 KB
/
Copy pathcreate-svs.py
File metadata and controls
51 lines (48 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import json
threads = [16]
ws_constructs = [200]
ws_search = [177]
#ws_search = [48]
graph_degree = [32]
#quantization = ["LVQ4X4", "LVQ4x8", "LVQ8", "LVQ4"]
quantization = ["LVQ4X4"]
topKs = [100]
data_types = ["FLOAT16", "FLOAT32"]
for algo in ["svs-vamana"]:
for data_type in data_types:
for ws_construct in ws_constructs:
for graph_d in graph_degree:
for quant in quantization:
configs = []
for thread in threads:
config = {
"name": f"svs-{algo}-quant-{quant}-dt-{data_type}",
"engine": "redis",
"connection_params": {},
"collection_params": {
"algorithm": algo,
"data_type": data_type,
f"{algo}_config": {"NUM_THREADS": thread, "GRAPH_MAX_DEGREE": graph_d, "CONSTRUCTION_WINDOW_SIZE": ws_construct, "compression": quant},
},
"search_params": [],
"upload_params": {
"parallel": 100,
"data_type": data_type,
"algorithm": algo,
},
}
for client in [100]:
for ws_s in ws_search:
for top in topKs:
test_config = {
"algorithm": algo,
"parallel": client,
"top": top,
"search_params": {"WS_SEARCH": ws_s, "data_type": data_type},
}
config["search_params"].append(test_config)
configs.append(config)
fname = f"svs-{algo}-quant-{quant}-dt-{data_type}.json"
with open(fname, "w") as json_fd:
json.dump(configs, json_fd, indent=2)
print(f"Created {len(configs)} configs for {fname}.")