MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / main

Function main

sample/python/symqg_indexing.py:16–33  ·  view source on GitHub ↗
(args=None)

Source from the content-addressed store, hash-verified

14
15
16def main(args=None) -> None:
17 # 1. Load data
18 data = read_fvecs(args.data_file)
19 print(f"Data shape: {data.shape}")
20
21 # 3. Build SymphonyQG index
22 n, dim = data.shape
23 print(f"\nBuilding SymphonyQG index: n={n}, dim={dim}, MaxDegree={args.max_degree}, "
24 f"ef={args.ef_construction}, metric={args.metric}")
25
26 idx = SymqgIndex(dim=dim, max_degree=args.max_degree, metric=args.metric)
27
28 t0 = time()
29 idx.build(data, ef_construction=args.ef_construction, num_threads=args.num_threads)
30 print(f"Indexing time: {time() - t0:.2f}s")
31
32 idx.save(args.index_file)
33 print(f"Index saved → {args.index_file}")
34
35
36if __name__ == "__main__":

Callers 1

symqg_indexing.pyFile · 0.70

Calls 5

buildMethod · 0.95
saveMethod · 0.95
read_fvecsFunction · 0.90
SymqgIndexClass · 0.85
printFunction · 0.50

Tested by

no test coverage detected