Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tolerance checking approach and tweak yaml configs #2592

Merged
merged 29 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f8a96f5
Tweak yaml files
lintool Sep 7, 2024
360a1d7
Merge branch 'master' of github.com:castorini/anserini into refactoring
lintool Sep 7, 2024
a94e970
Initial addition of tolerance scores in yaml
lintool Sep 10, 2024
32c22de
Merge branch 'master' into refactoring
lintool Sep 11, 2024
9552f0c
sync, regressions for flat-int8
lintool Sep 11, 2024
1ec43ea
flat-int8 onnx
lintool Sep 11, 2024
8269ae5
more tweaks, ms marco.
lintool Sep 11, 2024
4c6b7db
Fixed metrics typo.
lintool Sep 11, 2024
a15106e
tweaks to flat scores for msmarco.
lintool Sep 12, 2024
51d6dd5
initial hnsw cached beir scores.
lintool Sep 12, 2024
530bd03
adjust based on scores
lintool Sep 12, 2024
1ec9b7c
add rest of hnsw scores.
lintool Sep 12, 2024
e2716b2
Tweak tolerance.
lintool Sep 13, 2024
deee1ee
More tolearance tweaks.
lintool Sep 13, 2024
a6578a3
Added hnsw stubs.
lintool Sep 13, 2024
e9c2402
tweaks
lintool Sep 13, 2024
7db41f5
another round of tweaks.
lintool Sep 13, 2024
5996a8e
more tolerance tweaks, removed dead code.
lintool Sep 13, 2024
33ed276
tolerance tweaks
lintool Sep 15, 2024
4f1f1c3
Initial cohere metrics.
lintool Sep 15, 2024
a66c7ab
calibrating cohere
lintool Sep 15, 2024
c1bfce5
cohere tweaks.
lintool Sep 15, 2024
c1e27f5
Merge branch 'master' into refactoring
lintool Sep 15, 2024
69fed51
refresh
lintool Sep 15, 2024
87d17b5
Fixed test.
lintool Sep 15, 2024
4415737
More score tweaks.
lintool Sep 17, 2024
2ccc9cc
another round of tweaks.
lintool Sep 18, 2024
a8ae8f9
more tweaks.
lintool Sep 18, 2024
5ce0101
one final round of tweaks.
lintool Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
initial hnsw cached beir scores.
  • Loading branch information
lintool committed Sep 12, 2024
commit 51d6dd5df26a62157a785274179c7bb936f7a231
35 changes: 19 additions & 16 deletions src/main/python/run_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,22 +418,25 @@ def evaluate_and_verify(yaml_data, dry_run):
# tolerance_ok = dl20_flat_tolerance[model_type][model['name']]

if using_hnsw:
# Extract model
match = hnsw_model_type_pattern.search(model['name'])
model_type = match.group(1)

if 'BEIR' in topic_set['name']:
# Extract BEIR dataset
match = beir_dataset_pattern.search(topic_set['name'])
beir_dataset = match.group(1)

tolerance_ok = beir_hnsw_tolerance[model_type][beir_dataset]
elif 'MS MARCO Passage' in topic_set['name']:
tolerance_ok = msmarco_v1_hnsw_tolerance[model_type][model['name']]
elif 'DL19' in topic_set['name']:
tolerance_ok = dl19_hnsw_tolerance[model_type][model['name']]
elif 'DL20' in topic_set['name']:
tolerance_ok = dl20_hnsw_tolerance[model_type][model['name']]
if 'tolerance' in model:
tolerance_ok = model['tolerance'][metric['metric']][i]
else:
# Extract model
match = hnsw_model_type_pattern.search(model['name'])
model_type = match.group(1)

if 'BEIR' in topic_set['name']:
# Extract BEIR dataset
match = beir_dataset_pattern.search(topic_set['name'])
beir_dataset = match.group(1)

tolerance_ok = beir_hnsw_tolerance[model_type][beir_dataset]
elif 'MS MARCO Passage' in topic_set['name']:
tolerance_ok = msmarco_v1_hnsw_tolerance[model_type][model['name']]
elif 'DL19' in topic_set['name']:
tolerance_ok = dl19_hnsw_tolerance[model_type][model['name']]
elif 'DL20' in topic_set['name']:
tolerance_ok = dl20_hnsw_tolerance[model_type][model['name']]

if using_flat or using_hnsw:
result_str = (f'expected: {expected:.4f} actual: {actual:.4f} '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.9915
R@1000:
- 0.9964
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.6317
R@1000:
- 0.8059
tolerance:
nDCG@10:
- 0.02
R@100:
- 0.03
R@1000:
- 0.04
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.6362
R@1000:
- 0.8307
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.003
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.8454
R@1000:
- 0.9611
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7587
R@1000:
- 0.8839
tolerance:
nDCG@10:
- 0.002
R@100:
- 0.003
R@1000:
- 0.003
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.9036
R@1000:
- 0.9719
tolerance:
nDCG@10:
- 0.002
R@100:
- 0.003
R@1000:
- 0.003
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7682
R@1000:
- 0.9117
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.002
R@1000:
- 0.002
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.6922
R@1000:
- 0.8810
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.8081
R@1000:
- 0.9406
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7856
R@1000:
- 0.9348
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.6727
R@1000:
- 0.8445
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.005
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.6486
R@1000:
- 0.8537
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.002
R@1000:
- 0.002
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7797
R@1000:
- 0.9237
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.002
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7774
R@1000:
- 0.9380
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.002
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7065
R@1000:
- 0.8861
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.002
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.5303
R@1000:
- 0.7833
tolerance:
nDCG@10:
- 0.004
R@100:
- 0.007
R@1000:
- 0.02
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.9719
R@1000:
- 0.9855
tolerance:
nDCG@10:
- 0.006
R@100:
- 0.01
R@1000:
- 0.01
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.7415
R@1000:
- 0.9083
tolerance:
nDCG@10:
- 0.002
R@100:
- 0.004
R@1000:
- 0.007
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.8727
R@1000:
- 0.9424
tolerance:
nDCG@10:
- 0.02
R@100:
- 0.02
R@1000:
- 0.02
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.3368
R@1000:
- 0.6622
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.002
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.9415
R@1000:
- 0.9859
tolerance:
nDCG@10:
- 0.003
R@100:
- 0.007
R@1000:
- 0.009
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.9967
R@1000:
- 0.9998
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.3507
R@1000:
- 0.5981
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.002
R@1000:
- 0.003
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.4959
R@1000:
- 0.7824
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.9667
R@1000:
- 0.9967
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.3112
R@1000:
- 0.5331
tolerance:
nDCG@10:
- 0.006
R@100:
- 0.02
R@1000:
- 0.03
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.1406
R@1000:
- 0.4768
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.4992
R@1000:
- 0.7875
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.002
R@1000:
- 0.007
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ models:
- 0.4857
R@1000:
- 0.8298
tolerance:
nDCG@10:
- 0.001
R@100:
- 0.001
R@1000:
- 0.001