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

14QUANTIZATION_BITS = 0 # 0 for vanilla QG, or 4/8 for QG-quant
15NUM_THREADS = 16 # number of threads for build
16INIT = "pipnn" # "pipnn" or "random" initialization of SymphonyQG
17# ──────────────────────────────────────────────
18
19
20def main(args=None) -> None:
21 # 1. Load data
22 data = read_fvecs(args.data_file)
23 print(f"Data shape: {data.shape}")
24
25 # 3. Build SymphonyQG index
26 n, dim = data.shape
27 print(
28 f"\nBuilding SymphonyQG index: n={n}, dim={dim}, MaxDegree={args.max_degree}, "
29 f"ef={args.ef_construction}, metric={args.metric}, "
30 f"quantization_bits={args.quantization_bits}, init={args.init}"
31 )
32
33 idx = SymqgIndex(
34 dim=dim,
35 max_degree=args.max_degree,
36 metric=args.metric,

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