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

Add fusion regression #2611

Merged
merged 34 commits into from
Oct 9, 2024
Merged

Conversation

Stefan824
Copy link
Contributor

This PR should address issue #2595 if goes well.

  • Added a new script run_fusion_regression.py to handle fusion regression tasks. It behaves similarly to run_regression.py.
  • Included two test yaml files.
  • Tests could be performed following anserini/docs/fuse-regressions/test-setup.md.
  • Next steps in mind are
    • Implementing an auto-script to generate more yaml files for fusion based on current regression yamls (working on it)
    • Doing experiments to find out expected eval results for fusion on different runs with different fusion methods and parameters

Copy link
Member

@lintool lintool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial comments.

qrel: qrels.beir-v1.0.0-robust04.test.txt

# Fusion Regression Test Configuration
runs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we assume that the runs are generated by a regression in https://github.com/castorini/anserini/tree/master/src/main/resources/regression? E.g., beir-v1.0.0-robust04.flat.yaml

So we keep the yaml file and the run name (i.e., just take the run file name it generates).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I established a test_2.yaml, do you mind taking a look to see if that is something you'd like?

Perform two regression runs for test2

One could generate the runs necessary for test 2 following

Or do you want the fusion yaml file to contain information about the yaml files (the ones that produce runs for the fusion test) it depends on and perform those runs automatically when the fusion test is performed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its name is now changed into src/main/resources/fuse_regression/fusion-regression-bge-flat-int8-robust04-2.yaml

src/main/resources/fuse_regression/test_0.yaml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
@@ -52,4 +52,4 @@ models:
R@100:
- 0.3746
R@1000:
- 0.6345
- 0.6345
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert unnecessary changes please


# Fusion Regression Test Configuration
runs:
- runs/runs.beir/run.inverted.beir-v1.0.0-robust04.flat.test.bm25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

record the regression yaml this run comes from?

mkdir -p runs/runs.beir

# Download the run files from Google Drive using their file IDs
wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1XVlVCDYQe3YjRzxplaeGbmW_0EFQCgm8' -O runs/runs.beir/run.inverted.beir-v1.0.0-robust04.multifield.test.bm25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depend on the runs generated by the regression yaml config?

output: runs/fuse/run.flat-int8.beir-v1.0.0-robust04.bge-base-en-v1.5.test.bge-flat-int8-cached.bge-flat-cached.fusion.rrf
results:
nDCG@10:
- 0.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

record to 4 digits?

Copy link
Member

@lintool lintool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Stefan824
Copy link
Contributor Author

Why don't we start with fusion robust04 BM25 and dense:

BM25: https://github.com/castorini/anserini/blob/master/docs/regressions/regressions-beir-v1.0.0-robust04.flat.md

BGE: https://github.com/castorini/anserini/blob/master/docs/regressions/regressions-beir-v1.0.0-robust04.bge-base-en-v1.5.flat.onnx.md

Accessible here: https://github.com/castorini/anserini?tab=readme-ov-file#beir-v100-regressions

Added corresponding yaml. Do you like the structure of the yaml and the namings? If so, I could start on generating more.

@@ -0,0 +1,79 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this and keep only the above?

k: 1000
depth: 1000
rrf_k: 60
output: runs/fuse/run.beir-v1.0.0-robust04.flat.bm25.fuse-rrf.bge-base-en-v1.5.bge-flat-onnx.topics.beir-v1.0.0-robust04.test.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of a subdir, how about runs/run.fuse.XXXX?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about runs/runs.fuse.rrf.XXX and runs/runs.fuse.avg.XXX

@lintool lintool merged commit 4ec068c into castorini:master Oct 9, 2024
1 check passed
@lintool
Copy link
Member

lintool commented Oct 9, 2024

hey @Stefan824 this is good for merging, but I pinged you on Slack for improvements. Please work on that next. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants