Skip to content

Commit

Permalink
Randomly pick start idx of test dataset in concurrency search.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheharyar570 authored and alwayslove2013 committed Oct 15, 2024
1 parent 51b1ece commit 5e7e438
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vectordb_bench/backend/runner/mp_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import traceback
import concurrent
import multiprocessing as mp
import random
import logging
from typing import Iterable
import numpy as np
Expand Down Expand Up @@ -46,7 +47,7 @@ def search(self, test_data: list[list[float]], q: mp.Queue, cond: mp.Condition)
cond.wait()

with self.db.init():
num, idx = len(test_data), 0
num, idx = len(test_data), random.randint(0, len(test_data) - 1)

start_time = time.perf_counter()
count = 0
Expand Down

0 comments on commit 5e7e438

Please sign in to comment.