Skip to content

Commit

Permalink
Reduced the number of evaluated hyperparameters to one for each task …
Browse files Browse the repository at this point in the history
…for 300K dataset
  • Loading branch information
ProchazkaDavid committed Jul 31, 2024
1 parent e0de76a commit f4d896a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion task1.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@ def task1(

k = 30

for nprobe in range(1, 30 + 1):
nprobes = range(1, 30 + 1)
if dataset_size == '300K':
nprobes = [1]

for nprobe in nprobes:
start = time.time()
D, I = lmi.search(queries, k, nprobe)
searchtime = time.time() - start
Expand Down
6 changes: 5 additions & 1 deletion task2.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,11 @@ def task2(

k = 30

for nprobe in [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 80, 90, 100]:
nprobes = [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 80, 90, 100]
if dataset_size == '300K':
nprobes = [1]

for nprobe in nprobes:
start = time.time()
D, I = lmi.search(queries, decomposed_queries, k, nprobe, ncandidates)
searchtime = time.time() - start
Expand Down
6 changes: 5 additions & 1 deletion task3.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ def task3(

k = 30

for nprobe in range(1, 30 + 1):
nprobes = range(1, 30 + 1)
if dataset_size == '300K':
nprobes = [1]

for nprobe in nprobes:
start = time.time()
D, I = lmi.search(queries, decomposed_queries, k, nprobe)
searchtime = time.time() - start
Expand Down

0 comments on commit f4d896a

Please sign in to comment.